Hi!
I extended my agent to compare voltage value (greater or less than
12 volts) gotten through data acquisiton.
My goal is send traps warning when the voltage is less than 12 V,
for example.
The script has if declaration to decide between greater or less.
My idea is monitor inserting this instruction in snmpd.conf:
monitor -r 30 -e voltage "tensao ok"
SNMPv2-SMI::enterprises.30778.9.4.1.2.7.47.98.105.110.47.115.104.2 == 1
monitor -r 30 -e voltage "tensao Nok"
SNMPv2-SMI::enterprises.30778.9.4.1.2.7.47.98.105.110.47.115.104.2 == 0
But 30778.9.4.1.2.7.47.98.105.110.47.115.104.2 is *string* as shown
below. I can“t compare strings and integers.
How to change the type for 30778.9.4.1.2.7.47.98.105.110.47.115.104.2?
Is my idea correct or are there better ideas?
Thank very much!
SNMPv2-SMI::enterprises.30778.9.1.0 = INTEGER: 1
SNMPv2-SMI::enterprises.30778.9.2.1.2.7.47.98.105.110.47.115.104 =
STRING: "/cygwin/home/fujita/check12v.sh"
SNMPv2-SMI::enterprises.30778.9.2.1.5.7.47.98.105.110.47.115.104 =
INTEGER: 5
SNMPv2-SMI::enterprises.30778.9.2.1.6.7.47.98.105.110.47.115.104 =
INTEGER: 1
SNMPv2-SMI::enterprises.30778.9.2.1.7.7.47.98.105.110.47.115.104 =
INTEGER: 1
SNMPv2-SMI::enterprises.30778.9.2.1.20.7.47.98.105.110.47.115.104 =
INTEGER: 4
SNMPv2-SMI::enterprises.30778.9.2.1.21.7.47.98.105.110.47.115.104 =
INTEGER: 1
SNMPv2-SMI::enterprises.30778.9.3.1.1.7.47.98.105.110.47.115.104 =
STRING: "13.025861"
SNMPv2-SMI::enterprises.30778.9.3.1.2.7.47.98.105.110.47.115.104 =
STRING: "13.025861
1
13.025861 is greater than 12"
SNMPv2-SMI::enterprises.30778.9.3.1.3.7.47.98.105.110.47.115.104 =
INTEGER: 3
SNMPv2-SMI::enterprises.30778.9.3.1.4.7.47.98.105.110.47.115.104 =
INTEGER: 0
SNMPv2-SMI::enterprises.30778.9.4.1.2.7.47.98.105.110.47.115.104.1 =
STRING: "13
.025861"
*SNMPv2-SMI::enterprises.30778.9.4.1.2.7.47.98.105.110.47.115.104.2 =
STRING: "1"*
SNMPv2-SMI::enterprises.30778.9.4.1.2.7.47.98.105.110.47.115.104.3 =
STRING: "13.025861 is greater than12"
-------------------------------------------------------------------------
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