Returns statistics about TSBD
GET {{baseUrl}}/status/tsdb
The following endpoint returns various cardinality statistics about the Prometheus TSDB
Response Data
headStats: This provides the following data about the head block of the TSDB:
numSeries: The number of series. chunkCount: The number of chunks. minTime: The current minimum timestamp in milliseconds. maxTime: The current maximum timestamp in milliseconds.
seriesCountByMetricName: This will provide a list of metrics names and their series count. labelValueCountByLabelName: This will provide a list of the label names and their value count. memoryInBytesByLabelName: This will provide a list of the label names and memory used in bytes. Memory usage is calculated by adding the length of all values for a given label name. seriesCountByLabelPair: This will provide a list of label value pairs and their series count.
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"status":"success","data":{"headStats":{"numSeries":508,"chunkCount":937,"minTime":1591516800000,"maxTime":1598896800143},"seriesCountByMetricName":[{"name":"net_conntrack_dialer_conn_failed_total","value":20},{"name":"prometheus_http_request_duration_seconds_bucket","value":20}],"labelValueCountByLabelName":[{"name":"__name__","value":211},{"name":"event","value":3}],"memoryInBytesByLabelName":[{"name":"__name__","value":8266},{"name":"instance","value":28}],"seriesCountByLabelValuePair":[{"name":"job=prometheus","value":425},{"name":"instance=localhost:9090","value":425}]}}