[Solution] Cacti + RRDTool. Graph not working problem fixed

By | November 29, 2014

If you have problems with graph in your Cacti first what you should do is enable debug mode in Cacti.

To enable debug mode:

  1. Go to “Graph Management
  2. Open any graph (Localhost – Load Average)
  3. Press “Turn On Graph Debug Mode.

Now you should see something like this:

RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='Localhost - Load Average' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent='0' \
--vertical-label='processes in the run queue' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/var/lib/cacti/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE \
DEF:b="/var/lib/cacti/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE \
DEF:c="/var/lib/cacti/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1417293918,GT,a,a,UN,0,a,IF,IF,TIME,1417293918,GT,b,b,UN,0,b,IF,IF,TIME,1417293918,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00FF:"1 Minute Average" \
GPRINT:a:LAST:" Current\:%8.2lf\n" \
AREA:b#EA8F00FF:"5 Minute Average":STACK \
GPRINT:b:LAST:" Current\:%8.2lf\n" \
AREA:c#FF0000FF:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
RRDTool Says:

If under “RRDTool Says:” you see something about not existing file, then you should check permissions to your rra folder. In my case it is: “/var/lib/cacti/rra/“. So this folder should have write permissions for www-data user (or your web server user).

If a spot under “RRDTool Says:is empty, then you should check if rrdtool is working well.

Go to ssh and run command that you see in cacti, but add redirection to a file. If rrdtool generate the valid file it means you probably have problems with your php configuration.

Go to /etc/php5/apache2/php.ini and ensure that you have no popen in disable_functions list.

Removing popen from disable_functions list should solve your problem.

3 thoughts on “[Solution] Cacti + RRDTool. Graph not working problem fixed

  1. Edgar Durán

    Hi, I installed cacti 0.8.8.f on Ubuntu, and I have the same error: “RRDTool Says:” you see something about not existing file” but I couldn’t solve it, maybe because I have the rra folder inside cacti (/var/www/html/cacti/)

    I hope you could help me please! (sorry for my english)

  2. Elmer Tataro

    Hi, Can any suggest on my error. It’s running under windows server 2008.

    RRDTool Says:
    ERROR: opening ‘C:/inetpub/wwwroot/cacti-0.8.8h/rra/cacti_server_traffic_in_35.rrd’: No such file or directory

    really appreciate your inputs.


  3. Cliff

    Hi guys I tried to enable the graph debug mode and “RRDTool Says: OK ”
    But still cant see a traffic on graph its still NAN.
    Hope yo can help me
    I install the cacti on Centos7


Leave a Reply

Your email address will not be published. Required fields are marked *