Another NSClient question
Massey, Craig
craig.massey at chh.co.nz
Mon Nov 25 19:53:25 CET 2002
Just what I was going to say.
Here are a couple of my commands as an example
define command{
name check_nt_process
command_name check_nt_process
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -s $USER3$ -d
SHOWALL -v PROCSTATE -l $ARG1$
}
define command{
name check_nt_service
command_name check_nt_service
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -s $USER3$ -d
SHOWALL -v SERVICESTATE -l $ARG1$
}
I put the following in my resource.cfg
# Store some usernames and passwords (hidden from the CGIs)
$USER3$=xxxxx
HTH
-----Original Message-----
From: Frater, Greg J [mailto:gjfrater at bechtel.com]
Sent: Tuesday, November 26, 2002 7:31 AM
To: 'Peter Pan'; Frater, Greg J; nagios
Subject: RE: [Nagios-users] Another NSClient question
I just reread this. Your syntax is wrong. Use the -s switch not -p for the
password.
-----Original Message-----
From: Peter Pan [mailto:peterpan at pvamu.edu]
Sent: Monday, November 25, 2002 10:16 AM
To: Frater, Greg J; nagios
Subject: Re: [Nagios-users] Another NSClient question
I restarted the server and it still gives me an "No output". Here is some
info is this helps in any way. Thanks
# NSClient -- Server
command[check_nt_disk_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v USEDDISKSPACE -l C -w 80 -c 90
command[check_nt_cpuload_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v CPULOAD -l 10,80,95,60,80,95,1440,80,95
command[check_nt_uptime_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v UPTIME
command[check_nt_clientversion_Server]=$USER1$/check_nt -H 127.0.0.1 -P
1248 -p xxxxx -v CLIENTVERSION
command[check_nt_process_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v PROCSTATE -l $ARG1$
command[check_nt_service_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v SERVICESTATE -l $ARG1$
command[check_nt_memuse_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v MEMUSE -w $ARG1$ -c $ARG2$
command[check_nt_fileage_Server]=$USER1$/check_nt -H 127.0.0.1 -P 1248 -p
xxxxx -v FILEAGE ~Vl $ARG1$ -w $ARG2$ -c $ARG3$
command[check_nt_pagingfile_Server]=$USER1$/check_nt -H $HOSTADDRESS$ -P
1248 -p xxxxx -v COUNTER -l " \\Paging <file://\\Paging> File(_Total)\\%
Usage","Paging File usage is %.2f %%" -w $ARG1$ -c $ARG2$
Here is my commands. Note 127.0.0.1 is not actually IP just replacing the
actual and "xxxxx" is masking the password.
Justin
----- Original Message -----
From: Frater, <mailto:gjfrater at bechtel.com> Greg J
To: 'Peter Pan' <mailto:peterpan at pvamu.edu>
Sent: Monday, November 25, 2002 11:24 AM
Subject: RE: [Nagios-users] Another NSClient question
The registry key holds the password string. You then use (as you
speculated) the -p option on the check_nt command to send the password to
the nt box. When I did it I had to restart the server when after adding the
password to my servers. Restarting the nsclient nt service did not work.
-----Original Message-----
From: Peter Pan [mailto:peterpan at pvamu.edu]
Sent: Monday, November 25, 2002 8:50 AM
To: nagios
Subject: [Nagios-users] Another NSClient question
I understand that I can put the key in the registry under HKEY_LOCAL_MACHINE
-> SOFTWARE -> NSClient -> Params -> password, and modify it to suit
whichever password I choose. But I am a little confused about what config
file I store this password in on the Nagios box. I was thinking I used the
"-p" flag in the commands configuration file, then the password following.
But I must be forgetting something. Any ideas would be great, thanks guys
Justin
DISCLAIMER: This electronic message together with any attachments is
confidential. If you are not the intended recipient, do not copy, disclose or
use the contents in any way. Please also advise us by return e-mail that you
have received the message and then please destroy. Carter Holt Harvey is not
responsible for any changes made to this message and / or any attachments after
sending by Carter Holt Harvey. We use virus scanning software but exclude all
liability for viruses or anything similar in this email or any attachment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021126/920fe2cf/attachment.html>
More information about the Users
mailing list