Updated skipback and added extra stats
This commit is contained in:
@@ -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}%")
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user