显示ping_host_add的收集ping插件失败

时间:2016-09-30 06:05:07

标签: collectd

安装collectd ping插件并启动collectd后,/ 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>

1 个答案:

答案 0 :(得分:0)

我也遇到了这个问题,来自收集的ping插件的权限被拒绝消息。 SELinux阻止了ping插件的访问,即使我以root身份运行时也是如此。要解决此问题,我将SELinux设置为宽松:

setenforce Permissive

可能有一种更外科的方法来设置SELinux,而不必将其设置为宽松。