10-30-2012 03:10 PM
Hi,
I have a Cisco Catalyst 4500E Supervisor Engine 7-E and configured an EEM Script to monitor the dual core CPU Utilization through PRTG Network Monitor.
event manager applet dualcore authorization bypass
event timer cron cron-entry "* * * * 0-6"
!
action 100 cli command "en"
action 120 cli command "show process cpu | include five"
!
action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min
action 240 if $_regexp_result eq 1
action 260 end
!
action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min
action 340 if $_regexp_result eq 1
action 360 end
!
action 440 cli command "config t"
action 441 cli command "snmp mib expression owner cisco name c0cpu5sec"
action 442 cli command "expression $c0cpu5sec"
action 443 cli command "snmp mib expression owner cisco name c0cpu1min"
action 444 cli command "expression $c0cpu1min"
action 445 cli command "snmp mib expression owner cisco name c0cpu5min"
action 446 cli command "expression $c0cpu5min"
!
action 550 cli command "config t"
action 551 cli command "snmp mib expression owner cisco name c1cpu5sec"
action 552 cli command "expression $c1cpu5sec"
action 553 cli command "snmp mib expression owner cisco name c1cpu1min"
action 554 cli command "expression $c1cpu1min"
action 555 cli command "snmp mib expression owner cisco name c1cpu5min"
action 556 cli command "expression $c1cpu5min"
!
action 600 cli command "end"
!
end
It works fine but on the logging buffer there are a lot of %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:moncores) messages -one per minute- here an example:
Oct 29 17:54:01: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:dualcore)
Oct 29 17:55:01: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:dualcore)
Oct 29 17:56:01: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:dualcore)
Oct 29 17:57:01: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:dualcore)
I considered to use the logging suppress duplicates command to prevent the consecutive logging of more than one copy of the same system logging (syslog) message but it is only available to the Cisco IOS XR.
Someone could help me to determine if it is possible to avoid this messages through Embedded Syslog Manager, I tried to do that but
I was not successful.
Regards,
~Sergio
Solved! Go to Solution.
01-22-2013 06:04 AM
Yes, It is a valid SNMP RW community string but I can not monitor the dual core and I received this error:
%HA_EM-7-FMFD_SNMP_ERRCODE: fh_fd_snmp_errcode: Error status: 6 NO_ACCESS_ERROR: 1.
01-22-2013 06:27 AM
Are you able to do something like the following from an external host:
snmpset -v 1 -c tester 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 i 6
snmpset -v 1 -c tester 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 i 5
snmpset -v 1 -c tester 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 s "10"
snmpset -v 1 -c tester 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 i 4
snmpset -v 1 -c tester 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 i 1
02-11-2013 02:52 PM
I did it but I received some errors -the snmp community it is ok & the
%HA_EM-7-FMFD_SNMP_ERRCODE: fh_fd_snmp_errcode: Error status: 6 NO_ACCESS_ERROR: 1 appeared again.
C:\>snmpset -c tester -v 2c 10.10.10.254 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.9
9.111.9.99.48.99.112.117.53.115.101.99 i 6
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112
.117.53.115.101.99
C:\>
C:\>snmpset -c tester -v 2c 10.10.10.254 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.9
9.111.9.99.48.99.112.117.53.115.101.99 i 5
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112
.117.53.115.101.99
C:\>snmpset -c tester -v 2c 10.10.10.254 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.9
9.111.9.99.48.99.112.117.53.115.101.99 s "10"
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112
.117.53.115.101.99
C:\>snmpset -c tester -v 2c 10.10.10.254 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.9
9.111.9.99.48.99.112.117.53.115.101.99 i 4
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112
.117.53.115.101.99
C:\>
C:\>snmpset -c tester -v 2c 10.10.10.254 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.9
9.111.9.99.48.99.112.117.53.115.101.99 i 1
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112
.117.53.115.101.99
C:\>
02-13-2013 09:29 AM
Can you copy and paste your switch's SNMP configuration here? I'd like to inspect it. Thanks.
02-13-2013 09:48 AM
Here it is,
!
snmp-server community tester RO
snmp-server location **********************
snmp-server contact ***********************
snmp-server enable traps snmp authentication warmstart
snmp-server enable traps config
snmp-server enable traps syslog
!
02-13-2013 09:56 AM
Your "tester" is a RO string. Configure:
snmp-server community tester RW
And then things should work.
02-14-2013 06:59 PM
Done, works fine!
Thanks!
\m/
02-01-2014 12:57 PM
I configured the tcl script in a WS-C4506 and I received constantly this log:
%HA_EM-6-LOG: tm_monitor_cpu.tcl: can't read "c0cpu5sec": no such variable
%HA_EM-6-LOG: tm_monitor_cpu.tcl: while executing
%HA_EM-6-LOG: tm_monitor_cpu.tcl: "sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 string "$c0cpu5sec" community tester "
%HA_EM-6-LOG: tm_monitor_cpu.tcl: invoked from within
%HA_EM-6-LOG: tm_monitor_cpu.tcl: "$slave eval $Contents"
%HA_EM-6-LOG: tm_monitor_cpu.tcl: (procedure "eval_script" line 7)
%HA_EM-6-LOG: tm_monitor_cpu.tcl: invoked from within
%HA_EM-6-LOG: tm_monitor_cpu.tcl: "eval_script slave $scriptname"
%HA_EM-6-LOG: tm_monitor_cpu.tcl: invoked from within
%HA_EM-6-LOG: tm_monitor_cpu.tcl: "if {$security_level == 1} { #untrusted script
%HA_EM-6-LOG: tm_monitor_cpu.tcl: interp create -safe slave
%HA_EM-6-LOG: tm_monitor_cpu.tcl: interp share {} stdin slave
%HA_EM-6-LOG: tm_monitor_cpu.tcl: interp share {} stdout slave
%HA_EM-6-LOG: tm_monitor_cpu.tcl: ..."
%HA_EM-6-LOG: tm_monitor_cpu.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
%HA_EM-6-LOG: tm_monitor_cpu.tcl: Tcl policy execute failed:
%HA_EM-6-LOG: tm_monitor_cpu.tcl: can't read "c0cpu5sec": no such variable
Could you help me to avoid it...!?!?!?!?
Regards,
02-02-2014 06:20 AM
What does the switch show for the command:
show process cpu | include five
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