[AGENT++] Agent++ Mib Proxy using the same community name for different subtrees

Nancy Winder winder at sedsystems.ca
Mon Nov 9 18:25:23 CET 2015


Hello,

I am attempting to implement a mib proxy where a section of the mib 
(specifically, the host-resources) is to be proxied (from snmpd), and 
the rest of it should come from our internal data. I have requirements 
that the query will come from the same hostname/port and community name 
for both of these sections, but should be treated differently depending 
on which OID is requested. I am using Agent++ version 3.5.31 snmp++ 
version 3.2.25

So far I have been able to successfully use the proxy-forwarder to 
achieve proxying for the host-resources mib if I am using different 
community names, but I am having trouble getting it to work for the same 
community name.

It looks to me like the NotifyFilterTable could be used to assign a 
sub-tree to a different section of the mib, so I have done some work 
trying to get the notify-filter configured. I have a couple of questions 
related to that, but I would like to first ask if the NotifyFilterTable 
can be used for this purpose, and if not, is there a different/better 
method I should be using?

NotifyFilterTable questions/issues:

The NotifyFilterTable has a 'subtree' column, which seems like it could 
be used to define a section of the mib, however it is 'not-accessible' 
so I'm not sure how to use it.

The second issue that I'm running into is that the NotifyFilterTable and 
the NotifyFilterProfileTable classes don't have method for setting the 
rows (no add_entry or set_row commands). I was able to set a row on the 
NotifyFilterProfileTable using some commands pulled from your example 
proxy-forwarder config shell script. Unfortunately I could not set a row 
in the NotifyFilterTable using similar commands. Here is the script I am 
using:

SET="snmpset -O s -v 2c -c communityName2 localhost:11161 "

set -x
set -e

$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'remote_target_out\' 
i destroy || echo ignored
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'remote_target_out\' 
i 5
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'monaco_target\' i 
destroy || echo ignored
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'monaco_target\' i 
5
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileName.\'remote_target_out\' 
s proxy_filter
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileName.\'monaco_target\' s 
monaco_filter
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'remote_target_out\' 
i 1
$SET 
SNMP-NOTIFICATION-MIB::snmpNotifyFilterProfileRowStatus.\'monaco_target\' i 
1

$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterRowStatus.\'proxy_filter\' i 
destroy || echo ignored
$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterRowStatus.\'proxy_filter\' i 5
$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterSubtree.\'proxy_filter\' o 
1.3.6.1.2.1
$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterMask.\'proxy_filter\' s 1
$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterStorageType.\'proxy_filter\' i 3
$SET SNMP-NOTIFICATION-MIB::snmpNotifyFilterRowStatus.\'proxy_filter\' i 1

The first section works, and produces the following table:
SNMP table: snmpNotifyFilterProfileTable

                      index              Name    StorType RowStatus
      'monaco_target'  monaco_filter nonVolatile        active
'remote_target_out'     proxy_filter nonVolatile        active

The second section produces the following error:
No log handling enabled - turning on stderr logging
SNMP-NOTIFICATION-MIB::snmpNotifyFilterRowStatus.'proxy_filter': Unknown 
Object Identifier ('-quote is for fixed length strings)

Any help/insights about this problem would be appreciated. Please let me 
know if I have left anything out that would be helpful.

Thanks,

Nancy Winder
SED Systems
18 Innovation Boulevard
Saskatoon, SK Canada




More information about the AGENTPP mailing list