Hello all.
I am following a strange behaviour in net-snmp.

I've configured 6 script and configured the extensions. Configured 2
monitors, with the condition of the return status of the script.

Here I give you a snmpd.conf excerpt:
#ucd extensions
#sh <extTable.Names> <script> <args>
sh trf          /export/home/sma/loadmon-dir.sh trf
sh q3           /export/home/sma/loadmon-dir.sh q3
sh snmp         /export/home/sma/loadmon-dir.sh snmp
sh ips          /export/home/sma/loadmon-dir.sh ips
sh combi        /export/home/sma/loadmon-dir.sh combi
sh flexi        /export/home/sma/loadmon-dir.sh flexi

#trap monitor
monitor -u readonly -r 10 -o extOutput -o extNames "alert on" extResult > 0
monitor -u readonly -r 10 -o extOutput -o extNames "alert off" extResult ==
0

I do a snmpwalk to see the extResult and extOutput
UCD-SNMP-MIB::extResult.1 = INTEGER: 1
UCD-SNMP-MIB::extResult.2 = INTEGER: 1
UCD-SNMP-MIB::extResult.3 = INTEGER: 0
UCD-SNMP-MIB::extResult.4 = INTEGER: 0
UCD-SNMP-MIB::extResult.5 = INTEGER: 1
UCD-SNMP-MIB::extResult.6 = INTEGER: 0
UCD-SNMP-MIB::extOutput.1 = STRING: (1607 fich)
UCD-SNMP-MIB::extOutput.2 = STRING: (1092 fich, 27.4h)
UCD-SNMP-MIB::extOutput.3 = STRING:
UCD-SNMP-MIB::extOutput.4 = STRING:
UCD-SNMP-MIB::extOutput.5 = STRING: (95.2h)
UCD-SNMP-MIB::extOutput.6 = STRING:

The strange behaviour:
The traps received are:
        DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1029)
0:00:10.29      SNMPv2-MIB::snmpTrapOID.0 = OID:
DISMAN-EVENT-MIB::mteTriggerFired      DISMAN-EVENT-MIB::mteHotTrigger =
STRING: SPOTS files alert on  DISMAN-EVENT-MIB::mteHotTargetName =
STRING:    DISMAN-EVENT-MIB::mteHotContextName = STRING:
DISMAN-EVENT-MIB::mteHotOID = OID: UCD-SNMP-MIB::extResult.1
DISMAN-EVENT-MIB::mteHotValue = INTEGER: 1      UCD-SNMP-MIB::extOutput.1 =
STRING: (1607 fich) UCD-SNMP-MIB::extNames.1 = STRING: trf
2008-07-15 15:24:07 127.0.0.1 [127.0.0.1]:
        DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1040)
0:00:10.40      SNMPv2-MIB::snmpTrapOID.0 = OID:
DISMAN-EVENT-MIB::mteTriggerFired      DISMAN-EVENT-MIB::mteHotTrigger =
STRING: SPOTS files alert on  DISMAN-EVENT-MIB::mteHotTargetName =
STRING:    DISMAN-EVENT-MIB::mteHotContextName = STRING:
DISMAN-EVENT-MIB::mteHotOID = OID: UCD-SNMP-MIB::extResult.2
DISMAN-EVENT-MIB::mteHotValue = INTEGER: 1      UCD-SNMP-MIB::extOutput.2 =
STRING: (1092 fich, 27.4h)  UCD-SNMP-MIB::extNames.2 = STRING: q3
2008-07-15 15:24:16 127.0.0.1 [127.0.0.1]:
        DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2030)
0:00:20.30      SNMPv2-MIB::snmpTrapOID.0 = OID:
DISMAN-EVENT-MIB::mteTriggerFired      DISMAN-EVENT-MIB::mteHotTrigger =
STRING: SPOTS files alert on  DISMAN-EVENT-MIB::mteHotTargetName =
STRING:    DISMAN-EVENT-MIB::mteHotContextName = STRING:
DISMAN-EVENT-MIB::mteHotOID = OID: UCD-SNMP-MIB::extResult.2
DISMAN-EVENT-MIB::mteHotValue = INTEGER: 1      UCD-SNMP-MIB::extOutput.2 =
STRING: (1092 fich, 27.4h)  UCD-SNMP-MIB::extNames.2 = STRING: q3
2008-07-15 15:24:16 127.0.0.1 [127.0.0.1]:
        DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2034)
0:00:20.34      SNMPv2-MIB::snmpTrapOID.0 = OID:
DISMAN-EVENT-MIB::mteTriggerFired      DISMAN-EVENT-MIB::mteHotTrigger =
STRING: SPOTS files alert on  DISMAN-EVENT-MIB::mteHotTargetName =
STRING:    DISMAN-EVENT-MIB::mteHotContextName = STRING:
DISMAN-EVENT-MIB::mteHotOID = OID: UCD-SNMP-MIB::extResult.3
DISMAN-EVENT-MIB::mteHotValue = INTEGER: 0      UCD-SNMP-MIB::extOutput.3 =
STRING:     UCD-SNMP-MIB::extNames.3 = STRING: snmp

Or, in a simpler format:
Timeticks: (1029) 0:00:10.29 ; Trigger = "alert on" ; extResult.1 = 1 ;
extOutput.1 = "(1607 fich)" ; extNames.1 = trf
Timeticks: (1040) 0:00:10.40 ; Trigger = "alert on" ; extResult.2 = 1 ;
extOutput.2 = "(1092 fich, 27.4h)" ; extNames.2 = q3
Timeticks: (2030) 0:00:20.30 ; Trigger = "alert on" ; extResult.2 = 1 ;
extOutput.2 = "(1092 fich, 27.4h)" ; extNames.2 = q3
Timeticks: (2034) 0:00:20.34 ; Trigger = "alert on" ; extResult.3 = 0 ;
extOutput.3 = "" ; extNames.3 = snmp

Questions:
1) Where are the "other" traps?
2) Why does the forth trap received has the extResult=0 but gets caught in
the "alert on" monitor?

More important than the previous questions: what am I doing wrong?

Some help would be appreciated.

-- 
José Martins
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to