Possible to get ping status from private ip machines
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
yea I tried that way but from the host server the script is working but when I'm trying from the Nagios server I'm getting output like https://prnt.sc/qf15ff
Can you write for me an exact code to work it well?
Can you write for me an exact code to work it well?
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
when i go for another script https://prnt.sc/qf1bn7 im getting a warning message in nagios server instead of Critical message
Can you please tell me the issue and how it makes Critical once the ping is failed?
This is what im getting in Nagios Server: https://prnt.sc/qf1c5p
Can you please tell me the issue and how it makes Critical once the ping is failed?
This is what im getting in Nagios Server: https://prnt.sc/qf1c5p
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
how to check a remote service status ?
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
can you please tell me why im getting this error when im running a command like this
https://prnt.sc/qfby4p
https://prnt.sc/qfby4p
Re: Possible to get ping status from private ip machines
Okay, let's troubleshoot one issue at a time here. Let's stick to the ping check and get that working first.
So for this screenshot, https://prnt.sc/qf15ff it doesn't like the double square brackets. Let's try the double square brackets as single square brackets. For example,
So for this screenshot, https://prnt.sc/qf15ff it doesn't like the double square brackets. Let's try the double square brackets as single square brackets. For example,
Code: Select all
while [ $count -ne 0 ] ; do
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
currently, I'm using the below script to check it , if it is pinging right im getting and okay status if the ping fail im getting the Critical status , since I'm not passing any arguments if the condition fails
#!/bin/bash
ping -c1 10.47.76.119 > /dev/null
if [ $? -eq 0 ]
then
echo ok
exit 0
else
exit 2
fi
what is the exact format to pass the arguments correctly in Nagios?
#!/bin/bash
ping -c1 10.47.76.119 > /dev/null
if [ $? -eq 0 ]
then
echo ok
exit 0
else
exit 2
fi
what is the exact format to pass the arguments correctly in Nagios?
Re: Possible to get ping status from private ip machines
Oh, I completely overlooked the fact that we are running this script on a Linux machine. You can probably just copy over check_ping from your Nagios machine, and call that. That will likely be easier. My apologies for not connecting the dots sooner.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
is this correct one?
Re: Possible to get ping status from private ip machines
It didn't get attached. But it's the check_ping file in /usr/local/nagios/libexec/ on your Nagios server.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Nov 08, 2019 2:40 am
Re: Possible to get ping status from private ip machines
I think you didn't get my Question So far,
I am using NCPA to check ping status by using a script, Since I'm checking the ping status of another system( not installed ncpa, nrpe in it ) it has only access from the host server, no other external communication to that machine
I can only use the check ping if I have installed nrpe and also it should have an external IP to connect internet I guess,
In my case, the host machine only having access to the particular machine and i want to know the live ping status of the same machine which doesn't have an external IP to connect Internet
I am using NCPA to check ping status by using a script, Since I'm checking the ping status of another system( not installed ncpa, nrpe in it ) it has only access from the host server, no other external communication to that machine
I can only use the check ping if I have installed nrpe and also it should have an external IP to connect internet I guess,
In my case, the host machine only having access to the particular machine and i want to know the live ping status of the same machine which doesn't have an external IP to connect Internet