[Pkg-nagios-devel] Bug#513688: Bug#513688: /usr/share/nagios-plugins/templates-standard/nt.cfg is missing information

Jan Wagner waja at cyconet.org
Sun Feb 1 13:10:41 UTC 2009


Hi David,

On Sunday 01 February 2009 09:53, you wrote:
> Thanks for the tip, that is a possibility, but when someone is
> following the documentation it is confusing that it doesn't work like
> they say:
>
> (http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html)
>
> "Add the following service definition to monitor the CPU utilization
> on the Windows server and generate a CRITICAL alert if the 5-minute
> CPU load is 90% or more or a WARNING alert if the 5-minute load is 80%
> or greater.
>
> define service{
> 	use			generic-service
> 	host_name			winserver
> 	service_description	CPU Load
> 	check_command		check_nt!CPULOAD!-l 5,80,90
> 	}"

here I disagree with you. It's completly along with the documentation. Since 
monitoring via nsclient seems not so common for users of our package, we are 
using a highly abstracted command definition. The point is, how you 
understand "$ARGS1$", we understand is as the first string between the check 
command (here "check_nt") including the first "!" and the next "!" or end of 
line (what comes first).
So you call here "check_command	    <check_command>!<$ARGS1$>", which result 
in my exmaple into the command line:

/usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -v 'CPULOAD -l 5,80,90'

This is exactly what you want. I imply, that someone who is trying 
such "unconventional" check, did also read the documentation[1] and 
understand how argument macros works.

Anyways ... If you have a look at "Password Protection" on the page you 
mentioned, you will see, that our check definition in most cases don't work. 
There is used the default port (1248) of the plugin instead of the (actual) 
default port of NSClient++, even the password isn't passed.
But this will not change, at least not so far in the future, because there may 
many people, which configured nsclient to run on port 1248 and these checks 
will break.
So feel free to create your own command definitions which are highly 
customised to your own setup, I would recommand to place them in a seperate 
config file anywhere in /etc/nagios[23]/conf.d/.

With kind regards, Jan.
[1] http://nagios.sourceforge.net/docs/3_0/macros.html#arg
-- 
Never write mail to <waja at spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w--- O M V- PS PE
Y++ PGP++ t-- 5 X R tv- b+ DI- D++ G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20090201/7e9d3bb5/attachment.pgp 


More information about the Pkg-nagios-devel mailing list