Cacti was already set up when I started working here, but we've got a series of graphs and data queries labelled "Host MIB" that looked like they probably came with the product. As an example, I'll use the Host MIB - CPU Utilization graph template, which uses a series of php calls to find information about the various CPUs on the machine, so that we can produce a separate graph for each CPU. Very handy. I set up a new machine to be monitored by snmp and cacti, and noticed that these graphs didn't work, even though they work fine for my other machines.
With a bit of digging, I found that the problem was twofold:
1) I had initially set cacti up to use snmp v3. When that didn't work, I switched it back to use v2 instead, but cacti was remembering the password which I had entered on the (now invisible) v3 configuration page and passing it to the php script anyways.
2) The password on that machine had spaces in it, and cacti was not escaping those spaces before passing it on to php. So for instance, the result of one verbose query (password changed to protect the guilty) was:
Code: Select all
Executing script query '/usr/bin/php -q /var/www/html/cacti/scripts/ss_host_cpu.php dana.ucc.nau.edu 17 2:161:500:community:cacti:My password:MD5:My password:DES: query index'
Problem is fixed for me; I just removed the password from the v3 configuration before switching back to v2. But I thought I'd pass it along in case it wasn't a known bug - I did a quick search of the forums and didn't see it.