Page 1 of 1

CRITICAL: Incorrect credentials given alerts

Posted: Thu Apr 30, 2020 5:13 pm
by ncmpoli
Hi there, I installed NagiosXI on my network and connected four servers using the NCPA agent. The servers show up in Nagios dashboard but I'm constantly getting "CRITICAL: Incorrect credentials given" alerts. I'm not sure what credentials is the message referring to. Can anyone shed some light please?

Thanks,
Michael

Re: CRITICAL: Incorrect credentials given alerts

Posted: Fri May 01, 2020 9:45 am
by tgriep
The check_ncpa plugin uses a token to connect to the NCPA agent's community_string that is defined in the ncpa.cfg file on the remote host.
If they do not match, you get the invalid credentials message.

Go to the remote hosts and look at the community_string settings in the ncpa.cfg file, if it does not match the token used in the check on the Nagios server, update it and restart the NCPA agent.
That should fix the issue.

Re: CRITICAL: Incorrect credentials given alerts

Posted: Sat May 02, 2020 2:34 am
by ncmpoli
Thanks for the reply. I checked the community string token in the ncpa.cfg file and it matches the token used tocheck on the Nagios server, but the issue is not fixed. I setup four servers and all are giving me the same credentials error. Not sure where to go from here.

Re: CRITICAL: Incorrect credentials given alerts

Posted: Mon May 04, 2020 9:06 am
by tgriep
To troubleshoot this further, I will need to see the full ncpa.cfg file and how the checks are defined on the Nagios XI server so I can check the syntax.
Can you post them?
One thing to look in to is if the token has any special characters in it, if so, they will have to be escaped or changed.

Re: CRITICAL: Incorrect credentials given alerts

Posted: Mon May 04, 2020 10:15 am
by ncmpoli
I do have a few special characters in the token. I have a couple of questions:
1. How do I escape those special characters? Do I have to escape them on the Nagios servers as well? How?
2. If I replace those special characters in the ncpa.cfg file with letters and numbers, how do I change the token on the Nagios server to match this new token?
Thanks

Re: CRITICAL: Incorrect credentials given alerts

Posted: Mon May 04, 2020 12:05 pm
by tgriep
First thing, make sure you are using the latest version on the NCPA wizard as it has been updated to take care of special character, user macros which will address the issue you are having.

Log in to the XI GUI and going to the Admin > Manage Config Wizards menu.
Click the Check for Updates button and update the wizards on the server.
The latest NCPA wizard is version 2.2.4 so make sure you have that installed.

This may not fix the current checks on the server so the quickest way is to either delete the current checks and re-run the wizard to re-create them.

For number 2.
If you want to to edit the existing commands, the following link has instructions for editing Service checks in the Core Config Manager.
https://support.nagios.com/kb/article/n ... t-539.html

For number 1.
The following document has some examples in escaping special characters.
https://support.nagios.com/kb/article/n ... s-580.html