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

  • 0
  • 1
  • Question
  • Updated 4 years ago
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 <port_list>

Based on the Concepts Guide, I feel like this is the right command. Any help would be appreciated.
Photo of Dan ODonnell

Dan ODonnell

  • 112 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Dan ODonnell

Dan ODonnell

  • 112 Points 100 badge 2x thumb
I think I figured it out. I actually needed to set up an EMS filter and trigger rather than the event trigger. 
Photo of Sumit Tokle

Sumit Tokle, Alum

  • 5,738 Points 5k badge 2x thumb
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 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