[c-nsp] How does Cisco IOS EEM SNMP event polling internally work?
Martin T
m4rtntns at gmail.com
Tue Jun 9 06:56:49 EDT 2015
Lukas,
thanks! With "debug event manager detector snmp" and "debug event
manager detector snmp-notification" I saw following messages:
*Jun 8 14:16:59.113: fh_fd_snmp_process_async
*Jun 8 14:16:59.113: fh_fd_snmp_process_poll_timer: re=0x649B1B78,
timer_type=POLL
*Jun 8 14:16:59.113: snmp_exit_comb_check:Returning TRUE
*Jun 8 14:16:59.113: snmp_value_uint_compare:op1=6 op2=0 ret=TRUE
*Jun 8 14:16:59.113: snmp_entry_value_check:Returning TRUE
*Jun 8 14:16:59.113: fh_fd_snmp_event_match: re = 0x649B1B78, num_matches = 1
*Jun 8 14:16:59.113: fh_fd_snmp_start_poll_timer: start_t=5000
*Jun 8 14:16:59.113: fh_send_snmp_fd_msg: msg_type=64
*Jun 8 14:16:59.113: fh_send_snmp_fd_msg: sval=0
*Jun 8 14:16:59.117: %HA_EM-6-LOG: CPU_usage: CPU utilization for
last 5 seconds was over 90%. Logging information to file
flash:/CPU_usage.txt
One addition question- what is the best practice to poll different
counters and data like CPU or memory usage in EEM applets? Use this
SNMP method where possible and CLI parsing(with a help of TCL if
needed) as a last resort?
thanks,
Martin
On 6/5/15, Lukas Tribus <luky-37 at hotmail.com> wrote:
> Hi Martin,
>
>
>> As seen above, SNMP OID polling interval is 0.5s. Does this command
>> execute internally something like snmpget after every 500ms?
>
> I suppose it does.
>
>
>> I debugged SNMP events(for example "debug snmp requests" in exec mode)
>> and this "event snmp oid ..." command did not seem to trigger any SNMP
>> related events.
>
> I think "debug snmp ..." is for classical on-the-wire SNMP traffic.
>
> For EEM SNMP event triggers, I would use the EEM debug infrastructure:
>
> debug event manager detector snmp
> debug event manager detector snmp-notification
> debug event manager detector snmp-object
>
>
>
> Regards,
>
> Lukas
>
>
More information about the cisco-nsp
mailing list