Data Source config for indexes based on SnmpAdminString?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
kgraham
Posts: 3
Joined: Mon Aug 22, 2005 7:05 pm

Data Source config for indexes based on SnmpAdminString?

Post by kgraham »

Is there a way to coerce Cacti into recognizing SNMP tables indexed by an SnmpAdminString where that string is not represented in a table column?

Current case is CISCO-SSL-PROXY-MIB::cspCpuStatusTable. The index is an adminstring from cspPsName, however the value used for the index is not accessible anywhere. Likewise you get:

CISCO-SSL-PROXY-MIB::cspCpuProcessUtil."FDU" = Gauge32: 1 percentage
CISCO-SSL-PROXY-MIB::cspCpuProcessUtil."TCP" = Gauge32: 2 percentage
CISCO-SSL-PROXY-MIB::cspCpuProcessUtil."SSL" = Gauge32: 2 percentage

...where the actual index is "3.70.68.85" (for the case of "FDU"), though "FDU" is not available as a value, which it would appear that <oid_index> needs.

So.. is there an incantation to tell Cacti that the index of an OID is to be used as the index name itself?
kgraham
Posts: 3
Joined: Mon Aug 22, 2005 7:05 pm

Post by kgraham »

Main problem was the default of assuming single-value indexes. An update to data_query.php to build default index_parse_regexp based on the OID returned from walk vs. what was requeted did the trick.

Code: Select all

$index_parse_regexp = '.*\.(' . str_repeat('[0-9]+\.', substr_count(substr($snmp_index[0]["oid"], strlen($snmp_queries["oid_index"]) + 1), '.')) . '[0-9]+)$';
Now just to find a way to treat the index itself as a value for display purposes..
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

This is possible, first, ignore the strings, cacti uses only the numeric OID's.

Second, using a regex match on in the XML resouce for the dataquery, you can do a multi-value index.

Do a search on the forums for posts by RaX concerning Regex, you should find some discussions on this and examples.
[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]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest