> > I append value definition for completeness:
> > test    OBJECT-TYPE
> >                SYNTAX          Unsigned32
> >                MAX-ACCESS      read-write
> >                STATUS          current
> >                DESCRIPTION     "description"
> >        ::=     { control 2 }
> >
> > Is Unsigned32 type OK for setEvent?
> 
> Yes - that should be fine.
> 
> What about the definition of "test2"?
>   (which is the object that you specify in the setEvent line)
Test2   OBJECT-TYPE
                SYNTAX          Unsigned32
                MAX-ACCESS      read-only
                STATUS          current
                DESCRIPTION     "description"
        ::=     { counters 1 }
> 
> > It is handled in a dynamic module using netsnmp_register_ulong_instance
> function.
> 
> Hmmm... you should probably be registering test.0 (assuming this is a
> scalar object)
> Or else using "netsnmp_register_scalar"

This is how the registration looks like in the code:
static oid test_oid[]           = { 1,3,6,1,4,1,25006,1,1,1,1,2,0 };
netsnmp_register_ulong_instance( "test",
                               test_oid, OID_LENGTH( test_oid),
                               &test_var, NULL);

> And the monitor directive would be more efficient with the '-i'
> option, if there's only
> a single instance to be monitored.

I've already tried -l, when used in monitor definition I got
/etc/snmp/snmpd.conf: line 449: Error: unrecognised option
net-snmp: 1 error(s) in config file(s)

when used (-l) in setEvent I got
setEvent OID: -l
unknown set OID
net-snmp: 1 error(s) in config file(s)

-i I cannot try - I have no varbind for use.

what seems strange to me is that I can find later in log statement (firing 
setEvent - I specified only this one) - it's usually second invocation of the 
monitor - but the value stays unchanged.
> 
Michal Filka

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to