mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-08-02 14:18:21 +00:00
Update naxsi_exceptions
This commit is contained in:
parent
22a168b99c
commit
6927890de7
1 changed files with 6 additions and 2 deletions
|
@ -14,6 +14,8 @@ Following config is needed:
|
||||||
|
|
||||||
[naxsi_exceptions]
|
[naxsi_exceptions]
|
||||||
env.nginx_error_log_file /var/log/nginx/error.log
|
env.nginx_error_log_file /var/log/nginx/error.log
|
||||||
|
env.warning_level 2
|
||||||
|
env.critical_level 20
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
@ -42,6 +44,8 @@ import re
|
||||||
import json
|
import json
|
||||||
|
|
||||||
state_file = os.path.join(os.environ.get('MUNIN_PLUGSTATE'), os.environ.get('MUNIN_STATEFILE'))
|
state_file = os.path.join(os.environ.get('MUNIN_PLUGSTATE'), os.environ.get('MUNIN_STATEFILE'))
|
||||||
|
warning_level = os.environ.get('warning_level', 20)
|
||||||
|
critial_level = os.environ.get('critical_level', 2)
|
||||||
|
|
||||||
|
|
||||||
def run_binary(args):
|
def run_binary(args):
|
||||||
|
@ -99,8 +103,8 @@ def print_config():
|
||||||
rule_ids = json.loads(f.read() or '[]')
|
rule_ids = json.loads(f.read() or '[]')
|
||||||
for k in rule_ids:
|
for k in rule_ids:
|
||||||
print(f'ID_{k}.label ID_{k}')
|
print(f'ID_{k}.label ID_{k}')
|
||||||
print(f'ID_{k}.warning 10')
|
print(f'ID_{k}.warning {warning_leve}')
|
||||||
print(f'ID_{k}.critical 100')
|
print(f'ID_{k}.critical {critical_level}')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue