Page 2 of 6
Re: Possible to get ping status from private ip machines
Posted: Tue Dec 24, 2019 1:56 am
by epixelitsupport
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?
Re: Possible to get ping status from private ip machines
Posted: Tue Dec 24, 2019 2:13 am
by epixelitsupport
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
Re: Possible to get ping status from private ip machines
Posted: Tue Dec 24, 2019 12:54 pm
by epixelitsupport
how to check a remote service status ?
Re: Possible to get ping status from private ip machines
Posted: Tue Dec 24, 2019 3:29 pm
by epixelitsupport
can you please tell me why im getting this error when im running a command like this
https://prnt.sc/qfby4p
Re: Possible to get ping status from private ip machines
Posted: Thu Dec 26, 2019 11:10 am
by mbellerue
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,
Re: Possible to get ping status from private ip machines
Posted: Fri Dec 27, 2019 3:37 am
by epixelitsupport
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?
Re: Possible to get ping status from private ip machines
Posted: Fri Dec 27, 2019 10:27 am
by mbellerue
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.
Re: Possible to get ping status from private ip machines
Posted: Fri Dec 27, 2019 1:53 pm
by epixelitsupport
is this correct one?
Re: Possible to get ping status from private ip machines
Posted: Fri Dec 27, 2019 2:24 pm
by mbellerue
It didn't get attached. But it's the check_ping file in /usr/local/nagios/libexec/ on your Nagios server.
Re: Possible to get ping status from private ip machines
Posted: Sun Dec 29, 2019 3:35 am
by epixelitsupport
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