Page 6 of 6
Re: Possible to get ping status from private ip machines
Posted: Thu Jan 09, 2020 5:03 pm
by epixelitsupport
benjaminsmith wrote:Hello
@epixelitsupport,
Glad Michael was able to help you set up the ping check on the private host with NCPA.
If you'd like to set this up for another service, follow the same process as described in this post.
Happy to hear that!! So please take me to the solutions
Re: Possible to get ping status from private ip machines
Posted: Thu Jan 09, 2020 5:24 pm
by benjaminsmith
Hello,
Follow the same steps to create the new service as you've done before and explained in this thread. If you get a specific error message, please post it and we'll try to help you resolve the error.
Re: Possible to get ping status from private ip machines
Posted: Sat Jan 11, 2020 12:25 am
by epixelitsupport
mbellerue wrote:Okay, are you allowed to install NCPA on the machine with the internal IP address? If so, just copy check_ncpa.py from your Nagios server over to the machine with the external IP address, and then build your check command. You will do basically the same process that you did with check_ping. Your end command might look something like this.
Code: Select all
check_command check_ncpa!-t 'ASecretToken' -M plugins/check_ncpa.py -a "check_ncpa.py -H <internal_IP> -t '<internal_token>' -M 'services' -q 'service=<your_service_name>,status=running'"
Please make careful note of the usage of single and double quotes.
Everything you need should be in this thread, and you can use your existing check_ping service as a guide.
As you said I have installed ncpa in private IP machine and copy check_ncpa.py from your Nagios server over to Public IP machine (usr/local/ncpa/plugins/check_ncpa.py) then I added the command in Nagios server
But I'm getting an unknown error here in the Dashboard.
https://prnt.sc/qm4n7w
https://prnt.sc/qm4ncb
Re: Possible to get ping status from private ip machines
Posted: Mon Jan 13, 2020 6:12 pm
by benjaminsmith
Hello,
OK. Thank you for posting screenshots of the error message. Since it's a 500 error, this is at the server level.
1. Are you able to run a simple command from the public machine to the private machine? Post the output to the following command.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -v -t 'test_token' -P 5693 -M 'system/version'
2. Set the log level on NCPA in the private host to debug, and post your ncpa_listener.log from the client? For a Linux system, this can be found in the following directory.
Code: Select all
/usr/local/ncpa/var/log/ncpa_listener.log
See:
https://www.nagios.org/ncpa/help.php#in ... leshooting
3. Are you able to log into the web interface for NCAP on the private machine?
Re: Possible to get ping status from private ip machines
Posted: Wed Jan 15, 2020 1:48 am
by epixelitsupport
benjaminsmith wrote:Hello,
OK. Thank you for posting screenshots of the error message. Since it's a 500 error, this is at the server level.
1. Are you able to run a simple command from the public machine to the private machine? Post the output to the following command.
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -v -t 'test_token' -P 5693 -M 'system/version'
2. Set the log level on NCPA in the private host to debug, and post your ncpa_listener.log from the client? For a Linux system, this can be found in the following directory.
Code: Select all
/usr/local/ncpa/var/log/ncpa_listener.log
See:
https://www.nagios.org/ncpa/help.php#in ... leshooting
3. Are you able to log into the web interface for NCAP on the private machine?
This is the output I'm getting when running from the external IP machine
https://prnt.sc/qnvd9a
after that, I have moved check_ncpa.py to /usr/local/nagios/libexec/
after I run the same then I'm getting the error like
https://prnt.sc/qnvgml
Please find it and please let me know the solution
This is the log from External IP machine :
https://prnt.sc/qnvktj
This is the log in Internal IP Machine :
https://prnt.sc/qnvlc2
Re: Possible to get ping status from private ip machines
Posted: Wed Jan 15, 2020 10:01 am
by mbellerue
Ah, it's an Ubuntu machine. Run apt install python2.7 on the external machine, and that should allow you to run the check_ncpa.py script.
Re: Possible to get ping status from private ip machines
Posted: Fri Jan 17, 2020 8:24 am
by epixelitsupport
mbellerue wrote:Ah, it's an Ubuntu machine. Run apt install python2.7 on the external machine, and that should allow you to run the check_ncpa.py script.
As you said I have installed python 2.7 in External IP server,
root@Back-Office-Elite-Mortgage-Server:/home/ubuntu# python3 -V
Python 3.6.8
That was not worked, So I tried sudo apt-get install python2.7-minimal
Then it is started to work!!
Awesome Thanks for your wonderful help!!! Appreciated
Re: Possible to get ping status from private ip machines
Posted: Mon Apr 20, 2020 2:13 pm
by epixelitsupport
How can i check disk space and CPU utilisation in the private IP machine?
is it possible to check via ncpa? because I have already installed ncpa in the private IP server