Unsolved
This post is more than 5 years old
8 Posts
0
991
Dynamic model - instrumentation error: SNMP-E-EXP_NOSUCHINSTANCE-No such instance
Hi all,
NOTE: I've gone through the provided documentation and many useful posts/discussions on this forum.
NOTE: Using IP_9.2
Goal: create model + instrumentation class to poll for status of the device.
Let's say there is a host device with a custom component (it's a service for which MIB provides stats) for which I want SMARTS to poll for its (component's) current status on each polling cycle.
What I've done so far:
1) model code + instrumentation code
interface NN_Component : ProtocolService
{
propagate attribute int ServerPortStatus
"(1) UP (2) DOWN (3) DEGRADED (4) UNKNOWN "
<= NN_Component_Performance, InstrumentedBy, NN_ServerPortStatus;
}
interface NN_Component_Performance : ICIM_Instrumentation
{
instrument SNMP {
ServerPortStatus = "1.3.6.1.4.1.*.*.23"
};
//instrumented attribute to get current state of this server:port
readonly instrumented attribute int NN_ServerPortStatus;
event IsUp
"if SNMP poll returns value of 1"
= NN_ServerPortStatus == 1;
export IsUp;
}
this compiles fine, no errors.
2) create instrumentation: after discovery of the host and containment, I'm creating instrumentation for these "Components"
agentObj = sysObj->getSNMPAgent() ? LOG,IGNORE;
poller = object(getInstances("SNMP_AccessorInterface")[0]) ? LOG,IGNORE;
instObj = create("SNMP_Credentials", "env-setting-credential-".string(thread())) ? LOG,IGNORE;
instObj->init() ? LOG,IGNORE;
systObj = object("NN_Component", "SVC-hostname/ip:port") ? LOG,IGNORE;
instrObj = systObj->makeInstrumentation("NN_Component_Performance") ? LOG,IGNORE;
icimManager = object(getInstances("ICIM_Manager")[0])? LOG,IGNORE;
icimManager->insertInstrumentation(
poller,
agentObj,
instrObj->Name,
"",
instObj) ? LOG,IGNORE;
interval = 20;
timeout = 700;
retries = 5;
poller->polling_parameters += list(instrObj->Name, interval, interval, timeout, retries, -1 ) ? LOG,IGNORE;
this creates "InstrumentedBy" relationship. At this point I can see the greyed out attribute and custom event in Console GUI.
NOTE: I've subscribed to the event in conf file:
GA_SubscriberProfile::PROFILE-default
{
subscriptions = {
*
{ "NN_Component_Performance", ".*", "IsUp", 77825 }
}
}
3) SNMP poller logs shows this error code.
Instance Name: I-NN_Component_Performance-SVC-hostname/ip:port
Attribute Name: NN_ServerPortStatus
Polling Period: 20
Last polled At: May 10, 2014 11:35:07 AM EDT
Cached Value:
Last Error: SNMP-E-EXP_NOSUCHINSTANCE-No such instance
Unconstrained Polling Period: 20
Able To Poll: TRUE
And that is where I'm stuck, as I don't know what is causing this. I'd appreciate any help.
Thanks.
mboparai
8 Posts
0
May 12th, 2014 12:00
ah, it was just incorrect oid that was causing this.
figured it out after running act-snmp->get for this oid and it returned the same error.
PaulORourke
170 Posts
0
May 14th, 2014 00:00
Hi mboparai,
Thanks for the update.
Please let me know if have any additional questions.
Kind Regards,
Paul O'Rourke