Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

IOS 15.1 Kron process / logging and sending the output from "show license udi"

I am trying to use a kron process to send output from the "show license udi" command to a logging host. 

My requirements are:

send license udi output to remote host.

bonus requirements:

send current feature set to remote logging host.

A couple questions I guess.

1.  What level of precidence are kron processes considered?  Informational?  They don't seem to be listed anywhere that I can find.

2.  Is there another way to periodically send the router serial number, license type and ios version to a logging host?

this is what I am doing currently, but I'm unsure if this is correct.

kron policy-list UDI

cli show license udi

!

kron occurrence UDI600 in 600 recurring

policy-list UDI

logging trap informational

logging console debug

logging userinfo

logging origin-id string "xx"

logging source-interface xxx

logging host xxxxxxxx

logging host xxxxxxx

logging host xxxxxxxx

If there are any changes I need to make to the kron process, or anything added to the logging process please let me know.  Thanks

Message was edited by: craig pardo

Everyone's tags (2)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Blue

Re: IOS 15.1 Kron process / logging and sending the output from

I don't see how the kron results are getting passed to syslog at all.

First approach coming to mind is to do it through an EEM applet:

event manager applet ShowCommands

description send show license udi and show version output to syslog

event timer cron name "daily_ShowCommands_cron" cron-entry "0 1 * * *"

action 1.0 cli command "enable"

action 2.0 cli command "show license udi"

action 3.0 cli command "show version"

action 4.0 syslog msg "show license udi and show version output: $_cli_result"

Offhand, I don't know what logging level EEM syslogs are using, but it can be found quickly by temporarily changing "logging trap informational" to "logging trap debugging" and observing the incoming logs on the syslog server. Then adjust "logging trap " accordingly.

Cisco Employee

IOS 15.1 Kron process / logging and sending the output from "sho

EEM syslogs are sent using buginf so you need to have logging trap debugging enabled.  On top of that you can control the level with the priority command.  By default they go out with priority/severity 6 (informational).  You can adjust that to whatever value you want, but you need to trap on debugging.

3 REPLIES
Blue

Re: IOS 15.1 Kron process / logging and sending the output from

I don't see how the kron results are getting passed to syslog at all.

First approach coming to mind is to do it through an EEM applet:

event manager applet ShowCommands

description send show license udi and show version output to syslog

event timer cron name "daily_ShowCommands_cron" cron-entry "0 1 * * *"

action 1.0 cli command "enable"

action 2.0 cli command "show license udi"

action 3.0 cli command "show version"

action 4.0 syslog msg "show license udi and show version output: $_cli_result"

Offhand, I don't know what logging level EEM syslogs are using, but it can be found quickly by temporarily changing "logging trap informational" to "logging trap debugging" and observing the incoming logs on the syslog server. Then adjust "logging trap " accordingly.

Cisco Employee

IOS 15.1 Kron process / logging and sending the output from "sho

EEM syslogs are sent using buginf so you need to have logging trap debugging enabled.  On top of that you can control the level with the priority command.  By default they go out with priority/severity 6 (informational).  You can adjust that to whatever value you want, but you need to trap on debugging.

New Member

IOS 15.1 Kron process / logging and sending the output from "sho

Thanks to both of you.  I have never worked with the event manager before, and this has greatly improved my knowledge.  I took the advice from both of you, and ran it through a couple different tests and it works perfect!

972
Views
5
Helpful
3
Replies
CreatePlease to create content