Page 1 of 1
Host Status understanding
Posted: Thu Sep 12, 2019 8:59 am
by meganwilliford
We have a scenario where a handful of remote windows servers with ncpa were imported using the bulk add configuration wizard. The host statuses were all reporting as "Up" but all of the service checks were reporting as "Critical" because they were timing out. We found out we weren't able to ping them locally because they are in a closed network which make sense to us. So my question is, since the host status was reporting as "Up" what exactly is that checking? For more information, I did a test and removed one of the hosts that was bulk added and re-added it manually using the NCPA config wizard and there it was not able to connect.
Re: Host Status understanding
Posted: Thu Sep 12, 2019 1:17 pm
by benjaminsmith
Hi Megan,
If you go to Configure > CCM > Hosts and select one of the hosts created by the wizard and take a look at either the command or template. Most of the hosts created by wizards in Nagios XI are using the following check command (
check_icmp ) which is a ping check.
Code: Select all
$USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -p 5
As far as the services timing out, try running them from directly from the command line to see if you get the same behavior. You made need to just increase the timeout settings on those checks.
How to Test Check Commands from the Command-line
Re: Host Status understanding
Posted: Thu Nov 07, 2019 12:55 pm
by meganwilliford
Thank you! That makes sense. Is there a check that exists that would verify the Nagios XI server can communicate with the NCPA on the remote server?
Re: Host Status understanding
Posted: Thu Nov 07, 2019 1:50 pm
by lmiltchev
You could use the following URL to test the connection:
Code: Select all
https://ip:5693/testconnect/?token=mytoken
From command line:
Code: Select all
curl -k "https://x.x.x.x:5693/testconnect/?token=bla"
{
"error": "Bad token."
}
Code: Select all
curl -k "https://x.x.x.x:5693/testconnect/?token=mytoken"
{
"value": "Success."
}
Let us know if you have any further questions.
Re: Host Status understanding
Posted: Wed Nov 13, 2019 1:27 pm
by dbcummings
So, could we update the xiwizard_ncpa_host to use a custom plugin we build that verifies the NCPA api rather than using check_icmp?
Re: Host Status understanding
Posted: Wed Nov 13, 2019 1:51 pm
by lmiltchev
Absolutely - you can modify the host template to your liking. I would recommend that you create a copy (backup) of the "original" xiwizard_ncpa_host template before modifying it (just to be on the safe side).
Let us know if you have any further questions.