free / sql_exporter

Database agnostic SQL exporter for Prometheus
MIT License
538 stars 172 forks source link

can sql exporter support timestamps #35

Open romange opened 5 years ago

romange commented 5 years ago

Hi,

I would like to export values with their assigned timestamps. can I do it with sql exporter?

free commented 5 years ago

SQL Exporter does not support exporting values with timestamps, as described in the Prometheus exposition format documentation, e.g.

http_requests_total{method="post",code="200"} 1027 1395066363000

where 1027 is the sample value and 1395066363000 is the sample timestamp.

I guess the functionality could be added (contributions are welcome) but this is not commonly used functionality and Prometheus documentation advises against using it.