mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +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:
|
||||
|
||||
[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.critical_level 20
|
||||
|
||||
|
@ -59,16 +59,19 @@ def run_binary(args):
|
|||
|
||||
|
||||
def get_values():
|
||||
logfile=os.environ.get('nginx_error_log_file')
|
||||
if not logfile:
|
||||
logfile=os.environ.get('nginx_error_log_files', '').split(' ')
|
||||
|
||||
if not logfiles:
|
||||
raise ValueError('no nginx err log file configured')
|
||||
|
||||
output = run_binary([
|
||||
'logtail',
|
||||
# '-t', # FIXME test mode,: remove
|
||||
'-f',
|
||||
logfile ]
|
||||
)
|
||||
output = ''
|
||||
for logfile in logfiles:
|
||||
output += run_binary([
|
||||
'logtail',
|
||||
# '-t', # FIXME test mode,: remove
|
||||
'-f',
|
||||
logfile ]
|
||||
)
|
||||
|
||||
|
||||
with open(state_file, 'rt') as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue