mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
change healthcheck to send 0 or 1 to telegraf for zeek restart
This commit is contained in:
committed by
William Wernert
parent
8cb94872e6
commit
a738995b09
@@ -78,18 +78,19 @@ def zeek():
|
|||||||
retcode = __salt__['zeekctl.status'](verbose=False)
|
retcode = __salt__['zeekctl.status'](verbose=False)
|
||||||
logging.debug('healthcheck_module: zeekctl.status retcode: %i' % retcode)
|
logging.debug('healthcheck_module: zeekctl.status retcode: %i' % retcode)
|
||||||
if retcode:
|
if retcode:
|
||||||
zeek_restart = True
|
zeek_restart = 1
|
||||||
if calling_func != 'beacon':
|
if calling_func != 'beacon':
|
||||||
docker_stop('so-zeek')
|
docker_stop('so-zeek')
|
||||||
states_to_apply.append('zeek')
|
states_to_apply.append('zeek')
|
||||||
else:
|
else:
|
||||||
zeek_restart = False
|
zeek_restart = 0
|
||||||
|
|
||||||
|
__salt__['telegraf.send']('healthcheck zeek_restart=%i' % zeek_restart)
|
||||||
|
|
||||||
if calling_func == 'execute' and zeek_restart:
|
if calling_func == 'execute' and zeek_restart:
|
||||||
apply_states()
|
apply_states()
|
||||||
|
|
||||||
retval.append({'zeek_restart': zeek_restart})
|
retval.append({'zeek_restart': zeek_restart})
|
||||||
|
|
||||||
send_event('so/healthcheck/zeek', retval)
|
send_event('so/healthcheck/zeek', retval)
|
||||||
__salt__['telegraf.send']('healthcheck zeek_restart=%s' % str(zeek_restart))
|
|
||||||
return retval
|
return retval
|
||||||
|
|||||||
Reference in New Issue
Block a user