Page 1 of 1
NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 12:41 am
by Depenning Company
Dear All,
I am getting below error in Nagios
Status : Unknown
Status Information : NSClient - ERROR:Invalid password
For Windows C Drive Space and D Drive space
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 1:45 am
by kg2857
The nsclient password in XI is typically defined in resources.cfg. It needs to match the password probably defined in nsclient.ini if I recall.
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 1:50 am
by Depenning Company
Dear All,
Below steps is the procedure to solve this error
If you specified a password in the NSClient++ configuration file on the Windows machine, you'll need to modify the check_nt command definition to include the password. Open the commands.cfg file for editing.
vi /usr/local/nagios/etc/objects/commands.cfg
Change the definition of the check_nt command to include the "-s <PASSWORD>" argument (where PASSWORD is the password you specified on the Windows machine) like this:
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s PASSWORD -v $ARG1$ $ARG2$
}
Save the file.
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 2:40 am
by kg2857
Probably a better way is to do things as NXI is set up as I explained above.
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 2:53 am
by Depenning Company
Dear Kg2857,
Kindly share me the steps how to check nsclient defined password in resources.cfg
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 3:13 am
by kg2857
The command has the macro (think variable) $USERx$ that's defined in the resources.cfg file.
The command provides a bit of abstraction/security between allowing a service running actual shell commands vs nagios commands. It's a bit confusing at first I know.
Re: NSClient - ERROR:Invalid password
Posted: Thu Feb 01, 2024 11:19 am
by swolf
Depenning Company wrote: ↑Thu Feb 01, 2024 2:53 am
Dear Kg2857,
Kindly share me the steps how to check nsclient defined password in resources.cfg
Hi
@Depenning Company,
To check the resources.cfg file, Go to Configure -> CCM -> Tools -> User Macros. On that page, you may have to click the Gear icon to configure the User Macro component - you'll want to make sure that "Redact Displayed Values" is unchecked. Once you've configured the component, you should be able to see the full file in cleartext.