First of thank you for creating and maintaining such an awesome project!
I started playing with cacti to graph my routers and discovered a slight problem with fetching data: there's no way to set EngineID (or I'm blind). I searched a lot about that and even found one post on the forum saying that it's not supported. Currently my test box is running Debian 8, Apache 2, PHP 5.6.30 and cacti 0.8.8b (everything installed from repo).
All of my devices are running MikroTik RouterOS and using SNMPv3 they're reporting constantly "v3 err: 3 unknown engine id".
While graphs are working I will like to get rid of these messages. I'm assuming that the only thing to make them happy is to set EngineID on the client side.
I'm experienced PHP developer, so I've tried to first debug the problem and manually query SNMP server hoping for something. First I discovered that snmp3_get() has no support for EngineID, so I used \SNMP class:
Code: Select all
$snmp = new SNMP(3, 'host:port', 'community');
$snmp->setSecurity(
'authPriv',
'SHA',
'AUTH_PW',
'AES',
'ENC_PW',
'',
'EngineID'
);
$x = $snmp->get('OID');
var_dump($x);
engine-id (string; Default: "") for SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
I tried using both 0x80.... form as well as 80.... - results were exactly the same.Note: engine-id field holds the suffix value of engine-id, usually SNMP clients should be able to detect the value, as SNMP values, as read from the router. However there is a possibility that this is not the case. In which case, the engine-ID value has to be set according to this rule: <engine-id prefix> + <hex-dump suffix>, so as an example, if you have set 1234 as suffix value you have to provide 80003a8c04 + 31323334, combined hex (the result) is 80003a8c0431323334
Interestingly enough using snmpwalk produces no errors in router log:
Code: Select all
snmpwalk -u COMMUNITY -v 3 -a SHA -A AUTH_PWD -l authPriv -x AES -X ENC_PWD -M Mikrotik.mib HOST:PORT