PROMETHEUS
The PROMETHEUS element specifies details for the collection of metrics
generated by GAS applications and services for integration with the Prometheus monitoring
platform.
Syntax
<PROMETHEUS Enabled={"TRUE"|"FALSE"}> </PROMETHEUS>
- Enabled attribute valid values must be uppercase:
"TRUE"or"FALSE"and enclosed in double quotes. This attribute determines whether Prometheus integration is active. It is set by default to"TRUE"by the resource$(res.prometheus.enabled)in the as.xcf file.
Child elements
The PROMETHEUS element must contain the following child elements in this order:
- One COLLECTOR element.
- Zero or more HISTOGRAM_BUCKETS elements.
- Zero or one ACCESS_CONTROL element.
Usage
You use this element to specify details for collecting and storing metrics for integration with the Prometheus monitoring platform. This element is configured in the GAS configuration file, where you will need to set the address of the Prometheus server using the appropriate resource, as shown in the example configuration.
Additionally, the histogram bucket ranges, which categorize response times or other metrics into specific intervals, are also set by a resource within the configuration file. You can modify these bucket ranges as needed to suit your monitoring requirements.
PROMETHEUS element is essential for setting up metrics
collection, with key details that you need to configure based on your specific
environment.<PROMETHEUS Enabled="$(res.prometheus.enabled)">
<COLLECTOR Address="$(res.prometheus.address)" Port="$(res.prometheus.port)" />
<HISTOGRAM_BUCKETS Name="fourjs_gas_request_duration_seconds">$(res.prometheus.rq_duration.buckets)</HISTOGRAM_BUCKETS>
<ACCESS_CONTROL>
<ALLOW_FROM>127.0.0.1</ALLOW_FROM>
<ALLOW_FROM>192.168.</ALLOW_FROM>
</ACCESS_CONTROL>
</PROMETHEUS>In this example, Prometheus configuration values (enabled, address, port, and histogram buckets)
are provided by resources in as.xcf; the metrics endpoint in this example is
accessible only from 127.0.0.1 and IPs that start with
192.168..
When using ACCESS_CONTROL with Prometheus, ensure you properly restrict access
to your metrics endpoint to prevent unauthorized access to sensitive monitoring data. For standalone
dispatcher, no access control is enforced.
For details on how access is controlled and how to configure it, go to ACCESS_CONTROL.
Parent elements
This element is a child of the INTERFACE_TO_CONNECTOR element.