I have a cisco ASA 5520 with 8.0(4)23 IOS and i am trying to pull all the users, groups, session details from ASA

I have upgraded from 8.0(3) as there were known issues

I am still not able to get the username associated with the connection
LVL 12
Who is Participating?
The current IPSEC VPN  peers are all leafs on . Thats in the CISCO-IPSEC-FLOW-MONITOR-MIB, you can get that here-->
 I have not seen the usernames in there anywhere though.

Each polling or trap host must be individually configured in the ASA, something like this:
snmp-server host INSIDE poll community TestTestTest version 2c  (this host can poll only, not get traps)

depending on your NMA, you could have it use a perl script to ssh to the asa, run the command above, and then parse the data. non-trivial but do-able. I believe Ciscoworks has that feature, but I'm not certain.

Another alternative is to parse syslog at your NMS to get what you want. As long as you are logging at 4 or higher, you'll see stuff like this:
Apr 06 2009 14:28:20: %ASA-3-713119: Group = TestTestTest, Username = wrsmith, IP =, PHASE 1 COMPLETED
Apr 06 2009 18:45:10: %ASA-4-113019: Group = TestTestTest, Username = wrsmith, IP =, Session disconnected. Session Type: IPsecOverNatT, Duration: 5h:47m:50s, Bytes xmt: 2104395, Bytes rcv: 1053432, Reason: User Requested

most syslog-aware systems can parse this to maintain a table of the current and past connections.
Are you trying to see logged in admin users, or VPN users, or established TCP sessions, or something else?
chandru_solAuthor Commented:
VPN Users logged in using CISCO VPN clients

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Kamran ArshadIT AssociateCommented:

You can easily accomplish this using a VPN Analyzer. Below are good examples;

Adventnet Firewall Analyzer
AlgoSec Firewall Analyzer
Firewall Analyzer
Enabling SNMP

The SNMP agent that runs on the security appliance performs two functions:

"Replies to SNMP requests from NMSs.

"Sends traps (event notifications) to NMSs.

To enable the SNMP agent and identify an NMS that can connect to the security appliance.

Step 1 Ensure that the SNMP server on the security appliance is enabled
hostname(config)# snmp-server enable

Step 2 To identify the IP address of the NMS that can connect to the security appliance.

hostname(config)# snmp-server host interface_name ip_address [trap | poll] [community
text] [version 1 | 2c] [udp-port port]

Specify trap or poll if you want to limit the NMS to receiving traps only or browsing (polling) only.

Step 3 To specify the community string,

hostname(config)# snmp-server community key

Step 4 (Optional) To set the SNMP server location or contact informatio

hostname(config)# snmp-server {contact | location} text

Step 5 To enable the security appliance to send traps to the NMS.

hostname(config)# snmp-server enable traps [all | syslog | snmp [trap] [...] |
entity [trap] [...] | ipsec [trap] [...] | remote-access [trap]]

The default configuration has all snmp traps enabled (snmp-server enable traps snmp authentication linkup linkdown coldstart). You can disable these traps using the no form of this command with the snmp keyword. However, the clear configure snmp-server command restores the default enabling of SNMP traps.

If you enter this command and do not specify a trap type, then the default is syslog. (The default snmp traps continue to be enabled along with the syslog trap.)

Traps for snmp include:





Traps for entity include:




Traps for ipsec include:



Traps for remote-access include:


Step 6 To enable system messages to be sent as traps to the NMS.

hostname(config)# logging history level

You must also enable syslog traps using the preceding snmp-server enable traps command.

Step 7 To enable logging, so system messages are generated and can then be sent to an NMS.

hostname(config)# logging enable

hostname(config)# snmp-server host

hostname(config)# snmp-server location building 42

hostname(config)# snmp-server contact rootcoolk

hostname(config)# snmp-server community cisco

Hey thanks "uetian1707", I appreciate you jumping into my question!

From the CLI (without downloading and installing any software or relying on a GUI), you could just login to the ASA, go to enable mode, then type something like:
 sh ipsec sa det | grep current_peer

and get an output like:
      current_peer:, username: username1
      current_peer:, username: username2
      current_peer:, username: username3

(IPs/usernames are fakes of course, but the output is right from one of my ASAs)
(and the full command is  "show ipsec sa detail | grep current_peer". Check it out without the grep to see all the info in there, it's a lot!)
MAN there are a LOT of question stealers out today! Thanks Guys, way to go! With lots of extraneous information and overcomplicated pseudo solutions too, SWEET!
chandru_solAuthor Commented:

Can i get the information using OID as i am trying to get this information from our NMS?
chandru_solAuthor Commented:

Is there any reason why the username is not displayed as part of the other SNMP strings?

No telling what reasoning goes into designing a MIB by any given vendor, and it MAY be in there somewhere, but I walked the mib to double check that perhaps it was in a MIB i didn't have loaded, but I saw no usernames in there anywhere.

But between polling the MIBs and parsing your syslog outputs in your NMS, you should be able to get what you want.
Any success in resolving this issue? Did I answer your question?
chandru_solAuthor Commented:
Sorry for the delay in getting back to you on this?
I am still not able to get the usernames in SNMP or using OID?
Is there no way of getting this information? Can you let me know how to setup the syslog to get only the userlogin information?

chandru_solAuthor Commented:
Any update on this
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.