Empty Graphs in Cacti - on ubuntu

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Empty Graphs in Cacti - on ubuntu

Post by khilari »

ERROR: opening '/usr/share/cacti/site/rra/my_pc_users_18.rrd': No such file or directory

I got the above error when i went to
Devices-->My PC--> Associated Graph Template-->Host MIB - Logged in Users --> Clicked on EDIT by "is being graphed" and turned on debugging.

I tested snmp in windows and it is working fine, its just that Cacti can't grab the info for some reason. There are no files in the "rra" directory.

Please advise. Thanks,

Can you please tell me if net-snmp is required if I don't want the graphs from localhost machine.. In other words, is net-snmp required to pull or push data?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Empty Graphs in Cacti - on ubuntu

Post by gandalf »

khilari wrote:ERROR: opening '/usr/share/cacti/site/rra/my_pc_users_18.rrd': No such file or directory

I got the above error when i went to
Devices-->My PC--> Associated Graph Template-->Host MIB - Logged in Users --> Clicked on EDIT by "is being graphed" and turned on debugging.

I tested snmp in windows and it is working fine, its just that Cacti can't grab the info for some reason. There are no files in the "rra" directory.

Please advise. Thanks,
You followed http://www.cacti.net/downloads/docs/htm ... _unix.html to the letter?
Can you please tell me if net-snmp is required if I don't want the graphs from localhost machine.. In other words, is net-snmp required to pull or push data?
SNMP is very useful, but you may retrieve data via other protocols as well (see second to last link of my signature: the PING example of course does not use SNMP, you may write scripts that get data via http, ssh, ldap, ftp, ...). And of course the implementation does not matter (e.g. other SNMP implementations should work as well)
Reinhard
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

Thanks lvm

I did NOT follow the instructions to the letter... as i thought it was inconsistent between user 'cacti' and 'cactiuser'

So to simple things, the only three lines i didn't follow from that page were

1. GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
i replaced cactiuser with cacti

2. chown -R cactiuser rra/ log/
again, replaced cactiuser with cacti

3. */5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

replaced cactiuser with cacti and path was /usr/share/cacti/site/poller.php

Please tell me if this is the cause of my issue. Thanks much.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If this matches the settings in ./include/config.php, it's fine. Please change

Code: Select all

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
to

Code: Select all

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /var/www/html/cacti/log/poller.log 2>&1
to get the results of the last run in ./log/poller.log. Have a look at this and search for errors. Or run php poller.php manually from cacti's directory ... You may increase Settings->Logging Level to DEBUG for one polling cycle. Consult http://forums.cacti.net/viewtopic.php?t=10534 for more install tips
Reinhard
rnason
Posts: 2
Joined: Sun Jun 04, 2006 10:32 am

Error Fix

Post by rnason »

I had the same issue, 2 things i did to fix it was:\

1) dpkg-reconfigure php5-mysql

That should take care of the error you are getting, and your graphs should show up, after that if you find that no data is being written to the graphs then:

2) check permission on /usr/share/cacti/site/rra directory, chances are only root owns it, and is allowed to write to it.
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

Thanks guys... i will do that on monday...
i really really appreciate the help... Lookin' fwd to monday :)
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

I ran "dpkg-reconfigure php5-mysql" and it gave me a couple of prompts that it will append php.ini files.

I also checked the permissions on the rra dir.
here they are ...
Result of ls -al /var/lib/cacti
drwxrwxrwx 2 cacti www-data 4096 2005-09-11 10:40 rra

Results of ls -al /usr/share/cacti/site
lrwxrwxrwx 1 root root 18 2006-05-30 14:43 rra -> /var/lib/cacti/rra

The dir is owned by root but it has full permissions, but i still can't get the graphs on cacti

Also, in my Device Link on Cacti, i don't see the SNMP error, i see this :
SNMP Information
System: Hardware: x86 Family 6 Model 9 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Uniprocessor Free)
Uptime: 7589272
Hostname: user-xx

So, I guess cacti can reach the box, but it can't get the graphs on the cacti web interface.

How can I check from command line if its even pulling snmp data from remote devices?
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

It worked.
I am getting three graphs now
1. Users
2. Processes
3. Memory Usage

Thanks guys.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

What did the trick?
Reinhard
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

lvm,
here is a command i ran in shell
php /usr/share/cacti/site/poller.php > /usr/share/cacti/site/log/poller.log
i checked the rra folder and discovered 4 new files, so then i check cacti and the graphs were there. However, those were the only graphs it generated. After that, i didn't see any change in graphs. Today, i am running that command from shell, and waiting for results.

here is my crontab entry

*/5 * * * * cacti php /usr/share/cacti/site/poller.php > /usr/share/cacti/site/log/poller.log 2>&1

any ideas why it doesn't pull automatically?
Last edited by khilari on Fri Jun 09, 2006 4:02 pm, edited 2 times in total.
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

lvm,
Running that command from shell worked again.. i do see 'reporting' graphs now. I guess i just need to find out how it will pull data every 5 mins or so.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Which user was logged in when running the poller manually? You should login as user "cacti" (the one you configured in crontab). And it may help to provide the /full/path/to/php for the crontab entry.
Reinhard
khilari
Posts: 11
Joined: Wed May 31, 2006 7:22 am

Post by khilari »

i ran it the poller as root from the command line...

can i just put "root" in the crontab instead of cacti

i will try running poller as cacti and see if i get the graphs...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Of course you may poll as root. But that is REALLY NOT recommended. If this works, it should work as well with caci or cactiuser, if all permissions etc. are set correctly
Reinhard
rnason
Posts: 2
Joined: Sun Jun 04, 2006 10:32 am

Permissions?

Post by rnason »

Remember that in order to get cacti to write data to the charts, when you create a new device, the device is created with root as owner, i have noticed that i have to usually do a chmod -R 777 /usr/share/cacti/site/rra every time i create a new device, so that the cacti user has permissions to chart the data properly.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests