Nomad Autoscaler HTTP API
The Nomad Autoscaler exposes a small, simple API to be used for health checking the agent and obtaining metric data.
Agent Runtime Profiles
This endpoint can be used to retrieve runtime profile information for the Nomad
Autoscaler. They are only available when enable_debug
is set to true
. Refer to Go's documentation for a list of
available profiles.
Method | Path | Produces |
---|---|---|
GET | /debug/pprof | text/html |
GET | /debug/pprof/cmdline | text/plain |
GET | /debug/pprof/symbol | text/plain |
GET | /debug/pprof/profile | application/octet-stream |
GET | /debug/pprof/trace | application/octet-stream |
GET | /debug/pprof/<pprof profile> | application/octet-stream |
Parameters
seconds
(int: 3)
- Specifies the amount of time to run a profile or trace request for.debug
(int: 0)
- Specifies if a given pprof profile should be returned as human readable plain text instead of the pprof binary format. Defaults to 0, setting to 1 enables human readable plain text.
Sample Request
Health API
This endpoint can be used to query the Nomad Autoscaler agent aliveness. If the agent is alive, the request will return a 200 OK, otherwise it will return a 503 ServiceUnavailable.
Method | Path | Produces |
---|---|---|
GET | /v1/health | application/json |
Sample Request
Metrics API
The /metrics
endpoint returns metrics for the current Nomad Autoscaler process.
Method | Path | Produces |
---|---|---|
GET | /v1/metrics | application/json |
Parameters
format
(string: "")
- Specifies the metrics format to be other than the JSON default. Currently, onlyprometheus
is supported as an alternative format. This is specified as a query string parameter.
Sample Request
Sample Response