cancel
Showing results for 
Search instead for 
Did you mean: 

create an upm event that triggers whenever a user logs in to the CLI

create an upm event that triggers whenever a user logs in to the CLI

Dan_ODonnell
New Contributor
I am trying to create an event trigger that will fire any time a user logs in to the switch. The problem I am running into is that I am trying to make a generic script that will set this up on several switch stacks on my network. Is there any generic keyword that will allow me to assign the upm event to all ports in a stack?

This is the command I'm using:

configure upm event user-authenticate profile "backup-config" ports

Based on the Concepts Guide, I feel like this is the right command. Any help would be appreciated.
2 REPLIES 2

Sumit_Tokle
Contributor
Yes... I have already mentioned below script in some other post.

Step 1: Create log filter and match the log which is generating when anyone logs in.



create log filter SUMIT

configure log filter SUMIT add events AAA.authPass



Step 2: Create UPM profile name as “TEST”



create upm profile TEST



Step 3: Type below script, please change the ftp ip address.



enable cli scripting per

set var CLI.OUT 0



show switch

set var input $TCL(split ${CLI.OUT} " ")

set var x $TCL(lsearch -glob $input "*SysName*")

set var x $TCL(lindex $input $x)

set var x $TCL(split $x " ")

set var switchname $TCL(lindex ${x} 10)



set var seconds $TCL(clock seconds)

set var date $TCL(clock format $seconds -format {%Y-%m-%d})



configure cli mode scripting ignore-error



tftp put 10.120.94.11 vr vr-mgmt primary.cfg $(date)/$(switchname)-$(date).cfg



create log messages "config uploaded"

Step 4: Point the log messages to the UPM script which we have created.



create log target upm TEST

enable log target upm TEST

configure log target upm TEST filter SUMIT severity Info

Dan_ODonnell
New Contributor
I think I figured it out. I actually needed to set up an EMS filter and trigger rather than the event trigger.
GTM-P2G8KFN