Martini Monitoring User Sessions
Martini's HTTP sessions are managed by the embedded Tomcat instance. To effectively monitor and manage these sessions, the Martini Server Runtime Admin web interface offers a comprehensive set of tools.
Accessing User Sessions
To view active sessions, navigate to the Sessions page:
- Hover over the Connections menu.
- Click User Sessions from the submenu.
This action will direct you to a page displaying all active sessions along with their key details.
Viewing Session Details
To inspect further details about an active session:
- Click on its session ID in the table.
- A panel will appear on the right-hand side, showcasing the session's information.
The following session properties are presented:
Name | Description |
---|---|
Context | Servlet context's context path |
Remote Host | The last client that sent the request |
User Agent | The last HTTP request's user agent, extracted from its User-Agent header |
Requests | The total number of HTTP requests executed during the session |
Last URI Requested | The last URI requested during the session |
Service Invokes | The total number of HTTP request invocations counted as services calls |
Total Request Time (ms) | The total duration of all HTTP requests |
Total Service Time (ms) | The total duration of all service calls |
Longest Request Time (ms) | The duration of the longest-running HTTP request during the session |
Longest Service Time (ms) | The duration of the longest-running service invoke during the session |
Average Request Time (ms) | Average duration of HTTP requests during the session |
Average Service Time (ms) | Average duration of service invokes during the session |
Requests per minute | The total number of requests per minute during the session |
Invokes per minute | The total number of service invokes per minute during the session |
Terminating a Session
To terminate an active HTTP session:
- Locate the session in the table.
- Click Kill on the right-hand side of its row.
REST API
Martini also provides REST endpoints for session management. This API enables remote operations such as:
- Retrieving a list of sessions
- Getting statistics for a session
- Terminating a session