I have problems to view interface graphs.
I use snmpv3 and therefore i changed some things in my snmp.php as shown next:
Code: Select all
if (snmp_get_method($version) == SNMP_METHOD_PHP) {
/* make sure snmp* is verbose so we can see what types of data
we are getting back */
snmp_set_quick_print(0);
if ($version == "1") {
$snmp_value = @snmpget("$hostname:$port", $community, $oid, ($timeout * 1000), $retries);
}elseif ($version == "2") {
$snmp_value = @snmp2_get("$hostname:$port", $community, $oid, ($timeout * 1000), $retries);
}else{
$snmp_value = @snmp3_get("$hostname:$port", $username, "authPriv", "SHA", "DES", $password, "", "", $oid, ($timeout * 1000), $
retries);
Code: Select all
elseif ($version == "3") {
$snmp_auth = "-u $username -l authPriv -X read-only -x DES -a SHA -A $password"; /* v3 - username/password */
Code: Select all
snmp_set_quick_print(0);
if ($version == "1") {
$temp_array = @snmprealwalk("$hostname:$port", $community, $oid, ($timeout * 1000), $retries);
}elseif ($version == "2") {
$temp_array = @snmp2_real_walk("$hostname:$port", $community, $oid, ($timeout * 1000), $retries);
}else{
$temp_array = @snmp3_real_walk("$hostname:$port", $username, "authPriv", "SHA", "DES", $password, "", "", $oid, ($timeout * 10
00), $retries);
Debug on Interface Statisitcs prints "...no snmp data returned" but
"snmpwalk -v 3 -u read-user -A read-only -X read-only -l authPriv -x DES -a SHA 10.10.10.3 .1.3.6.1.2.1.2.2.1.1" works fine.
Output:
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
[...]
I made a snmp debug at the cisco switch and I saw, that there are 2 incoming snmp packets. one with level "noauth" and no username and one with level "priv" ... it 's also confusing.
Code: Select all
*Mar 8 03:44:55.949: SNMP: Packet received via UDP from 10.10.10.3 on Vlan11
*Mar 8 03:44:55.949:
Incoming SNMP packet
*Mar 8 03:44:55.949: v3 packet security model: v3 security level: noauth
*Mar 8 03:44:55.949: username:
*Mar 8 03:44:55.949: snmpEngineID: 8000000903000019E81E8640
*Mar 8 03:44:55.949: snmpEngineBoots: 0 snmpEngineTime: 0
*Mar 8 03:44:55.949: SNMP: Report, reqid 1136794396, errstat 0, erridx 0
internet.6.3.15.1.1.4.0 = 39
*Mar 8 03:44:55.949: SNMP: Packet sent via UDP to 10.10.10.3
*Mar 8 03:44:55.958: SNMP: Packet received via UDP from 10.10.10.3 on Vlan11
*Mar 8 03:44:55.958: SNMP: Get request, reqid 1136794395, errstat 0, erridx 0
lsystem.58.0 = NULL TYPE/VALUE
*Mar 8 03:44:55.958:
Incoming SNMP packet
*Mar 8 03:44:55.958: v3 packet security model: v3 security level: priv
*Mar 8 03:44:55.958: username: read-user
*Mar 8 03:44:55.958: snmpEngineID: 8000000903000019E81E8640
*Mar 8 03:44:55.958: snmpEngineBoots: 1 snmpEngineTime: 618227
*Mar 8 03:44:55.958: SNMP: Response, reqid 1136794395, errstat 0, erridx 0
lsystem.58.0 = 4
greetings