voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 227 forks source link

PrivateDevices=yes stops fping from working on Ubuntu 18.04 #609

Closed trenta closed 4 years ago

trenta commented 5 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

What are you seeing

All simple ICMP ping checks failing

What behaviour did you expect instead

Output log

fping failed: (null): can't create socket (must run as root?) : Permission denied

Any additional information you'd like to impart

This was found https://bugs.archlinux.org/task/60113

I understand that Ubuntu 18.04 isn't supported by this module yet though.

grunt009 commented 5 years ago

Same issue here, use of NoNewPrivileges=no seems not to work and produces the same error. This also prevents use of ping in the web interface.

luisgalang commented 5 years ago

Hi, You should do two steps to get fping working in zabbix on Ubuntu 18.04:

I guess template file from the repo should be updated (https://github.com/voxpupuli/puppet-zabbix/blob/master/templates/zabbix-server-systemd.init.erb) to comment that line.

jordips commented 5 years ago

Same issue here. We are using it with ubuntu 18.04. I don't know if it's really useful in this case... but this prevents zabbix to work properly using fping.

Samgarr commented 5 years ago

Also issue here. According to docs, PrivateDevices=yes implies NoNewPrivileges=yes, which prevent gaining pinger process setuid privileges or capabilities.

xray-sky commented 5 years ago

I found that simply changing PrivateTmp=yes to PrivateTmp=no was all that was needed to fix the fping failure on the zabbix server in 18.04. Be nice to get this addressed one way or another, though.

The proxies are working with fping on 18.04 as-is (or at least I'm not seeing the same errors in the proxy logs).