Problem creating Host MIB CPU utilization graph

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
siwelb
Posts: 2
Joined: Thu Jul 07, 2011 3:44 pm

Problem creating Host MIB CPU utilization graph

Post by siwelb »

Apologies if this thread has come up somewhere before, but I tried searching and couldn't find anything close enough to the problem I'm encountering. I'm wanting to create a CPU utilization graph using the Host MIB data source. I've been successful in creating one using ucd/net data sources but not Host MIB so far. After creating the data source through the web console, I go to create the graph by clicking on "Graph Management" under the "Management" section. When I go to view the graph, nothing shows up and then when I go to edit the graph under "Graph Management" I'm seeing the following error:
ERROR: opening '/usr/local/cacti-0.8.7g/rra/localhost_cpu_24.rrd': No such file or directory
Any reason why this file isn't being created? And yes, I've already checked that the rra directory has the correct permissions - it has read/write permissions for the cacti user. By the way, this cacti instance was installed on a RHEL6 server.

Thanks,
Brian
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Problem creating Host MIB CPU utilization graph

Post by noname »

"Host MIB - CPU Utilization" template uses 'scripts/ss_host_cpu.php' to get information.
And this script uses the OID ".1.3.6.1.2.1.25.3.3.1" (hrProcessorTable),
but this OID seems to be not always supported for every devices.

See also: http://forums.cacti.net/viewtopic.php?f=2&t=38898

Try to upgrade your SNMP agent (Net-SNMP) if possible, but I'm not sure whether if it will be solved.
siwelb
Posts: 2
Joined: Thu Jul 07, 2011 3:44 pm

Re: Problem creating Host MIB CPU utilization graph

Post by siwelb »

When I execute the command
snmpwalk -v 2c -c public localhost .1.3.6.1.2.1.25.3.3.1
I get the following output:
HOST-RESOURCES-MIB::hrPRocessorFrwID.768 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.768 = INTEGER: 4
So I'm guessing that means that this OID is supported by the device?

I found out that sometimes I have to manually create the RRD file by executing the command line code supplied by the data source debugging mode. However, even after the file is manually created, the poller is not updating the file every 5 minutes (so I'm getting NaN for all values).
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Problem creating Host MIB CPU utilization graph

Post by noname »

Then, try to modify 'scripts/ss_host_cpu.php' to snmpwalk under hrProcessorLoad.
(but I can't verify this in my environment)
$oids = array(
"index" => ".1.3.6.1.2.1.25.3.3.1.2",
"usage" => ".1.3.6.1.2.1.25.3.3.1.2"
);
function ss_host_cpu_get_cpu_usage(...) {
$arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1.2", ...
function ss_host_cpu_get_indexes(...) {
$arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1.2", ...
If not worked, I recommend using "ucd/net - CPU Usage" graph template.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests