Skip to main content
Version: 7.2402.x.x RR

StatusServlet

The StatusServlet displays information about the status of the nevisProxy server in plain HTML or text format. You can use the servlet for troubleshooting, for example when your server is consuming the available resources (CPU or memory), and you want to identify which requests or clients are causing the problem.

The StatusServlet makes use of the Apache module mod_status. For more information on this Apache module, see mod_status.

Beside the usual information generated by the mod_status module, the StatusServlet also displays some nevisProxy specific information about the backend services. Information is available in a table for each configured Http(s)ConnectorServlet. The table includes the following data:

  • Service-Name: Name and port of the configured service
  • Valid: Whether the backend is reachable
  • The last error message
  • Date and time of the last retry
  • Date and time of the last successful call
  • The number of requests per second
  • Received HTTP status codes from the backend

Dynamic session management also provides information to the StatusServlet, a LocalSessionStoreServlet has the following information:

  • Number of active sessions
  • Used memory
  • Available memory

While the MySQLSessionStoreServlet will show the number of active sessions.

Load balancers, for example, can use this information to provide better load balancing policies, by monitoring the health of the server and the backend services, and the availability of certain server resources.

Do not use this servlet in production!

In case you do, it is recommended restricting access to the servlet via authentication or IP restrictions.

Classname:
ch::nevis::navajo::apglue::httpd_${HTTPD_LIB_VERSION}_x::servlet::status::StatusServlet

Library:
libStatus_Servlet.so.1

Configuration

StatusLibPath

Type: path

Path to the libgeneratorsap${HTTPD_LIB_VERSION}.so library. You can usually set this parameter to: /opt/nevisproxy/lib/libgenerators_ap_${HTTPD_LIB_VERSION}.so.1.

Configuration example

To configure the StatusServlet:

  • Add the following code block to your web.xml file:

    <servlet>
    <servlet-name>StatusServlet</servlet-name>
    <servlet-class>ch:nevis:navajo:apglue:httpd_2_4_x:servlet:status::StatusServlet</servlet-class>
    <init-param>
    <param-name>StatusLibPath</param-name>
    <param-value>/opt/nevisproxy/lib/libgenerators_ap_2_4.so.1</param-value>
    </init-param>
    </servlet>
  • Map it to the desired path.

    The following code block shows a plain text response with the auto query:

    Plain text response
    centos7-test
    ServerVersion: Apache/2.4.46 (Unix) OpenSSL/1.1.1h mod_qos/11.60 navajo/4.5.0.0rc2
    ServerMPM: event
    Server Built: Mar 10 2021 21:57:56
    CurrentTime: Thursday, 11-Mar-2021 13:39:37 CET
    RestartTime: Thursday, 11-Mar-2021 13:36:47 CET
    ParentServerConfigGeneration: 1
    ParentServerMPMGeneration: 0
    ServerUptimeSeconds: 169
    ServerUptime: 2 minutes 49 seconds
    Load1: 1.46
    Load5: 1.32
    Load15: 0.69
    Total Accesses: 20
    Total kBytes: 84
    Total Duration: 468
    CPUUser: .23
    CPUSystem: .11
    CPUChildrenUser: 0
    CPUChildrenSystem: 0
    CPULoad: .201183
    Uptime: 169
    ReqPerSec: .118343
    BytesPerSec: 508.97
    BytesPerReq: 4300.8
    DurationPerReq: 23.4
    BusyWorkers: 1
    IdleWorkers: 99
    Processes: 1
    Stopping: 0
    BusyWorkers: 1
    IdleWorkers: 99
    ConnsTotal: 1
    ConnsAsyncWriting: 0
    ConnsAsyncKeepAlive: 0
    ConnsAsyncClosing: 0
    Scoreboard: __________________________W_________________________________________________________________________
    TLSSessionCacheStatus
    CacheType: SHMCB
    CacheSharedMemory: 524288
    CacheCurrentEntries: 7
    CacheSubcaches: 32
    CacheIndexesPerSubcaches: 91
    CacheTimeLeftOldestAvg: 221
    CacheTimeLeftOldestMin: 141
    CacheTimeLeftOldestMax: 299
    CacheIndexUsage: 0%
    CacheUsage: 0%
    CacheStoreCount: 7
    CacheReplaceCount: 0
    CacheExpireCount: 0
    CacheDiscardCount: 0
    CacheRetrieveHitCount: 5
    CacheRetrieveMissCount: 0
    CacheRemoveHitCount: 0
    CacheRemoveMissCount: 0
    b;system.load: 1.46
    b;centos7-test;0;QS_AllConn: 1
    /var/opt/nevisproxy/default/work;TestServlet;TestServlet-Name:TestServlet
    /var/opt/nevisproxy/default/work;AuthConnector;Service-Name:localhost:8991;Valid: true;Load: 1;last error: ;last retry: Thu, 11 Mar 2021 12:36:46 GMT; last successful call: Thu, 11 Mar 2021 12:38:59 GMT; reqs/sec:0.0166667; received statuscodes:200(2 times)
    /var/opt/nevisproxy/default/work;HttpConnectorServlet;Service-Name:localhost:8088;Valid: true;Load: 0;last error: ;last retry: Thu, 11 Mar 2021 12:36:46 GMT; last successful call: Thu, 11 Mar 2021 12:38:54 GMT; reqs/sec:0.0666667; received statuscodes:200(5 times), 401(1 times)
    /var/opt/nevisproxy/default/work;MySQLSessionStoreServlet;Number of active sessions:10
    /var/opt/nevisproxy/default/work;LocalSessionStoreServlet;Number of active sessions:4;Used memory:2540;Available memory:92224