Add to snmpd.conf: pass .1.3.6.1.4.1.11821 /home/fede/snmp_script/prova1 pass .1.3.6.1.4.1.11822 /home/fede/snmp_script/prova2
and use two separate scripts: # prova1 #!/bin/sh echo .1.3.6.1.4.1.11821 echo integer echo 20 # prova2 #!/bin/sh echo .1.3.6.1.4.1.11822 echo integer echo 21 -----Mensaje original----- De: [email protected] [mailto:[email protected]] Enviado el: viernes, 30 de enero de 2009 15:23 Para: [email protected] Asunto: snmp script i wrote a simple script #!/bin/sh echo .1.3.6.1.4.1.11821 echo integer echo 20 i insert in snmpd.conf pass .1.3.6.1.4.1.11821 /home/fede/snmp_script/prova and when i do snmpget -O n -v1 -c public localhost .1.3.6.1.4.1.11821 is's ok . 1.3.6.1.4.1.11821 = INTEGER: 20 now, if i want add another output of my script e.g. echo 30, can i do? i try #!/bin/sh echo .1.3.6.1.4.1.11821 echo integer echo 20 echo .1.3.6.1.4.1.11822 echo integer echo 21 add on snmpd.conf pass . 1.3.6.1.4.1.11822 /home/fede/snmp_script/prova but snmpget -O n -v1 -c public localhost .1.3.6.1.4.1.11822 return 20 not 21 i first try with extend but snmp return value as a string not an integer ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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
