1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-09-19 00:53:19 +00:00

naxsi plugin for multiple logfiles to be scanned

This commit is contained in:
Jirka Schäfer 2025-01-04 10:59:03 +01:00 committed by GitHub
parent 6f50f1398e
commit 1f8da5bdeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ naxsi - monitor naxsi rule hits
Following config is needed: Following config is needed:
[naxsi_exceptions] [naxsi_exceptions]
env.nginx_error_log_file /var/log/nginx/error.log env.nginx_error_log_files /var/log/nginx/error.log /var/log/nginx/error2.log
env.warning_level 2 env.warning_level 2
env.critical_level 20 env.critical_level 20
@ -59,11 +59,14 @@ def run_binary(args):
def get_values(): def get_values():
logfile=os.environ.get('nginx_error_log_file') logfile=os.environ.get('nginx_error_log_files', '').split(' ')
if not logfile:
if not logfiles:
raise ValueError('no nginx err log file configured') raise ValueError('no nginx err log file configured')
output = run_binary([ output = ''
for logfile in logfiles:
output += run_binary([
'logtail', 'logtail',
# '-t', # FIXME test mode,: remove # '-t', # FIXME test mode,: remove
'-f', '-f',