mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
offline threshold check
This commit is contained in:
@@ -145,6 +145,11 @@ main() {
|
|||||||
|
|
||||||
offline_hours=$(calculate_offline_hours "$last_checkin")
|
offline_hours=$(calculate_offline_hours "$last_checkin")
|
||||||
|
|
||||||
|
if [ "$offline_hours" -lt "$OFFLINE_THRESHOLD_HOURS" ]; then
|
||||||
|
log_message "INFO" "${agent_hostname^^} has been offline for ${offline_hours}h (threshold: ${OFFLINE_THRESHOLD_HOURS}h). Not logging ${agent_status^^} agent until it reaches threshold"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
log_entry=$(echo 'null' | jq -c \
|
log_entry=$(echo 'null' | jq -c \
|
||||||
--arg ts "$current_timestamp" \
|
--arg ts "$current_timestamp" \
|
||||||
--arg id "$agent_id" \
|
--arg id "$agent_id" \
|
||||||
|
|||||||
Reference in New Issue
Block a user