Created
May 28, 2014 20:15
-
-
Save HackRanger/aea264069e9e07462b69 to your computer and use it in GitHub Desktop.
Main.mk at Master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Log information about notifications | |
notification_logging = 1 | |
# Alternative: more verbose debugging with all variables | |
# notification_logging = 2 | |
define_hostgroups = True | |
all_hosts += [ | |
'localhost|localhost', | |
"slave01", | |
"slave02", | |
] | |
ipaddresses.update({ | |
"localhost" : "127.0.0.1", | |
"slave01" : "127.0.0.1", | |
"slave02" : "127.0.0.1", | |
}) | |
datasource_programs += [ | |
( "cat tmp/cmkresult.slave01", [ 'slave01' ] ), | |
( "cat tmp/cmkresult.slave02", [ 'slave02' ] ), | |
] | |
host_groups += [ | |
( 'slave01', [ 'slave01' ], ALL_HOSTS ), | |
] | |
extra_host_conf["check_command"] = [("check-host-alive-multiple", [ "fileagent" ], ALL_HOSTS)] | |
extra_nagios_conf += """ | |
define command{ | |
command_name check-mk-hostfileage | |
command_line $USER4$/lib/nagios/plugins/check_file_age -w $ARG1$ -c $ARG2$ -f /omd/sites/monitoring/tmp/cmkResults/cmkresult.*.$HOSTNAME$ | |
} | |
define command{ | |
command_name check-mk-hostfilesize | |
command_line $USER4$/lib/nagios/plugins/check_file_size.sh --minwarn $ARG1$ --mincrit $ARG2$ -m /omd/sites/monitoring/tmp/cmkResults/cmkresult.*.$HOSTNAME$ | |
} | |
define command{ | |
command_name check-host-alive-multiple | |
command_line $USER4$/lib/nagios/plugins/check_multiple.py --commands "$USER4$/lib/nagios/plugins/check_file_age -w 1800 -c 3600 -f /omd/sites/monitoring/tmp/cmkResults/cmkresult.*.$HOSTNAME$@#%$USER4$/lib/nagios/plugins/check_file_size.sh --minwarn 1 --mincrit 0 -m /omd/sites/monitoring/tmp/cmkResults/cmkresult.*.$HOSTNAME$" | |
} | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment