You can use snmpagent plugin available in sourceforge along with Thold 0.6.0 (updated by snmpagent developer) available in beta in Cacti SVN.
It works great apart from two issues if using snmp v3:
1. When setting up snmp v3 with SHA, the plugin tries to confirm the authoritative password. Even when the password in both fields match, it throws an error saying they don't match! I have worked around this by commenting out the check function in manager.php of snmpagent plugin. I have raised it with the developer and hopefully it will officially be fixed:
Original Code:
Code: Select all
if ($save["snmp_version"] == 3 && ($save["snmp_auth_password"] != $save["snmp_auth_password_confirm"])) {
raise_message(4);
}
Uncommented Code:
Code: Select all
/*if ($save["snmp_version"] == 3 && ($save["snmp_auth_password"] != $save["snmp_auth_password_confirm"])) {
raise_message(4);
}*/
2. It seems Engine ID for SNMP v3 traps has not been taken into acount. So when the plugin generates traps every trap has a different engine ID which can not be managed by many snmp receivers as they require one unique engin ID per device. Again I have worked around this by hard coding a engine-id in setup.php of snmpagent plugin:
Original Code:
Code: Select all
$args = " -v 3 " . (($notification_manager["snmp_message_type"] == 2 )? " -Ci " : "" ) . " -u " . $notification_manager["snmp_username"];
Changed Code:
Code: Select all
$args = " -v 3 -e 12345678" . (($notification_manager["snmp_message_type"] == 2 )? " -Ci " : "" ) . " -u " . $notification_manager["snmp_username"];
Note that in the above code the "e" argument of snmptrap tool is used. The engine ID has to be in HEX. I have just used an example!
Also note that cacti-snmpagent needs snmptrap binary and you can point to it in the settings in Cacti
An official fix to both these issues would be good. I have raised both with the snmpagent developer.