Accessing Metrics
Overview
Working Group Two exposes metrics that can help operators getting some operational insight. This data is exposed using the OpenMetrics text format.
This text format is the same as exposed by Prometheus. In addition to being supported by Prometheus, many other systems has OpenMetrics integrations such as Datadog and New Relic.
The HTTP endpoint we provide will give you the current state of all of your metrics. We do not provide a query API.
Please reach out to clarify what metrics you would need access to.
In order to access this API, your credentials need to have the metrics.read
right.
Base path: https://api.wgtwo.com/metrics/v1
Snippet config
Get metrics, curl
curl -s -u ${CLIENT_ID}:${CLIENT_SECRET} https://api.wgtwo.com/metrics/v1
Get metrics, Prometheus
The below Prometheus config will scrape the metric endpoint from Working Group Two every 30 seconds, fetching all available time series. Note that the configuration will contain secrets.
See: prometheus.io › Configuration
Loading...
Example: Run with Docker
If you run the below commands, you should have Prometheus running successfully.
# Store sample configuration to prometheus.yml, including actual credentials
docker run -p 9090:9090 -v prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
Grafana
As our metric API does not expose a query API, it cannot be used by Grafana directly. However, Grafana has built-in support for Prometheus.