Updated skipback and added extra stats

This commit is contained in:
2025-09-26 17:18:02 -04:00
parent 8462e3adf5
commit b5a1ee188f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -392,6 +392,7 @@ def findQuietAgents(url):
zero_percentage = (zero_count / total_hosts) * 100
# Print results
print(f"Number of hosts in policy : {total_hosts} ")
print(f"Number of hosts with execution_count = 0: {zero_count}")
print(f"Percentage of hosts with execution_count = 0: {zero_percentage:.2f}%")
+1 -1
View File
@@ -318,7 +318,7 @@ def skipback(days):
Generate a MongoDB ObjectId for a given number of days ago from today.
Adds 1 extra day to the input to look further back.
"""
adjusted_days = days + 10
adjusted_days = days
date_days_ago = datetime.datetime.now(datetime.UTC) - datetime.timedelta(days=adjusted_days)
timestamp = int(date_days_ago.timestamp())
hex_timestamp = format(timestamp, '08x')