root@ceaead3fadad:/# curl -s localhost:9090/api/v1/targets/metadata | jq
{
"status": "success",
"data": [
{
"target": {
"instance": "localhost:9090",
"job": "prometheus"
},
"metric": "go_memstats_mallocs_total",
"type": "counter",
...
"instance": "localhost:9090",
"job": "prometheus"
},
"metric": "prometheus_tsdb_checkpoint_creations_failed_total",
"type": "counter",
"help": "Total number of checkpoint creations that failed.",
"unit": ""
}
]
}
root@ceaead3fadad:/# curl -s localhost:9090/api/v1/targets/metadata?metric=go_goroutines | jq
{
"status": "success",
"data": [
{
"target": {
"instance": "localhost:9090",
"job": "prometheus"
},
"type": "gauge",
"help": "Number of goroutines that currently exist.",
"unit": ""
}
]
}
root@ceaead3fadad:/# curl -s localhost:9090/api/v1/targets/metadata | jq -r -c .data[].metric | sort
go_gc_duration_seconds
go_goroutines
go_info
go_memstats_alloc_bytes
go_memstats_alloc_bytes_total
go_memstats_buck_hash_sys_bytes
go_memstats_frees_total
...
prometheus_tsdb_wal_truncations_failed_total
prometheus_tsdb_wal_truncations_total
prometheus_tsdb_wal_writes_failed_total
prometheus_web_federation_errors_total
prometheus_web_federation_warnings_total
promhttp_metric_handler_requests_in_flight
promhttp_metric_handler_requests_total