You are here
Home > Linux System Administration > How To Install Collectd On CentOS 7

How To Install Collectd On CentOS 7

How to install CollectD on Centos 7

Collectd is a daemon which collects system performance data and and metrics. It runs as a daemon and the data collectd collects can either be processed locally or sent to a central logging server. It is easy to configure and setup and can be configured to report to various metric analytics platforms. . This is is a guide to install the CollectD daemon on Centos 7. You can read more about the project here.

Install CollectD

Make sure everything is up to date:

yum update
yum upgrade

The CollectD packages are containined the EPEL repository so you will need to install that:

yum install epel-release

The install the CollectD package itself:

yum install collectd

Configure CollectD

Once it has been installed you can edit the configuration to match what you need to monitor. The Collectd configuration is located at /etc/collectd.conf there are numerous plugins you can enable to monitor different aspects of the server or services. In this particular guide we are just going to leave the base install.  We are just going to update the hostname:

nano /etc/collectd.conf

Un-comment this line and configure it to match your servers hostname

#Hostname "localhost"

If this hostname does not actually resolve you will want to uncomment

#FQDNLookup true

And set it to false

FQDNLookup false

You will need to enable CollectD on CentOS 7:

systemctl enable collectd

Then you can go ahead and start the logging daemon:

systemctl start collectd

You can verify its running by checking its status

# systemctl status collectd
● collectd.service - Collectd statistics daemon
 Loaded: loaded (/usr/lib/systemd/system/collectd.service; disabled; vendor preset: disabled)
 Active: active (running) since Wed 2017-09-06 22:05:51 EDT; 4 days ago
 Docs: man:collectd(1)
 Main PID: 8497 (collectd)
 CGroup: /system.slice/collectd.service
 └─8497 /usr/sbin/collectd

You are looking for a ‘Active: active (running)’ running status.  That’s it for installing the service itself, we will be releasing more guides on how to configure various platforms for it to report to.

Leave a Reply

Notify of