3e4a3ff8eb
* docs: restructure autoscaling plugins menu * docs: add autoscaling threshold strategy (#10535)
38 lines
748 B
Plaintext
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/
|