3

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
</Plugin>


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
</Plugin>

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:
https://github.com/httpdss/collectd-web
https://github.com/collectd/collectd/tree/master/contrib/php-collection

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
</Directory>

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

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

Harikrishnan
  • 1,057
  • 2
  • 14
  • 31
Mo Beigi
  • 141
  • 1
  • 5

1 Answers1

2

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.

David B.
  • 466
  • 1
  • 3
  • 12