NSClient - ERROR:Invalid password

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
Depenning Company
Posts: 6
Joined: Tue Jan 30, 2024 6:35 am

NSClient - ERROR:Invalid password

Post 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
kg2857
Posts: 500
Joined: Wed Apr 12, 2023 5:48 pm

Re: NSClient - ERROR:Invalid password

Post 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.
Depenning Company
Posts: 6
Joined: Tue Jan 30, 2024 6:35 am

Re: NSClient - ERROR:Invalid password

Post 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.
kg2857
Posts: 500
Joined: Wed Apr 12, 2023 5:48 pm

Re: NSClient - ERROR:Invalid password

Post by kg2857 »

Probably a better way is to do things as NXI is set up as I explained above.
Depenning Company
Posts: 6
Joined: Tue Jan 30, 2024 6:35 am

Re: NSClient - ERROR:Invalid password

Post by Depenning Company »

Dear Kg2857,

Kindly share me the steps how to check nsclient defined password in resources.cfg
kg2857
Posts: 500
Joined: Wed Apr 12, 2023 5:48 pm

Re: NSClient - ERROR:Invalid password

Post 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.
swolf

Re: NSClient - ERROR:Invalid password

Post 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.
Post Reply