[Nagiosplug-help] Nagios not registering "Critical" | "Warning" statuses.
Thomas Guyot-Sionnest
dermoth at aei.ca
Fri Feb 18 13:30:42 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11-02-17 08:19 PM, socomm wrote:
> I'm having a small problem where Nagios is not registering the status of
> critical or warning when I run a check. In this instance I am using the
> check_nt plug-in, and when ran manually I get exit code of 2 which,
> according to the Nagios API doc
> (http://nagios.sourceforge.net/docs/3_0/pluginapi.html) should be treated
> as a critical
> status:
>
>
> -------------------------
>
> [COMMAND]
> su - nagios
> /usr/lib64/nagios/plugins/check_nt -H windows_host -p 12489 -v
> USEDDISKSPACE -w 80% -c 90% -l S; printf "\n$?\n";
>
> [OUTPUT]
> S:\ - total: 894.99 Gb - used: 855.89 Gb (96%) - free 39.10 Gb (4%) | 'S:\
> Used Space'=855.89Gb;716.00;805.49;0.00;894.99
>
> 2
>
> [CONFIGURATION]
>
> define command {
> command_name check_nt_larg
> command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$'
> -p 12489 -v '$ARG1$' -l '$ARG2$'
> }
>
>
> define service {
> use generic-service
> hostgroup_name check-ntsdisk
> service_description S:\ Disk Space
> check_command check_nt_larg!USEDDISKSPACE!S!-w 80%% -c 90%%
> notification_interval 15
> }
Your service definition sends 3 arguments, but only two are defined in
the command, so the last one (-w 80%% -c 90%%) is ignored. Also I don't
thing you need to use double %....
add $ARG3$ to your command line (do not put quotes around it) and it'll
work.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1eZmsACgkQ6dZ+Kt5BchZWoQCgwtXFylBSmWgvMbGN8W4+qE27
DkMAoP6OPhtMu8Y1nd1OCKDAzlmrUFCx
=pkt3
-----END PGP SIGNATURE-----
More information about the Help
mailing list