Generate an SNMP trap or syslog message on login/out

Unanswered Question
Mar 6th, 2007
User Badges:

I need to be able to generate either sn SNMP trap or a syslog message when ever someone logs into or out of a IOS router or switch. This is for successful logins.outs.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Richard Burts Tue, 03/06/2007 - 12:15
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN


This has been a request many times from many people. And in release 12.3(4)T Cisco introduced enhancements that make this possible:

Logging messages can be generated for successful login requests via the new global configuration command login on-success; the login on-failure command generates logs for failed login requests.

For more information this link is very helpful:



jwheat Tue, 03/06/2007 - 12:20
User Badges:


Thanks for the reply. My Cisco SE had informed me of the same new feature. It doesn't quite do what we want. It does not include the username of the person logging in, although there is a field for it, nor does it send a message when the user logs out. In addition, I wasn't able to get the "login on-failure" feature to work in the 12.2(35)SE switch code I was using to test.

Thanks again.


This Discussion