2

I've just installed Cacti 0.8.8a from EPEL repo of CentOS 6.4. Everything is fine except the graphs do not show up. I checked the log of httpd then I see:

ERROR: opening '/usr/share/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/usr/share/cacti/rra/localhost_proc_7.rrd': No such file or directory
ERROR: opening '/usr/share/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/usr/share/cacti/rra/localhost_load_1min_5.rrd': No such file or directory

Seems like rrdtool did not generate those files.

This is in /usr/share/cacti

ls -ls /usr/share/cacti
total 872
 8 -rw-r--r-- 1 root  root   5945 Jun 28  2012 about.php
 8 -rw-r--r-- 1 root  root   5348 Jun 28  2012 auth_changepassword.php
16 -rw-r--r-- 1 root  root  14288 Jun 28  2012 auth_login.php
24 -rw-r--r-- 1 root  root  21658 Jun 28  2012 cdef.php
 0 lrwxrwxrwx 1 root  root     18 Jul 25 13:42 cli -> /var/lib/cacti/cli
28 -rwxr-xr-x 1 root  root  26620 Jun 28  2012 cmd.php
 8 -rw-r--r-- 1 root  root   6974 Jun 28  2012 color.php
28 -rw-r--r-- 1 root  root  25068 Jun 28  2012 data_input.php
36 -rw-r--r-- 1 root  root  35505 Jun 28  2012 data_queries.php
60 -rw-r--r-- 1 root  root  60117 Jun 28  2012 data_sources.php
36 -rw-r--r-- 1 root  root  32920 Jun 28  2012 data_templates.php
 8 -rw-r--r-- 1 root  root   6107 Jun 28  2012 gprint_presets.php
 4 -rw-r--r-- 1 root  root   3657 Jun 28  2012 graph_image.php
16 -rw-r--r-- 1 root  root  13469 Jun 28  2012 graph.php
12 -rw-r--r-- 1 root  root   9208 Jun 28  2012 graph_settings.php
20 -rw-r--r-- 1 root  root  17426 Jun 28  2012 graphs_items.php
40 -rw-r--r-- 1 root  root  40166 Jun 28  2012 graphs_new.php
60 -rw-r--r-- 1 root  root  60571 Jun 28  2012 graphs.php
12 -rw-r--r-- 1 root  root  10006 Jun 28  2012 graph_templates_inputs.php
20 -rw-r--r-- 1 root  root  18542 Jun 28  2012 graph_templates_items.php
28 -rw-r--r-- 1 root  root  26703 Jun 28  2012 graph_templates.php
40 -rw-r--r-- 1 root  root  40313 Jun 28  2012 graph_view.php
 8 -rw-r--r-- 1 root  root   6022 Jun 28  2012 graph_xport.php
60 -rw-r--r-- 1 root  root  60031 Jun 28  2012 host.php
20 -rw-r--r-- 1 root  root  20031 Jun 28  2012 host_templates.php
 4 drwxr-xr-x 2 root  root   4096 Jul 25 13:42 images
 4 drwxr-xr-x 4 cacti root   4096 Jul 25 13:50 include
 4 -rw-r--r-- 1 root  root   2313 Jun 28  2012 index.php
 4 drwxr-xr-x 2 root  root   4096 Jul 25 13:42 install
 4 drwxr-xr-x 3 root  root   4096 Jul 25 13:42 lib
 0 lrwxrwxrwx 1 root  root     15 Jul 25 13:42 log -> /var/log/cacti/
 4 -rw-r--r-- 1 root  root   2838 Jun 28  2012 logout.php
 4 drwxr-xr-x 2 root  root   4096 Jul 25 13:42 plugins
28 -rw-r--r-- 1 root  root  27362 Jun 28  2012 plugins.php
 8 -rw-r--r-- 1 root  root   4310 Jun 28  2012 poller_commands.php
 4 -rw-r--r-- 1 root  root   2243 Jun 28  2012 poller_export.php
20 -rwxr-xr-x 1 root  root  18056 Jun 28  2012 poller.php
 4 drwxr-xr-x 5 root  root   4096 Jul 25 13:42 resource
 **0 lrwxrwxrwx 1 cacti cacti    18 Jul 25 13:42 rra -> /var/lib/cacti/rra**
 8 -rw-r--r-- 1 root  root   7394 Jun 28  2012 rra.php
 0 lrwxrwxrwx 1 root  root     22 Jul 25 13:42 scripts -> /var/lib/cacti/scripts
12 -rw-r--r-- 1 root  root  10820 Jun 28  2012 script_server.php
 8 -rw-r--r-- 1 root  root   5761 Jun 28  2012 settings.php
 4 -rw-r--r-- 1 root  root   1407 Jun  3  2012 snmpv3_priv_proto_none.patch
 8 -rw-r--r-- 1 root  root   6345 Jun 28  2012 templates_export.php
 8 -rw-r--r-- 1 root  root   5835 Jun 28  2012 templates_import.php
20 -rw-r--r-- 1 root  root  19529 Jun 28  2012 tree.php
44 -rw-r--r-- 1 root  root  44997 Jun 28  2012 user_admin.php
68 -rw-r--r-- 1 root  root  65635 Jun 28  2012 utilities.php

I also changed the owner of rra folder to cacti user like this:

ls -ls /var/lib/cacti/
total 12
4 drwxr-xr-x 2 root  root 4096 Jul 25 13:42 cli
0 lrwxrwxrwx 1 root  root   24 Jul 25 13:42 include -> /usr/share/cacti/include
0 lrwxrwxrwx 1 cacti root   20 Jul 25 13:42 lib -> /usr/share/cacti/lib
**4 drwxr-xr-x 2 cacti cacti 4096 Jun 28  2012 rra**
4 drwxr-xr-x 2 root  root 4096 Jul 25 13:42 scripts

What should I do next? Thanks a lot!

tungns
  • 21
  • 1
  • 1
  • 6

3 Answers3

2

What worked for me was to go into System Utilities (bottom of console) and click on Rebuild Poller Cache.

CSchulz
  • 10,882
  • 11
  • 60
  • 114
Rouage
  • 21
  • 1
0

The most common case of a missing RRD file in Cacti is a data source problem. This probably means that the Cacti poller could not retrieve data from the host.

  • Check the status of the device in the device list, if it's "Unknown" and if you didn't fiddle around with the availability detection, it means that Cacti is unable to get an SNMP reply from the host. This could have different reasons: Check SNMP connectivity between the Cacti host and the polled host (in your case, since both sides are the Cacti host, make sure snmpd is running and listening on the same port Cacti is trying to reach it (default 161).
  • Check the community string on both ends
  • if DNS is used make sure resolving is possible and successful on the Cacti host (less relevant for localhost, but still a good idea imho).

  • Check the datasource using debug mode to get some extra info (Devices ›› Localhost ›› Data Source List ›› Localhost - Logged in Users ›› Turn On Data Source Debug Mode) and also try to poll the host using snmpget or snmpwalk:

    snmpget -cCOMMUNITY -vVERSION HOSTNAME OID

    I usually use snmpwalk which uses the same syntax:

    snmpwalk -cpublic -v2c localhost 1.3.6.1.2.1

    1.3.6.1.2.1 is for MIB-2

Further debugging help: Great guide by gandalf from the Cacti forums

Cacti forums, where you can try and post your question there.

Good luck!

bangolio
  • 104
  • 1
  • 5
0

Check your permissions. I had the same issue when I stood up a cacti instance on Debian. Everything was displaying correctly except for the graphs, and I had the same "No such file or directory" errors. Changing the ownership of the rra directory to cacti:www-data resolved the issue for me.

Good luck.

  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Ethaan Jan 27 '15 at 22:38