在安装集合体ping插件并启动集合体之后,/var/log/messages中会显示以下内容
Sep 29 22:35:36 localhost collectd[77162]: ping plugin: ping_host_add (1.2.3.5) failed: Operation not permitted
Sep 29 22:35:36 localhost collectd[77162]: ping plugin: No host could be added to ping object. Giving up.
Sep 29 22:35:46 localhost collectd[77162]: ping plugin: The ping thread had a problem. Restarting it.
Sep 29 22:35:46 localhost collectd[77162]: read-function of plugin `ping' failed. Will suspend it for 20.000 seconds.
Sep 29 22:35:46 localhost collectd[77162]: ping plugin: ping_host_add (1.2.3.5) failed: Operation not permitted
Sep 29 22:35:46 localhost collectd[77162]: ping plugin: No host could be added to ping object. Giving up.
Sep 29 22:36:06 localhost collectd[77162]: ping plugin: The ping thread had a problem. Restarting it.
Sep 29 22:36:06 localhost collectd[77162]: read-function of plugin `ping' failed. Will suspend it for 40.000 seconds.以下是collectd.conf中的ping插件配置
LoadPlugin ping
<Plugin ping>
Host "1.2.3.5"
Interval 1.0
Timeout 0.9
TTL 255
SourceAddress "1.2.3.4"
Device "eth0"
MaxMissed -1
</Plugin>发布于 2019-06-18 10:47:32
我也遇到过这个问题,来自集合式ping插件的权限被拒绝的消息。SELinux阻止了ping插件的访问,甚至当我以根用户身份运行collectd时也是如此。为了解决这个问题,我将SELinux设置为permissive:
setenforce Permissive可能有一种更复杂的方法来设置SELinux,使其不必将其设置为permissive。
https://stackoverflow.com/questions/39784723
复制相似问题