-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prometheus metrics #3171
Prometheus metrics #3171
Conversation
6f0c28e
to
73b05df
Compare
command/agent/command.go
Outdated
@@ -661,6 +662,12 @@ func (c *Command) setupTelemetry(config *Config) (*metrics.InmemSink, error) { | |||
fanout = append(fanout, sink) | |||
} | |||
|
|||
// Configure the prometheus sink | |||
promSink, err := prometheus.NewPrometheusSink() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be behind a config option: https://www.nomadproject.io/docs/agent/configuration/telemetry.html
2f58a11
to
ce97e92
Compare
6f5ab56
to
4f0aa33
Compare
@@ -92,6 +92,7 @@ acl { | |||
telemetry { | |||
statsite_address = "127.0.0.1:1234" | |||
statsd_address = "127.0.0.1:2345" | |||
prometheus_metrics = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting
@@ -114,6 +114,15 @@ telemetry { | |||
} | |||
``` | |||
|
|||
### `prometheus` | |||
|
|||
These `telemetry` parameters apply to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collapse onto 1 line?
|
||
- `prometheus_metrics` `(bool: false)` - Specifies whether the agent should | ||
initialize a PrometheusSink, where metrics will be reachable via the metrics | ||
path `/v1/netrics?format=prometheus`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
netrics -> metrics
[Prometheus](https://prometheus.io). | ||
|
||
- `prometheus_metrics` `(bool: false)` - Specifies whether the agent should | ||
initialize a PrometheusSink, where metrics will be reachable via the metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifies whether the agent should make Prometheus formatted metrics available at /v1/metrics...
Changelog too |
57752f9
to
07fb30e
Compare
07fb30e
to
34ff818
Compare
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This adds a Prometheus metrics sink and HTTP endpoint. The endpoint exposes metrics for Prometheus specifically as Prometheus only ingests data via protobuf or text format. See https://prometheus.io/docs/instrumenting/exposition_formats