mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
Add telegraf script to import featuresdetected
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -80,7 +80,7 @@ def check_features():
|
|||||||
fips = check_for_fips()
|
fips = check_for_fips()
|
||||||
luks = check_for_luks()
|
luks = check_for_luks()
|
||||||
with open('/opt/so/log/sostatus/features-check.log', 'w') as f:
|
with open('/opt/so/log/sostatus/features-check.log', 'w') as f:
|
||||||
f.write("featuresdetected: fips={},luks={}".format(fips,luks))
|
f.write("featuresdetected fips={},luks={}".format(fips,luks))
|
||||||
|
|
||||||
def fail(msg):
|
def fail(msg):
|
||||||
print(msg, file=sys.stderr)
|
print(msg, file=sys.stderr)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ telegraf:
|
|||||||
- suriloss.sh
|
- suriloss.sh
|
||||||
- zeekcaptureloss.sh
|
- zeekcaptureloss.sh
|
||||||
- zeekloss.sh
|
- zeekloss.sh
|
||||||
|
- features.sh
|
||||||
manager:
|
manager:
|
||||||
- influxdbsize.sh
|
- influxdbsize.sh
|
||||||
- lasthighstate.sh
|
- lasthighstate.sh
|
||||||
@@ -43,6 +44,7 @@ telegraf:
|
|||||||
- raid.sh
|
- raid.sh
|
||||||
- redis.sh
|
- redis.sh
|
||||||
- sostatus.sh
|
- sostatus.sh
|
||||||
|
- features.sh
|
||||||
managersearch:
|
managersearch:
|
||||||
- eps.sh
|
- eps.sh
|
||||||
- influxdbsize.sh
|
- influxdbsize.sh
|
||||||
@@ -51,6 +53,7 @@ telegraf:
|
|||||||
- raid.sh
|
- raid.sh
|
||||||
- redis.sh
|
- redis.sh
|
||||||
- sostatus.sh
|
- sostatus.sh
|
||||||
|
- features.sh
|
||||||
import:
|
import:
|
||||||
- influxdbsize.sh
|
- influxdbsize.sh
|
||||||
- lasthighstate.sh
|
- lasthighstate.sh
|
||||||
@@ -67,6 +70,7 @@ telegraf:
|
|||||||
- suriloss.sh
|
- suriloss.sh
|
||||||
- zeekcaptureloss.sh
|
- zeekcaptureloss.sh
|
||||||
- zeekloss.sh
|
- zeekloss.sh
|
||||||
|
- features.sh
|
||||||
heavynode:
|
heavynode:
|
||||||
- checkfiles.sh
|
- checkfiles.sh
|
||||||
- eps.sh
|
- eps.sh
|
||||||
@@ -90,6 +94,7 @@ telegraf:
|
|||||||
- os.sh
|
- os.sh
|
||||||
- raid.sh
|
- raid.sh
|
||||||
- sostatus.sh
|
- sostatus.sh
|
||||||
|
- features.sh
|
||||||
receiver:
|
receiver:
|
||||||
- eps.sh
|
- eps.sh
|
||||||
- lasthighstate.sh
|
- lasthighstate.sh
|
||||||
|
|||||||
14
salt/telegraf/scripts/features.sh
Normal file
14
salt/telegraf/scripts/features.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||||
|
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||||
|
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||||
|
# Elastic License 2.0.
|
||||||
|
|
||||||
|
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
||||||
|
|
||||||
|
cat /var/log/sostatus/features-check.log
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user