Technical Tip: How to view sessions for a specific virtual server
Description
Â
This article describes how to view the session table for a specific virtual server on FortiADC using the GUI or CLI.
Â
Scope
Â
FortiADC and FortiADC-VM.
Â
Solution
The session table displays information about sessions handled by FortiADC. Viewing sessions for a specific virtual server helps identify client connections and their associated real servers during troubleshooting.
Â
Method 1: Using the GUI.
Navigate to FortiView > Server Load Balance > Virtual Server.
If analytics is disabled for the required virtual server, select its checkbox and select Enable Analytics.
Note: Enabling analytics for too many items can negatively affect page loading speed. Enable it only for the virtual servers required for troubleshooting.
'Insert the screenshot showing Enable Analytics here.'.
Select OK in the confirmation dialog.
'Insert the analytics confirmation screenshot here.'.
Open the required virtual server and select the Session tab.
The session table displays connection details, including source and destination addresses and ports, session state, protocol, traffic counters, and real server name.
'Insert the Session tab screenshot here.'.
If multiple sessions are displayed, select Add Filter to narrow the results.
Refresh the table to update the displayed sessions. Expired sessions are no longer shown after the table refreshes.
 If analytics were enabled specifically for troubleshooting, disable it once troubleshooting is complete.
Â

Â
This warning will appear when analytics are enabled:

Â

Â
Method 2: Using the CLI.
Apply a session filter for the required virtual server:
diagnose server-load-balance session filter 'vs-name <Virtual Server Name>'
Replace <Virtual Server Name> with the configured virtual server name.
Verify that the filter is applied:
diagnose server-load-balance session filter showDisplay the sessions matching the filter:
diagnose server-load-balance session list
Related documents:
diagnose server-load-balance session
