Questions about Cacti and SNMP..
Moderators: Developers, Moderators
Questions about Cacti and SNMP..
Hello everyone.
Not sure if this is the right forum to post, but I figured since im running FreeBSD, this could be it.
I just started working with Cacti this weekend, on a recommendation from a friend of mine. I am very impressed with what I have seen so far and look to implement it as a solution for me (replacing MRTG).
Just have a couple quick questions. First, im running this setup on a FreeBSD 4.9 box. I installed cacti through the ports tree as well as net-snmp.5.x.
I've been able to get cacti up and running and access it through a browser. However, i'm having problems creating the graphs. I am positive the the problems are due to SNMP.
I don't have a lot of experience with SNMP, but this could be a great time to start learning.
The problem im having is that I get a 'snmp error' or 'snmp not in use' caption when I try and view my device information.
I'm pretty positive that this is because I have not setup SNMP correctly.
I was hoping to get some help in getting started with SNMP and recommendations on books, links, articles etc. so I can fix my problems with my setup.
I appreciate any help.
Tarballed
Not sure if this is the right forum to post, but I figured since im running FreeBSD, this could be it.
I just started working with Cacti this weekend, on a recommendation from a friend of mine. I am very impressed with what I have seen so far and look to implement it as a solution for me (replacing MRTG).
Just have a couple quick questions. First, im running this setup on a FreeBSD 4.9 box. I installed cacti through the ports tree as well as net-snmp.5.x.
I've been able to get cacti up and running and access it through a browser. However, i'm having problems creating the graphs. I am positive the the problems are due to SNMP.
I don't have a lot of experience with SNMP, but this could be a great time to start learning.
The problem im having is that I get a 'snmp error' or 'snmp not in use' caption when I try and view my device information.
I'm pretty positive that this is because I have not setup SNMP correctly.
I was hoping to get some help in getting started with SNMP and recommendations on books, links, articles etc. so I can fix my problems with my setup.
I appreciate any help.
Tarballed
Thought I would quickly reply here.
Figured out the SNMP portion of my problem. I went to the net-snmp web site, read up on the documentation and man pages and proceeded to setup snmp. (I did not setup a community name..oops).
Anyway, it's getting statistics, but not generating the graphs...so im wondering about the crontab entry and if it is working correctly...
Any FreeBSD users out there running this?
Figured out why im not seeing graphs. Here is what I see in my apache error.log when I try and view a graph:
Soo, need to figure out why that error is happening.
Cheers,
Tarballed[/code]
Figured out the SNMP portion of my problem. I went to the net-snmp web site, read up on the documentation and man pages and proceeded to setup snmp. (I did not setup a community name..oops).
Anyway, it's getting statistics, but not generating the graphs...so im wondering about the crontab entry and if it is working correctly...
Any FreeBSD users out there running this?
Figured out why im not seeing graphs. Here is what I see in my apache error.log when I try and view a graph:
Code: Select all
ERROR: opening '/usr/local/www/data-dist/cacti/rra/localhost_hdd_free_12.rrd': No such file or directory
Cheers,
Tarballed[/code]
Well, I think I may have found a common error. I read through a lot of threads on this forum and a lot of people seemed to be having the same issues. The issue being that graphs were not being generated for the most part and I am pretty sure that the cmd.php file has a lot to do with it.
For instance, in my case, I still cannot get the CPU utilization to work correctly. But I seem to be able to get other things working right now.
Also, it also seems that my crontab entry is not working either. I'm running FreeBSD 4.9, followed the directions to the 'T' and the crontab is still not running. I also seem to get errors when I add a new graph to display. Sometimes it works if I manually run 'php cmd.php' but it shouldn't be like that.
Anyway, just pointing out a common problem it seems.
Anyone else having a problem with the crontab entry? What about the cpu utilization as well?
Tarballed
For instance, in my case, I still cannot get the CPU utilization to work correctly. But I seem to be able to get other things working right now.
Also, it also seems that my crontab entry is not working either. I'm running FreeBSD 4.9, followed the directions to the 'T' and the crontab is still not running. I also seem to get errors when I add a new graph to display. Sometimes it works if I manually run 'php cmd.php' but it shouldn't be like that.
Anyway, just pointing out a common problem it seems.
Anyone else having a problem with the crontab entry? What about the cpu utilization as well?
Tarballed
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Will do. I did the initial testing at my home. I'm at work now, so I will be putting up a test box today. As soon as I am done, I'll post the output of cmd.php here....before I forget, when you run 'php cmd.php' it must be as the cactiuser?TheWitness wrote:Run the CMD.PHP from a shell and post the output here. Before you do, attempt to change the permissions on the RRD directory. Use the chmod "777" command to do so.
TheWitness
Tarballed
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I got this also, until I turned on the snmp deamon on my localhost that is running cacti. I then checked the remote system and found it was not on either. Once I started both, I would actually get snmp data.The problem im having is that I get a 'snmp error' or 'snmp not in use' caption when I try and view my device information.
However ever when it trys to do an snmpwalk to get the disk info i get nothing
Like you I'm trying to figure this out also, so I just thought I would share what I found.
Ya, I had the same thing. Once I setup snmp correctly (using net-snmp) that error seemed to go away.trell wrote:I got this also, until I turned on the snmp deamon on my localhost that is running cacti. I then checked the remote system and found it was not on either. Once I started both, I would actually get snmp data.The problem im having is that I get a 'snmp error' or 'snmp not in use' caption when I try and view my device information.
However ever when it trys to do an snmpwalk to get the disk info i get nothing
Like you I'm trying to figure this out also, so I just thought I would share what I found.
Maybe we can all put our notes together here and make a FAQ/Install guide here. That way, we can share our experiences and help others in the future, who run into the same problem.
Right now, im building the test box and plan on posting my information here as soon as I can. Hopefully, it can provide some insight as to why everything is acting 'funky'.
Cheers,
Tarballed
I would like to find out why my ucd/net - CPU Usage and other ucd/net snmp calls are not graphing. Also my snmp of the hd usage is not working and here is a verbose output cacti gives...
+ Running data query [8].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/cacti/0.8.5a/resource/script_queries/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 index'
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query index'
+ Found item [hrStorageIndex='End of MIB'] index: End of MIB
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query description'
+ Found item [hrStorageDescr='End of MIB'] index: End of MIB
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query sau'
+ Found item [hrStorageAllocationUnits='End of MIB'] index: End of MIB
With that I don't see anything wrong but then again I'm not a snmp person, I am trying to learn it though.
I have not seen that its not ok to give url for someone to look at and help so here is where
my cacti is located and you can login with guest/cacti.
http://www.trells.com/cacti/
+ Running data query [8].
+ Found type = '4 '[script query].
+ Found data query XML file at '/opt/cacti/0.8.5a/resource/script_queries/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 index'
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query index'
+ Found item [hrStorageIndex='End of MIB'] index: End of MIB
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query description'
+ Found item [hrStorageDescr='End of MIB'] index: End of MIB
+ Executing script query '/opt/php/4.3.4/bin/php -q /opt/cacti/0.8.5a/scripts/query_host_partitions.php as301.trells.com public 1 query sau'
+ Found item [hrStorageAllocationUnits='End of MIB'] index: End of MIB
With that I don't see anything wrong but then again I'm not a snmp person, I am trying to learn it though.
I have not seen that its not ok to give url for someone to look at and help so here is where
my cacti is located and you can login with guest/cacti.
http://www.trells.com/cacti/
Great news I'm getting data now :)
This is what I found today,
http://www.siliconvalleyccie.com/linux- ... oc72164751
After reading it, I added a rocommunity line to my snmp.conf file, deleted all my monitors for the existing device as301 and the deleted all the .rra file that were created for it.
I then recreated as301 using the SNMP Community name I put in the snmp.conf file and lo and behold I'm getting data.
I hope this helps tarballed, and anyone else having this issue.
http://www.siliconvalleyccie.com/linux- ... oc72164751
After reading it, I added a rocommunity line to my snmp.conf file, deleted all my monitors for the existing device as301 and the deleted all the .rra file that were created for it.
I then recreated as301 using the SNMP Community name I put in the snmp.conf file and lo and behold I'm getting data.
I hope this helps tarballed, and anyone else having this issue.
Re: Great news I'm getting data now :)
Thanks trell. I'll give this a shot. I got tied up with a few other things today so I didn't get around to really working with cacti like I wanted to..trell wrote:This is what I found today,
http://www.siliconvalleyccie.com/linux- ... oc72164751
After reading it, I added a rocommunity line to my snmp.conf file, deleted all my monitors for the existing device as301 and the deleted all the .rra file that were created for it.
I then recreated as301 using the SNMP Community name I put in the snmp.conf file and lo and behold I'm getting data.
I hope this helps tarballed, and anyone else having this issue.
Keep your eyes on this thread. I will be posting my results this week.
Thanks again!
Tarballed
Ok...after putting out a few fires over the last two days, finally got around to working with cacti again.
Went through a brand new installation and followed the directions as specified. For whatever reasons, it does not appear that my crontab entry is being run and I am starting to wonder about a few things.
FYI, running on FreeBSD 4.9
My cacti files, after install, are located in:
While in there, I executed the following:
I am also wondering if there are some blanks in the documentation, as far as the webserver portion is concerend. After doing all of the setup procedures, I pointed my browser to:
http://testmachine/cacti/
But nothing comes up.
Tailing the error log, it tells me the following:
But, if I copy the entire cacti directory located in /usr/local/share into the web document root and then point my browser to it, it does work.
So I am a bit confused on parts of the setup.
Also, here is the output I get when I run 'php cmd.php' (while in the /usr/local/share/cacti directory)
Yet, still not getting graphs to work.
Any ideas?
Tarablled
Went through a brand new installation and followed the directions as specified. For whatever reasons, it does not appear that my crontab entry is being run and I am starting to wonder about a few things.
FYI, running on FreeBSD 4.9
My cacti files, after install, are located in:
Code: Select all
/usr/local/share/cacti
Code: Select all
chown -R cacti rra/ log/
http://testmachine/cacti/
But nothing comes up.
Tailing the error log, it tells me the following:
Code: Select all
File does not exist: /usr/local/www/data/cacti/
So I am a bit confused on parts of the setup.
Also, here is the output I get when I run 'php cmd.php' (while in the /usr/local/share/cacti directory)
Code: Select all
cat: /proc/meminfo: No such file or directory
command: perl /usr/local/www/data-dist/cacti/scripts/linux_memory.pl MemFree:, output:
cat: /proc/meminfo: No such file or directory
command: perl /usr/local/www/data-dist/cacti/scripts/linux_memory.pl SwapFree:, output:
MULTI command: perl /usr/local/www/data-dist/cacti/scripts/loadavg_multi.pl, output: 1min:0.00 5min:0.01 10min:0.00
MULTI expansion: found fieldid: 17, found rrdname: load_1min, value: 0.00
MULTI expansion: found fieldid: 18, found rrdname: load_5min, value: 0.01
MULTI expansion: found fieldid: 19, found rrdname: load_15min, value: 0.00
command: perl /usr/local/www/data-dist/cacti/scripts/unix_users.pl, output: 1
command: perl /usr/local/www/data-dist/cacti/scripts/unix_processes.pl, output: 45
update /usr/local/share/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:U
update /usr/local/share/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:U
update /usr/local/share/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min N:0.00:0.01:0.00
update /usr/local/share/cacti/rra/localhost_users_6.rrd --template users N:1
update /usr/local/share/cacti/rra/localhost_proc_7.rrd --template proc N:45
time: 1
Code: Select all
ERROR: opening '/usr/local/www/data-dist/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
ERROR: opening '/usr/local/www/data-dist/cacti/rra/localhost_mem_buffers_3.rrd': No such file or directory
ERROR: opening '/usr/local/www/data-dist/cacti/rra/localhost_users_6.rrd': No such file or directory
ERROR: opening '/usr/local/www/data-dist/cacti/rra/localhost_proc_7.rrd': No such file or directory
Tarablled
Let me add another bit of information here.
I copied the entire cacti directory to /usr/local/www/data directory, so I could actually log into cacti through the browser.
However, there were no graphs present when I went to view the graphs. This was even true after I ran:
php cmd.php (ran as root mind you) while in /usr/local/share/cacti
Ok...so I then changed into:
and ran: php cmd.php (as root as well).
Went back into the interface and low and behold, there were graphs.
I am very confused because this is not mentioned anywhere in the directions and I want to make sure im doing this correctly so I can actually use it.
Anyone out there that can clarify this a bit, let me know what exactly the problem is, if any?
I'm starting to get the feel that there is just some missed communication here...
Tarballed
I copied the entire cacti directory to /usr/local/www/data directory, so I could actually log into cacti through the browser.
However, there were no graphs present when I went to view the graphs. This was even true after I ran:
php cmd.php (ran as root mind you) while in /usr/local/share/cacti
Ok...so I then changed into:
Code: Select all
/usr/local/www/data/cacti/
Went back into the interface and low and behold, there were graphs.
I am very confused because this is not mentioned anywhere in the directions and I want to make sure im doing this correctly so I can actually use it.
Anyone out there that can clarify this a bit, let me know what exactly the problem is, if any?
I'm starting to get the feel that there is just some missed communication here...
Tarballed
whats in your crontab
Tarball print the content of you crontab, do crontab -e
this should bring up your user (your logged in with) crontab file.
Keep in mind that you can install cacti where ever you want, its your httpd.conf file that needs to know where to find cacti
this should bring up your user (your logged in with) crontab file.
Keep in mind that you can install cacti where ever you want, its your httpd.conf file that needs to know where to find cacti
Who is online
Users browsing this forum: No registered users and 3 guests