04-12-2018 07:07 AM - edited 03-01-2019 06:31 PM
I try to use these actions on my EEM script:
action 10.0 info type snmp oid .1.3.6.1.2.1.1.4.0 set-type string "darkfool@mail.ru" community SWITCH ipaddr 10.1.101.21
Than get syslog:
Apr 12 16:20:22 10.1.101.1 000250: Apr 12 13:20:21.088: %HA_EM-7-FMFD_SNMP_OID_MAKE_FAIL: fh_fd_snmp_varbind_make: Unable to build an oid string into a SNMP oid; oid = .1.3.6.1.2.1.1.4.0
Apr 12 16:20:22 10.1.101.1 000251: Apr 12 13:20:21.088: %HA_EM-7-FMFD_SNMP_VARBIND_FAIL: fh_fd_snmp_set_var_remote: Unable to create a SNMP varbind
But when I try to execute bush-script at below, work result is sucess:
#!/bin/sh
#
snmpset -v 1 -c SWITCH 10.1.101.21 .1.3.6.1.2.1.1.4.0 string "darkfool@mail.ru"
How configure action EEM?
04-14-2018 08:06 AM
The leading '.' is a product of SNMP tools like HPOV and net-snmp. It is not part of the spec, and SNMP Research's stack doesn't use them. Leave out the leading '.' and it will work.
04-15-2018 11:39 PM
I removed leading "."and action worked partially. Work but slowly. Result syslog:
000153: Apr 16 06:15:22.882: %HA_EM-7-FMFD_SNMP_RESP_TIMEOUT: fh_fd_do_snmp_request_remote: SNMP response has timed out
04-16-2018 06:49 AM
Does it sometimes work and sometimes timeout, or does it always timeout?
Given you're using a remote SNMP operation, you should check your SNMP ACLs to make sure the source address of the router is allowed to make an SNMP Set.
04-16-2018 07:05 AM
This action work with timeout always. Snmp config on sourse C2811:
snmp-server manager
snmp-server enable traps event-manager
snmp-server host 10.1.101.22 public event-manager
event manager applet Test2
event none
action 10.0 info type snmp oid 1.3.6.1.2.1.1.4.0 set-type string darkfool@mail.ru community SWITCH ipaddr 10.1.101.21
I try other action and work w/timeout:
event manager applet Test
event none
action 10.0 info type snmp oid 1.3.6.1.4.1.25728.8900.1.1.13.3 set-type int 1 community SWITCH ipaddr 10.1.101.21
Destination device support snmp v1 only. May be it's reason timeoutes?
04-16-2018 07:11 AM
I believe the SNMP operations are going to use v2c to support larger objects. There is no way to control version from EEM, but you can try executing this EXEC-level command:
snmp set v1 10.1.101.21 SWITCH oid 1.3.6.1.2.1.1.4.0 string darkfool@mail.ru
04-19-2018 10:46 PM
How can I execute this command ("snmp set v1 10.1.101.21 SWITCH oid 1.3.6.1.2.1.1.4.0 string darkfool@mail.ru")?
C2811#snmp set ?
% Unrecognized command
C2811#snmp ?
% Unrecognized command
C2811#snmp
I do not understand...
04-20-2018 07:05 AM
This is a hidden command. you can't use '?'. You'll need to type it all out and trust it will work.
04-24-2018 12:09 AM
Hi. I try execute command and result below:
C2811>en
Password:
C2811#snmp set v1 10.1.101.21 SWITCH oid 1.3.6.1.2.1.1.4.0 string darkfool@mail.ru
Timeout
C2811#
Than I turn on debug snmp packets...
C2811#debug snmp packets
C2811#snmp set v1 10.1.101.21 SWITCH oid 1.3.6.1.2.1.1.4.0 string darkfool@mail.ru
Timeout
C2811#sh logg
000186: Apr 24 07:01:11.005: SNMP: Set request, reqid 7, errstat 0, erridx 0
system.4.0 = darkfool@mail.ru
000187: Apr 24 07:01:11.013: SNMP: Packet sent via UDP to 10.1.101.21.161
000188: Apr 24 07:01:11.021: SNMP: Packet received via UDP from 10.1.101.21 on BVI1
000189: Apr 24 07:01:21.013: SNMP: Set request, reqid 8, errstat 0, erridx 0
system.4.0 = darkfool@mail.ru
000190: Apr 24 07:01:21.021: SNMP: Packet sent via UDP to 10.1.101.21.161
000191: Apr 24 07:01:21.029: SNMP: Packet received via UDP from 10.1.101.21 on BVI1
000192: Apr 24 07:01:41.021: SNMP: Set request, reqid 9, errstat 0, erridx 0
system.4.0 = darkfool@mail.ru
000193: Apr 24 07:01:41.029: SNMP: Packet sent via UDP to 10.1.101.21.161
000194: Apr 24 07:01:41.037: SNMP: Packet received via UDP from 10.1.101.21 on BVI1
Oid has been set to "darkfool@mail.ru" but after timeout. How execute command without timeouts? It's possable?
04-24-2018 06:44 AM
You can increase the timeout and retries keywords after the community string:
snmp set v1 10.1.101.21 SWITCH timeout 10 retry 1 oid 1.3.6.1.2.1.1.4.0 string darkfool@mail.ru
But a bigger question is why does the device accept the change without sending a SET RESPONSE in a timely manner?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide