mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
Telegraf - Track Oldest PCAP
This commit is contained in:
@@ -626,7 +626,8 @@
|
|||||||
[[inputs.exec]]
|
[[inputs.exec]]
|
||||||
commands = [
|
commands = [
|
||||||
"/scripts/redis.sh",
|
"/scripts/redis.sh",
|
||||||
"/scripts/stenoloss.sh"
|
"/scripts/stenoloss.sh",
|
||||||
|
"/scripts/oldpcap.sh"
|
||||||
]
|
]
|
||||||
data_format = "influx"
|
data_format = "influx"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
8
salt/common/telegraf/scripts/oldpcap.sh
Normal file
8
salt/common/telegraf/scripts/oldpcap.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get the data
|
||||||
|
OLDPCAP=$(find /nsm/pcap -type f -printf '%Cs %p\n' | sort | head -n 1 | awk {'print $1'})
|
||||||
|
DATE=$(date +%s)
|
||||||
|
AGE=$(expr $DATE - $OLDPCAP)
|
||||||
|
|
||||||
|
echo "pcapage seconds=$AGE"
|
||||||
Reference in New Issue
Block a user