-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Ping #231
Comments
Are you setting up a new ping check or is this the default ping check on the icinga server? |
@jjethwa This was a new ping check, code below: object Host "NAME" { Nothing complex, wonder if doing something silly, command below works okay from the root account and tried from nagios account and got the ^ error. Plugin Output |
Does the default icinga2 server hostalive check work? The URL is http://<YOUR_SERVER_IP>:/icingaweb2/dashboard#!/icingaweb2/monitoring/host/show?host=icinga2 That uses the hostalive check_command as well |
Yes unfortunatly also getting the error on that with the following output: :( /bin/ping -4 -n -U -w 30 -c 5 127.0.0.1 Unsure what is going on, any idea of next steps? |
Bit more info, on the same Docker Host have done a diff test: And looks like getting the same output as above, also getting: Check execution Happy to provide or try anything needed. |
Thanks for the details @amcmorris-piksel The full command is:
|
Thanks for that, just tried the below on a fresh image. root@icinga2:/usr/lib/nagios/plugins# sudo -u nagios /usr/lib/nagios/plugins/check_ping '-4' '-H' '127.0.0.1' '-c' '200,15%' '-w' '100,5%' I think this is an issue with the Docker host from some searching around: Just not sure what the equivalent will be to get this working in Ubuntu 16.04 |
Ah, I had forgotten about that issue. Try adding the --privileged flag to the docker run command and see if that works |
Thanks, wish that worked, tried: But got: [2020-06-17 14:29:50 +0000] warning/PluginNotificationTask: Notification command for object 'icinga2' (PID: 2297, arguments: '/etc/icinga2/scripts/mail-host-notification.sh' '-4' '127.0.0.1' '-6' '::1' '-b' '' '-c' '' '-d' '2020-06-17 14:29:50 +0000' '-l' 'icinga2' '-n' 'icinga2' '-o' '/bin/ping -4 -n -U -w 30 -c 5 127.0.0.1 Just does not like this version of docker it looks like. :( |
So bizarre. Maybe you can try running it on one of the container Linux distros like Flatcar? |
Going to move the PoC to AWS rather than use our on premises Docker Hosts, thanks for the help. |
I had this happen to me as well with CentOS. One of the symptoms were that the ping processes were not being terminated properly and ended up as zombie processes. This would go on until eventually there were no resources available. I never solved it but hope this information helps. |
Thanks for the tip, @adamparker Would you be able to test out adding a timeout to your ping config to see if that gets rid of the zombies? |
We're having the same issue on ubuntu 20.04 with no internet access. We have the exact same setup in a Vagrant which works (even without the internet access). It seems to be a rights issue (still not sure why it works on some machines and not on others): looking online for a solution gave me the following:
someone suggested changing the langauge of the system but it's already set to nothing. Looking at the rights on both the server and in the vagrant: I've also looked into the docker versions:
and the server:
|
Hi @Thixx Thanks for all the details, I have not been able to track this down myself. I believe that it is coming down to how the host is handling the socket request. So far I have not run into the issue when using Flatcar as it's the main distro I use for docker containers. |
Hi, I switched check_ping with check_icmp which has resolved the issue for me. Check_ping also gave me trouble with Zombie processes which is described here https://community.icinga.com/t/defunct-zombie-ping-processes-when-using-check-ping-on/7012 |
That's great news, thanks for the update @adamparker 😃 |
I wish that would work for me, but most of the commands can't be used because of the same issue... (check_icmp included) |
Thanks for the update, @Thixx I haven't had time to research more, but I still feel that we need to focus on the host. Could be a tweak to the docker daemon or an OS security setting. |
Yeah, I think you're right! |
Although this is older, but still open. Just installed Icinga2 in an Ubuntu 20.04 LTS LXC (Proxmox) and ran into the same issue. I finally found out that check_ping calls /bin/ping and the user nagios used by Icinga2 could not exute the ping command.
I found in a different threat to execute
and after this command, the problem was solved. |
Hi @AlphaDE Thanks so much for the details! Adding it to the Dockerfile 😄 |
FYI, I've run into a similar problem. (I dont use your Dockerfile) Many distros removed both the s-bit and capabilities to the executable of ping, sometimes relying on other methods to grant users access. Also, container systems (docker, podman, etc.) have a role, in removing capabilities to the container as a whole. Here's what I had to do in my Dockerfile:
and run the container with Hope it helps. |
Thanks for the tip @TheMule71 😃 |
Setting up a new installation and having issues with Ping.
I am getting the following message in the console:
CRITICAL - Could not interpret output from ping command
When do from the command line under root it works, but if I try under nagios I get this error:
ping: socket: Operation not permitted
Anyone else seen this before? I am fairly new to Icinga so just getting my feet together with it.
A.
The text was updated successfully, but these errors were encountered: