Is there a difference on the check_ping call when running the command from ssh vs. webgui?
It seems that mine fails on the WebGUI.
from SSH
[root@srv-mon-nsb1 libexec]# ./check_ping -H srv-files-nsb1 -w 10,100% -c 50,100%
PING OK - Packet loss = 0%, RTA = 0.41 ms|rta=0.415000ms;10.000000;50.000000;0.000000 pl=0%;100;100;0
from WebGUI
COMMAND: /usr/local/nagios/libexec/check_ping -H srv-web-nsb1 -w 10,100% -c 50,100% -p 5
OUTPUT: PING CRITICAL - Packet loss = 100%|rta=50.000000ms;10.000000;50.000000;0.000000 pl=100%;100;100;0
check_ping works in ssh but not on web-gui?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_ping works in ssh but not on web-gui?
Just to verify, are you getting this output from the test command button or by letting the command run via normal nagios scheduler? Otherwise to my knowledge there is not a difference, unless selinux or something does not give the executing user permission to exit the system with a ping.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: check_ping works in ssh but not on web-gui?
This is run from a SSH command line when it has success with the PING.
Re: check_ping works in ssh but not on web-gui?
Is selinux enabled?
Can you run the check from the cli as user apache?
Have you tried configuring the check in XI and letting the nagios scheduler run the check normally (rather than using the test check command button).
Code: Select all
getenforceCode: Select all
su - apache -c "./check_ping -H srv-web-nsb1 -w 10,100% -c 50,100% -p 5" Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check_ping works in ssh but not on web-gui?
hmm cannot run this command with the user apache.
Code: Select all
[root@srv-mon-nsb1 libexec]# su - apache -c "./check_ping -H srv-web-nsb1 -w 10,100% -c 50,100% -p 5"
This account is currently not available.Re: check_ping works in ssh but not on web-gui?
Run the following commands and show the output:
Code: Select all
ll /bin/ping
ll /usr/local/nagios/libexec/check_pingBe sure to check out our Knowledgebase for helpful articles and solutions!