open-nomad/website/content/docs/autoscaling/plugins/apm/prometheus.mdx
Luiz Aoqui 3e4a3ff8eb
docs: restructure autoscaling plugins menu (#10534)
* docs: restructure autoscaling plugins menu

* docs: add autoscaling threshold strategy (#10535)
2021-05-07 14:21:50 -04:00

38 lines
748 B
Plaintext

---
layout: docs
page_title: 'Autoscaling Plugins: Prometheus'
description: The "prometheus" APM plugin queries a Prometheus server.
---
# Prometheus APM Plugin
The `prometheus` APM plugin allows querying for metrics stored in a
[Prometheus][prometheus_io] server.
## Agent Configuration Options
```hcl
apm "prometheus" {
driver = "prometheus"
config = {
address = "http://prometheus.my.endpoint.io:9090"
}
}
```
- `address` `(string: "http://127.0.0.1:9090")` - The address of the Prometheus
endpoint used to perform queries.
## Policy Configuration Options
```hcl
check {
source = "prometheus"
query = "avg((haproxy_server_current_sessions{backend=\"http_back\"}))"
# ...
}
```
[prometheus_io]: https://prometheus.io/