github.com/quite/nomad@v0.8.6/website/source/api/metrics.html.md (about) 1 --- 2 layout: api 3 page_title: Metrics - HTTP API 4 sidebar_current: api-metrics 5 description: |- 6 The /metrics endpoint is used to view metrics for Nomad 7 --- 8 9 # Metrics HTTP API 10 11 The `/metrics` endpoint returns metrics for the current Nomad process. 12 13 | Method | Path | Produces | 14 | ------- | --------------- | -------------------------- | 15 | `GET` | `/v1/metrics` | `application/json` | 16 17 The table below shows this endpoint's support for 18 [blocking queries](/api/index.html#blocking-queries) and 19 [required ACLs](/api/index.html#acls). 20 21 | Blocking Queries | ACL Required | 22 | ---------------- | ------------ | 23 | `NO` | `none` | 24 25 ### Parameters 26 27 - `format` `(string: "")` - Specifies the metrics format to be other than the 28 JSON default. Currently, only `prometheus` is supported as an alternative 29 format. This is specified as a querystring parameter. 30 31 ### Sample Request 32 33 ```text 34 $ curl https://localhost:4646/v1/metrics 35 ``` 36 37 ```text 38 $ curl https://localhost:4646/v1/metrics?format=prometheus 39 ``` 40 41 ### Sample Response 42 43 ```json 44 { 45 "Counters":[ 46 { 47 "Count":11, 48 "Labels":{}, 49 "Max":1.0, 50 "Mean":1.0, 51 "Min":1.0, 52 "Name":"nomad.nomad.rpc.query", 53 "Stddev":0.0, 54 "Sum":11.0 55 } 56 ], 57 "Gauges":[ 58 { 59 "Labels":{ 60 "node_id":"cd7c3e0c-0174-29dd-17ba-ea4609e0fd1f", 61 "datacenter":"dc1" 62 }, 63 "Name":"nomad.client.allocations.blocked", 64 "Value":0.0 65 }, 66 { 67 "Labels":{ 68 "datacenter":"dc1", 69 "node_id":"cd7c3e0c-0174-29dd-17ba-ea4609e0fd1f" 70 }, 71 "Name":"nomad.client.allocations.migrating", 72 "Value":0.0 73 } 74 ], 75 "Samples":[ 76 { 77 "Count":20, 78 "Labels":{}, 79 "Max":0.03544100001454353, 80 "Mean":0.023678050097078084, 81 "Min":0.00956599973142147, 82 "Name":"nomad.memberlist.gossip", 83 "Stddev":0.005445327799243976, 84 "Sum":0.4735610019415617 85 }, 86 { 87 "Count":1, 88 "Labels":{}, 89 "Max":0.0964059978723526, 90 "Mean":0.0964059978723526, 91 "Min":0.0964059978723526, 92 "Name":"nomad.nomad.client.update_status", 93 "Stddev":0.0, 94 "Sum":0.0964059978723526 95 } 96 ] 97 } 98 99 ``` 100