Documentation

Prometheus metric parsing formats

Prometheus-formatted metrics are parsed and written to InfluxDB in one of two formats, depending on the scraping tool used:

Scraping tools and parsing format

Scraping toolInfluxDB Metric version
Telegraf Prometheus pluginDetermined by metric_version configuration option
Flux prometheus.scrape()2

Metric version 1

  • _time: timestamp
  • _measurement: Prometheus metric name (_bucket, _sum, and _count are trimmed from histogram and summary metric names)
  • _field: depends on the Prometheus metric type
    • Counter: counter
    • Gauge: gauge
    • Histogram: histogram bucket upper limits, count, sum
    • Summary: summary quantiles, count, sum
  • _value: Prometheus metric value
  • tags: A tag for each Prometheus label (except for histogram bucket upper limits (le) or summary quantiles (quantile)). The label name is the tag key and the label value is the tag value.

Example Prometheus query results

The following are example Prometheus metrics scraped from the InfluxDB OSS 2.x /metrics endpoint:

# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed. # TYPE go_memstats_alloc_bytes_total counter go_memstats_alloc_bytes_total 1.42276424e+09 # HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. # TYPE go_memstats_buck_hash_sys_bytes gauge go_memstats_buck_hash_sys_bytes 5.259247e+06 # HELP task_executor_run_latency_seconds Records the latency between the time the run was due to run and the time the task started execution, by task type # TYPE task_executor_run_latency_seconds histogram task_executor_run_latency_seconds_bucket{task_type="system",le="0.25"} 4413 task_executor_run_latency_seconds_bucket{task_type="system",le="0.5"} 11901 task_executor_run_latency_seconds_bucket{task_type="system",le="1"} 12565 task_executor_run_latency_seconds_bucket{task_type="system",le="2.5"} 12823 task_executor_run_latency_seconds_bucket{task_type="system",le="5"} 12844 task_executor_run_latency_seconds_bucket{task_type="system",le="10"} 12864 task_executor_run_latency_seconds_bucket{task_type="system",le="+Inf"} 74429 task_executor_run_latency_seconds_sum{task_type="system"} 4.256783538679698e+11 task_executor_run_latency_seconds_count{task_type="system"} 74429 # HELP task_executor_run_duration The duration in seconds between a run starting and finishing. # TYPE task_executor_run_duration summary task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.5"} 5.178160855 task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.9"} 5.178160855 task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.99"} 5.178160855 task_executor_run_duration_sum{taskID="00xx0Xx0xx00XX0x0",task_type="threshold"} 2121.9758301650004 task_executor_run_duration_count{taskID="00xx0Xx0xx00XX0x0",task_type="threshold"} 570

Resulting line protocol

go_memstats_alloc_bytes_total counter=1.42276424e+09 go_memstats_buck_hash_sys_bytes gauge=5.259247e+06 task_executor_run_latency_seconds,task_type=system 0.25=4413,0.5=11901,1=12565,2.5=12823,5=12844,10=12864,+Inf=74429,sum=4.256783538679698e+11,count=74429 task_executor_run_duration,taskID=00xx0Xx0xx00XX0x0,task_type=threshold 0.5=5.178160855,0.9=5.178160855,0.99=5.178160855,sum=2121.9758301650004,count=570

View version 1 tables when queried from InfluxDB

Metrics version 2

Example Prometheus query results

The following are example Prometheus metrics scraped from the InfluxDB OSS 2.x /metrics endpoint:

# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed. # TYPE go_memstats_alloc_bytes_total counter go_memstats_alloc_bytes_total 1.42276424e+09 # HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. # TYPE go_memstats_buck_hash_sys_bytes gauge go_memstats_buck_hash_sys_bytes 5.259247e+06 # HELP task_executor_run_latency_seconds Records the latency between the time the run was due to run and the time the task started execution, by task type # TYPE task_executor_run_latency_seconds histogram task_executor_run_latency_seconds_bucket{task_type="system",le="0.25"} 4413 task_executor_run_latency_seconds_bucket{task_type="system",le="0.5"} 11901 task_executor_run_latency_seconds_bucket{task_type="system",le="1"} 12565 task_executor_run_latency_seconds_bucket{task_type="system",le="2.5"} 12823 task_executor_run_latency_seconds_bucket{task_type="system",le="5"} 12844 task_executor_run_latency_seconds_bucket{task_type="system",le="10"} 12864 task_executor_run_latency_seconds_bucket{task_type="system",le="+Inf"} 74429 task_executor_run_latency_seconds_sum{task_type="system"} 4.256783538679698e+11 task_executor_run_latency_seconds_count{task_type="system"} 74429 # HELP task_executor_run_duration The duration in seconds between a run starting and finishing. # TYPE task_executor_run_duration summary task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.5"} 5.178160855 task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.9"} 5.178160855 task_executor_run_duration{taskID="00xx0Xx0xx00XX0x0",task_type="threshold",quantile="0.99"} 5.178160855 task_executor_run_duration_sum{taskID="00xx0Xx0xx00XX0x0",task_type="threshold"} 2121.9758301650004 task_executor_run_duration_count{taskID="00xx0Xx0xx00XX0x0",task_type="threshold"} 570

Resulting line protocol

prometheus,url=http://localhost:8086/metrics go_memstats_alloc_bytes_total=1.42276424e+09 prometheus,url=http://localhost:8086/metrics go_memstats_buck_hash_sys_bytes=5.259247e+06 prometheus,url=http://localhost:8086/metrics,task_type=system,le=0.25 task_executor_run_latency_seconds=4413 prometheus,url=http://localhost:8086/metrics,task_type=system,le=0.5 task_executor_run_latency_seconds=11901 prometheus,url=http://localhost:8086/metrics,task_type=system,le=1 task_executor_run_latency_seconds=12565 prometheus,url=http://localhost:8086/metrics,task_type=system,le=2.5 task_executor_run_latency_seconds=12823 prometheus,url=http://localhost:8086/metrics,task_type=system,le=5 task_executor_run_latency_seconds=12844 prometheus,url=http://localhost:8086/metrics,task_type=system,le=10 task_executor_run_latency_seconds=12864 prometheus,url=http://localhost:8086/metrics,task_type=system,le=+Inf task_executor_run_latency_seconds=74429 prometheus,url=http://localhost:8086/metrics,task_type=system task_executor_run_latency_seconds_sum=4.256783538679698e+11 prometheus,url=http://localhost:8086/metrics,task_type=system task_executor_run_latency_seconds_count=74429 prometheus,url=http://localhost:8086/metrics,taskID=00xx0Xx0xx00XX0x0,task_type=threshold quantile=0.5 task_executor_run_duration=5.178160855 prometheus,url=http://localhost:8086/metrics,taskID=00xx0Xx0xx00XX0x0,task_type=threshold quantile=0.9 task_executor_run_duration=5.178160855 prometheus,url=http://localhost:8086/metrics,taskID=00xx0Xx0xx00XX0x0,task_type=threshold quantile=0.99 task_executor_run_duration=5.178160855 prometheus,url=http://localhost:8086/metrics,taskID=00xx0Xx0xx00XX0x0,task_type=threshold task_executor_run_duration_sum=2121.9758301650004 prometheus,url=http://localhost:8086/metrics,taskID=00xx0Xx0xx00XX0x0,task_type=threshold task_executor_run_duration_count=570

View version 2 tables when queried from InfluxDB


Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.5

Key enhancements in InfluxDB 3.5 and the InfluxDB 3 Explorer 1.3.

See the Blog Post

InfluxDB 3.5 is now available for both Core and Enterprise, introducing custom plugin repository support, enhanced operational visibility with queryable CLI parameters and manual node management, stronger security controls, and general performance improvements.

InfluxDB 3 Explorer 1.3 brings powerful new capabilities including Dashboards (beta) for saving and organizing your favorite queries, and cache querying for instant access to Last Value and Distinct Value caches—making Explorer a more comprehensive workspace for time series monitoring and analysis.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On November 3, 2025, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2

InfluxDB Cloud powered by TSM