Possible to get ping status from private ip machines

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Possible to get ping status from private ip machines

Post by mbellerue »

If you don't already have a check_ncpa command defined in commands.cfg, that will be pretty easy to take care of. I would recommend something like this.

Code: Select all

define command {
        command_name            check_ncpa
        command_line            $USER1$/check_ncpa.py -H $HOSTADDRESS$ -t $ARG1$ -M $ARG2$ -a $ARG3$
}
For your service definition, your check_command will look something like this,

Code: Select all

check_command    check_ncpa!ASecretToken!plugins/check_ping!'-H <internal_IP> -w 70,2% -c 80,5%'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Possible to get ping status from private ip machines

Post by epixelitsupport »

I added Service Like this in cfg file

https://prnt.sc/qkilu0
but im getting critical error in nagios dashboard . https://prnt.sc/qkimd9


When i click on it https://prnt.sc/qkims0

Can you suggest me a solution
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Possible to get ping status from private ip machines

Post by mbellerue »

Can you post your check_ncpa command definition from commands.cfg? I think the issue may be there.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Possible to get ping status from private ip machines

Post by epixelitsupport »

here it is

define command {
command_name check_ncpa
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Possible to get ping status from private ip machines

Post by mbellerue »

Ah, there it is. It's only expecting 1 argument, and we're passing 3. Change it to this, and we should be good to go.

Code: Select all

command_line            $USER1$/check_ncpa.py -H $HOSTADDRESS$ -t $ARG1$ -M $ARG2$ -a $ARG3$
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Possible to get ping status from private ip machines

Post by epixelitsupport »

I CHANGES AS YOU MENTIONED SO IM GETTING THIS ERROR

https://prnt.sc/qkj5le

SO SETTINGS ARE REVERTED BACK
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Possible to get ping status from private ip machines

Post by mbellerue »

That's progress though. That error message 'Incorrect credentials given' means that Nagios actually reached out to NCPA on the remote machine. So now go into your service definition and verify that your token is correct.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Possible to get ping status from private ip machines

Post by epixelitsupport »

so you mean it will get work>?

okay let me do that
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Possible to get ping status from private ip machines

Post by mbellerue »

It will work, once you verify that your token is correct. Because right now, NCPA is saying that it doesn't recognize the token that you gave it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epixelitsupport
Posts: 85
Joined: Fri Nov 08, 2019 2:40 am

Re: Possible to get ping status from private ip machines

Post by epixelitsupport »

i dont think so... token looks correct
and all my servers which installed ncpa becomes unknown https://prnt.sc/qkjhzn
Locked