Prometheus endpoint for statistics collection

Sterling™ Order Management System Software provides statistics, such as API response time and order line creation, that can be used for analytics. The text format that is used by the Prometheus endpoint can be used by third-party libraries and monitoring systems.

You can use Prometheus metrics that are included in the smcfs.war file to scrape statistics from an endpoint into the Prometheus format. A new /servlets/MetricsServlet servlet endpoint, which uses the format https://<host:port>/smcfs/servlets/MetricsServlet, is included in the smcfs.war file. This URL must be accessible to the statistic collection utility that you want to use to scrape the statistics from this endpoint.

For the scrape interval, the default value for the plt.statistics.collection.interval property is set for 2 minutes, so the statisticsConsumers is invoked every 2 minutes. Every 2 minutes, the /servlets/MetricsServlet metrics endpoint or the endpoint for agent servers is refreshed with new statistics. Ensure that the scrape interval to fetch data from the /servlets/MetricsServlet metrics endpoint is not less than 2 minutes or less than the value that is defined in the plt.statistics.collection.interval property.

The agent server Java™ (JVM) exposes the Prometheus metrics on a different URL, which is <host:port>/metrics. Because the agent server is a stand-alone JVM, it does not have the default capabilities to serve HTTP requests that are invoked by the statistics collection utility to scrape Prometheus. The capability to serve HTTP requests is provided by an embedded Netty server that is enabled when Prometheus statistics collection is enabled.
Note: The application does not support filtering time series that are returned by the application or agent server endpoint.

If Prometheus statistics collection is enabled by setting the yfs.prometheus.enabled property to true, then a Netty server handler is started. If the AGENT_HTTP_ENABLED environment variable is set to true, the Netty server listens at a port that is defined by the AGENT_HTTP_PORT environment variable. If not defined, the Netty server attempts to start at port 8002 as shown in the following example.

export AGENT_HTTP_ENABLED=Y
export AGENT_HTTP_PORT=8022

The Netty server handler responds to GET requests on the /metrics endpoint. In the examples, the https://localhost:8022/metric URL emits a response with Prometheus metrics in the standard text format, which is similar to the format that is used by MetricsServlet on the application server.

Prometheus statistics collection for containers

The Prometheus statistics for containers is enabled by setting the following customer overrides properties and environment variables.
  • Customer overrides:
    yfs.prometheus.enabled: true
    yfs.prometheus.consolidate.count.enabled: true
  • Environment variables:
    AGENT_HTTP_ENABLED: Y
    AGENT_HTTP_PORT: 8022

Endpoint formats for servers

Application servers
Endpoints for application servers use the following format.
/<context root>/servlets/prometheus
Examples
'/smcfs/servlets/prometheus'
'/wsc/servlets/prometheus'
'/isf/servlets/prometheus'
'/isccs/servlets/prometheus'
'/icc/servlets/prometheus'
Agent or integration servers
Endpoints for agent or integration servers use the following format. The port 8022 can be configured with AGENT_HTTP_PORT.
/oms-agent/prometheus