diff --git a/Documentation/Tutorials/Nagios-Plugins.md b/Documentation/Tutorials/Nagios-Plugins.md index f3eff0117..4c615e05f 100644 --- a/Documentation/Tutorials/Nagios-Plugins.md +++ b/Documentation/Tutorials/Nagios-Plugins.md @@ -92,3 +92,11 @@ Example related to server1.cfg * services OK: 7 services found | services1=RW_Router;readwritesplit;1;1 services2=RW_Split;readwritesplit;1;1 services3=Test Service;readconnroute;1;1 services4=Master Service;readconnroute;2;2 services5=Debug Service;debugcli;1;1 services6=CLI;cli;2;145 services7=MaxInfo;maxinfo;2;2 + +Returns OK and the number of services + +Returns CRITICAL if no services are found + +The data after | char are so called performance data and may be collected by Nagios +output format is: + servicex=Name;router_module;NumUsers;TotalSessions diff --git a/plugins/nagios/check_maxscale_monitors.pl b/plugins/nagios/check_maxscale_monitors.pl index b98c5df18..8ab1e0cb2 100755 --- a/plugins/nagios/check_maxscale_monitors.pl +++ b/plugins/nagios/check_maxscale_monitors.pl @@ -201,8 +201,8 @@ if ($n_monitors) { close(MAXSCALE); exit 0; } else { - printf "CRITICAL: 0 monitors found\n"; + printf "WARNING: 0 monitors found\n"; close(MAXSCALE); - exit 2; + exit 1; }