mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
naxsi plugin allows multiple logfiles (#1467)
* add naxsi exceptions plugin * Update naxsi_exceptions * Update naxsi_exceptions * rename dir to simpler version * Update naxsi_exceptions * Update naxsi_exceptions * naxsi plugin for multiple logfiles to be scanned * Update issue templates * Delete .github/ISSUE_TEMPLATE directory
This commit is contained in:
parent
4cc9e9a43d
commit
50c90dec07
1 changed files with 12 additions and 9 deletions
|
@ -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,16 +59,19 @@ 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 = ''
|
||||||
'logtail',
|
for logfile in logfiles:
|
||||||
# '-t', # FIXME test mode,: remove
|
output += run_binary([
|
||||||
'-f',
|
'logtail',
|
||||||
logfile ]
|
# '-t', # FIXME test mode,: remove
|
||||||
)
|
'-f',
|
||||||
|
logfile ]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
with open(state_file, 'rt') as f:
|
with open(state_file, 'rt') as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue