What monitoring software are you using (Cacti, Munin, Nagios, Zabbix, other)? It may have built-in or community-contributed templates for your particular server.
Have a look on the manufacturer's website for MIBs relating to the hardware sensors (disk, CPU etc. are normally reported by the OS) - otherwise, snmpwalk
a server and see if you can find anything that might correspond to temperature, keeping in mind the units may not be what you expect.
If your end goal is just to have and view the metrics, a tool like cacti, munin, mrtg could help you with less detail needed than asked for in your question.
That said, Cisco supports the standard MIBs to interfaces.
Each interface will be assigned an index. All of the information for the interfaces will be stored in tables. Each table is referenced by a specific OID, and the information for the specific interface in that table will be referenced by attaching the interface's index to the table's OID.
As an example, here's a script that looks up the ifIndex, ifDescr, ifAdminStatus, and ifOperStatus for every interface on a device. This example shows the oids used and the act of looking up table values based on their index. (I pulled this example out of a much larger piece of code to simplify it, so there are likely some minor bugs):
#!/usr/bin/perl
use Net::SNMP;
my %oids = (
'ifDescr' => '1.3.6.1.2.1.2.2.1.2',
'ifType' => '1.3.6.1.2.1.2.2.1.3',
'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7',
'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8',
);
my $device = shift || die "Need device to poll";
my $community = shift || 'public';
my($snmp,$snmp_error) = Net::SNMP->session(-hostname => $device,
-community => $community);
my $info;
if (!$snmp) {
printf STDERR ("Couldn't create snmp object for $d: $snmp_error\n");
} else {
$info = $snmp->get_entries(-columns => [ $oids{ifDescr}, $oids{ifAdminStatus},
$oids{ifOperStatus}, $oids{ifType} ]);
if (!$info) {
printf STDERR ("Couldn't poll $d: %s\n", $snmp->error());
}
}
foreach my $oid (grep /^$oids{ifDescr}\./, keys(%$info)) {
my($index) = $oid =~ m|\.(\d+)$|;
print join(',', $device,
$index,
$info->{"$oids{ifDescr}.$index"},
$info->{"$oids{ifType}.$index"},
$info->{"$oids{ifAdminStatus}.$index"},
$info->{"$oids{ifOperStatus}.$index"}), "\n";
}
All the interesting stuff is under 1.3.6.1.2.1.2.2.1
, the ifEntry OID. Here's a link that explains some of the members of it, including the ones I used above and other you might be interested in, like Octet, Packets, Errors, etc
Best Answer
The community string is how SNMP devices identify themselves as part of a "group", if you will. If you set up ZABBIX to grab information from the Cisco router but you're using the default community "public" or a community by any other name, the Cisco router will reject the request for information. Once the community names match up is when it'll pass the information. This is SNMP v1. Some of your other devices may have options for v2c and v3. v3 allows you to create user names and passwords as well as encrypt the data that is being shared.
Think of Traps as unsolicited alerts from your router to Zabbix. In normal situations, Zabbix will request information every 10 seconds or whatever from the devices. When a trap is triggered, the Cisco router will send information to the server without the server requesting it. This can be useful in the event of failed log in attempts or such.
Once you start adding other, not so common devices to it, you'll have to start adding device specific MIBs, which for me was the most confusing part of it all when I was starting to learn how it works. I also had a hard time finding 'SNMP for Dummies' type material. But once you get it up and running how you want it's well worth the time spent.