Analyzing and Visualizing Application Metrics Using Prometheus and Grafana
ActiveMatrix Service Grid - Container Edition supports integration with Prometheus to export data from it. Prometheus is a monitoring tool which helps in analyzing the app metrics. Prometheus integrates with Grafana which provides better visual analytics. Data similar to SPM Server and Dashboard can now be exported by using Prometheus exporter.
Prometheus Exporter
ActiveMatrix Service Grid - Container Edition node provides the exporter which shows component, binding, and JVM information. This information is accessible at: http://<localhost>:9998/metrics.
This URL provides the following types of metrics:
-
JVM related data which includes memory, thread, and so on. This is the default Prometheus JVM exporter.
-
ActiveMatrix Service Grid - Container Edition component and binding operation metrics.
Prometheus servers scrape data from the HTTP /metrics endpoint of the applications. For more information about how to configure Prometheus to analyze ActiveMatrix Service Grid - Container Edition application metrics, see Using Prometheus to Analyze TIBCO ActiveMatrix Application Metrics. The Prometheus dashboard is available at https://<host>:<nodePort>. The default URL is http://localhost:9090/
It shows the following parameters for a component or binding. Here, the Prometheus metric type is gauge.
| Label | Description |
|---|---|
|
hits |
Number of hits during the collection period. |
| minResponseTime | Minimum response time for a request during collection period. |
| maxResponseTime | Maximum response time for a request during collection period. |
| avgResponseTime | Average response time for a request during collection period. |
| totalResponseTime | Total response time for a request during collection period. |
| pendingResponse | Number of pending responses on the component. |
| faults | Number of faults on the component. |
| collectionPeriod | Collection period is the difference between the start time and end time. |
The default status gathering configuration is as follows:
- Status Gathering Interval - 30 seconds.
- Notification Interval - 60 seconds.
Therefore, set the Prometheus exporter polling interval to 30 seconds.
Controlling the Status Gathering Interval
You can control the status gathering interval by using the changeMonitoringConfig Hawk microagent method. To get the current configuration, invoke the getconfig method of an AMXCE node microagent.
To change this configuration, invoke the changeMonitoringConfig method. AMXCE component or binding related data will be shown if there is any hit on that entity.
To disable the default JVM exporter, set the application level property, initializeDefaultExports, to false. The default value is true.