cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2427
Views
5
Helpful
3
Replies

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

craig pardo
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

yjdabear
VIP Alumni
VIP Alumni

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.

View solution in original post

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.

View solution in original post

3 Replies 3

yjdabear
VIP Alumni
VIP Alumni

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.

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.

craig pardo
Level 1
Level 1

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!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco