So I am trying to setup Collectd to gather resource usage data and view it in graph format. I'm using Centos 6.8 with Apache 2.4 (if that matters). However, I am unable to display any data.

I feel all my configuration files are correct.
Here is all the relevant parts of the collectd.conf file:

Hostname    "localhost"
FQDNLookup   false
BaseDir     "/var/lib/collectd"
PIDFile     "/var/run/collectd.pid"
PluginDir   "/usr/lib64/collectd"
TypesDB     "/usr/share/collectd/types.db"
Interval     10
Timeout      2
ReadThreads  5

LoadPlugin syslog

<Plugin syslog>
LogLevel info

LoadPlugin cpu
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin rrdtool

Include "/etc/collectd.d"

<Plugin rrdtool>
  DataDir "/var/lib/collectd/rrd/"
  CacheTimeout 120
  CacheFlush   900

I can confirm that rrd files are being made:

[root@atom collectd]# ls /var/lib/collectd/rrd/
atom.hackavistic.com  localhost

So I am trying to use a display tool, i've tried two:

I've setup both correctly pointing them to the /var/lib/collectd/rrd directory but they both fail to show any data. Its important to note they don't allow me to select a host etc so I feel like this is a permission issue but the /var/lib/collectd/rrd directory is world readable.

I also have this in collectd.conf as an addition apache include:

Alias /php-collection/ /var/www/php-collection/
<Directory /var/www/php-collection/>
    DirectoryIndex index.php
    Options -Indexes
    AddType application/x-httpd-php .php

Alias /collectd-web/ /var/www/collectd-web/
<Directory /var/www/collectd-web/>
    Options +Indexes
    AllowOverride all

Note: I have also used the standalone web server by running runserver.py with python but it produces the same results.


You could use RRDtool to display a graph from the data contained in your .rrd files.

So the command would be something along those lines:

rrdtool graph yourgraph.png DEF:pkt=yourdatafile.rrd... (you would need other parameters there).

Perhaps this other link helps too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.