5

I have installed collectd and got it running but also wanted to use the Ping plugin ( https://collectd.org/wiki/index.php/Plugin:Ping ) but it's not actually installed by default (i.e. not in the list of plugins in /opt/collectd/lib/collectd

How do I install a plugin that doesn't come with collectd and where do I get the plugin itself?

I have been Googling in circles for this but can't find anything.

Thanks,

Iain
  • 91
  • 1
  • 1
  • 6
  • I had installed the liboping required library and tried reinstalling collectd in case this might help, but it didn't. There was a "no" beside it (ping plugin) when installing but no dependency listed beside it and still no ping plugin in the plugin directory. – Iain Apr 02 '14 at 15:42

2 Answers2

3

Figured it out at last. I installed the EPEL Repos and then did the following (for CentOS anyway):

# Install collectd-ping plugin. See http://www.rpmfind.net//linux/RPM/fedora/devel/rawhide/x86_64/c/collectd-ping-5.4.1-2.fc21.x86_64.html and above for versions

yum install collectd-ping.x86_64

cp /usr/lib64/collectd/ping.so /opt/collectd/lib/collectd/

Now when I run collectd I don't get my old error: "Found a configuration for the `ping' plugin, but the plugin isn't loaded or didn't register a configuration callback."

I get another error "ping plugin: ping_host_add (10.0.1.29) failed: No such device" but from Googling and looking at the Collectd FAQ, this one should be easier to solve!

Iain
  • 91
  • 1
  • 1
  • 6
  • Unfortunately the above gave me an old version of the collectd-ping plugin so I had to go with the below compiling of the source. ' cd /tmp wget ftp://mirror.switch.ch/pool/4/mirror/fedora/linux/development/rawhide/x86_64/os/Packages/c/collectd-ping-5.4.1-2.fc21.x86_64.rpm rpm2cpio collectd-ping-5.4.1-2.fc21.x86_64.rpm | cpio -vid cp /tmp/usr/lib64/collectd/ping.so /opt/collectd/lib/collectd/ ' – Iain Apr 30 '14 at 10:17
1

You can enable any plugin you like in /etc/collectd/collectd.conf by uncommenting the plugin line:

# /etc/collectd/collectd.conf

#LoadPlugin perl
LoadPlugin ping
#LoadPlugin powerdns

and the ping config:

<Plugin ping>
       Host "host.foo.bar"
       Host "host.baz.qux"
       TTL 255
</Plugin>

If you did not find a plugin, that possibly means there is no plugin. If you want to write a plugin, just get the collectd sources and read the doc's. There are a lot of examples on how to write plugins.

  • Thanks but unfortunately I had already done that at the beginning. It seems the plugin is a part of CollectD but will only be added at install if certain conditions are meet, but since no dependencies are listed beside the plugin name during install. I don't know what is missing or the problem. – Iain Apr 06 '14 at 18:54