Unsolved
This post is more than 5 years old
2 Posts
0
4120
September 24th, 2009 04:00
Adding discovery filter via dmctl/perl API
I'm trying to add AD filter entries via the Perl API. I got the following info for the add_filter function:
add_filter(
filter ,
port ,
snmpVersion ,
accessMode ,
communities
)
but when I try to run it, I get this error message:
[6] Reference to 2-element array expected for argument to InCharge primitive 'invokeOperation', stopped at ./set_ad_filters.pl line 42
I can't figure out the format for the filter argument. Does someone know what I should pass to this?
Thanks,
-Dmitri
No Events found!
FredericMeunier_0588be
143 Posts
1
September 28th, 2009 12:00
Hi Dmitry,
the issue with ANYVALARRAY structure is being able to figure out what is the meaning of each value ... sometimes it's obvious / easy to find out, sometimes it's not. I'm not using the feature you are looking at, so I don't know the structure, but here is a similar example which should give you the idea :
@result = $session->invokeOperation( "ACT_SNMP::SNMPGet", "get",
[
[ "ANYVALARRAY",
[
[ "STRING", $deviceIP ],
[ "INT", $SNMPPort ],
[ "STRING", $_SNMPVersion ],
[ "STRING", $SNMPString ],
[ "STRING", "" ],
[ "STRING", "" ],
[ "STRING", "" ],
[ "STRING", "" ],
[ "STRING", "" ],
[ "STRING", "" ]
]
],
[ "STRING", $SNMPSysNameOID ]
] );
where the signature of the call is :
target (mandatory)
oid (mandatory)
timeout (option)
retries (option)
policy (option)
format (option)
(and you can see how to build the ANYVALARRAY structure)
HTH,
--Fred
Dmitri_Lechtchi
2 Posts
0
September 28th, 2009 18:00
Thanks, that's really helpful. I realized I was actually trying to use the wrong method - applyFilters of ICF_TopologyManager does what I need.
BTW how do you get the additional info for what should be in the ANYVALARRAY? dmctl getO only shows the following info for the "get" method:
get target oid timeout retries policy format
Thanks,
-Dmitri
FredericMeunier_0588be
143 Posts
0
September 29th, 2009 05:00