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