I hope someone can help me out on this one:
I'm using Cacti to monitor a large number of Red Hat EL3 SMP boxes, and it's running great. One thing I'm monitoring is CPU performance. My question is: which OID does Cacti use for this metric?
Looking at the query_host_cpu.php, it says:
$oids = array(
"index" => ".1.3.6.1.2.1.25.3.3.1",
"usage" => ".1.3.6.1.2.1.25.3.3.1"
);
However, when I run an snmpwalk on a machine (that's successfully being monitored by Cacti, I might add...) I get the following:
[root@localhost scripts]# snmpwalk -c public -v 1 192.168.1.20 .1.3.6.1.2.1.25.3.3.1
HOST-RESOURCES-MIB::hrProcessorFrwID.769 = OID: SNMPv2-SMI::zeroDotZero
Can someone explain where I'm going wrong here? I would like to use CPU metrics for another SNMP-enabled software product, and have had no luck as of yet.
Thanks in advance for your help.
Mike
Magical Cacti? SNMP CPU OIDs....
Moderators: Developers, Moderators
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Code: Select all
snmpwalk -c public -v 1 192.168.1.20 .1.3.6.1.2.1.25.3
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Thanks for the response Tony. However, I'm still a little confused. Doing an SNMPwalk on the OID you specify doesn't really give me any new info.
Maybe to help clarify my question, I want to know what exactly the query_host_cpu.php script does to get the values for CPU usage. As you explain, there's nothing for it to get at the .1.3.6.1.2.1.25.3.3.1 OID, so there must be something else going on.
Or am I looking in the wrong place for this information?
Thanks again,
Mike
Maybe to help clarify my question, I want to know what exactly the query_host_cpu.php script does to get the values for CPU usage. As you explain, there's nothing for it to get at the .1.3.6.1.2.1.25.3.3.1 OID, so there must be something else going on.
Or am I looking in the wrong place for this information?
Thanks again,
Mike
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Well, first, the "oids" array is at the top just for reference.
The output with an snmp agent that works is:
But the NET-SNMP one doesn't support the hostmib processor information. But there is a template for the NET-SNMP/UCD-SNMP agent.
Redhat isn't giving the OID that this php script is looking for, and it's not very clear from the script what is going on.
Configure your Redhat snmp agent to allow cpu load and use the NET-SNMP host templates to use that information.
The output with an snmp agent that works is:
Code: Select all
roman@mess:~> snmpwalk -v 2c -c public 192.168.1.11 .1.3.6.1.2.1.25.3.3.1
HOST-RESOURCES-MIB::hrProcessorFrwID.2 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 0
Redhat isn't giving the OID that this php script is looking for, and it's not very clear from the script what is going on.
Configure your Redhat snmp agent to allow cpu load and use the NET-SNMP host templates to use that information.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 0 guests