Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a difference between prometheus-postgres-exporter and PostgreSQL Data Source native plugin in Grafana?

could you please explain the difference between prometheus-postgres-exporter and PostgreSQL Data Source native plugin in Grafana? And why do I need to use one over another. Unfortunately, couldn't find a proper explanation in the docs.

Thank you.

like image 471
Stanislav Hordiyenko Avatar asked Feb 14 '26 05:02

Stanislav Hordiyenko


1 Answers

prometheus-postgres-exporter provides an endpoint for Prometheus to gather time series data about your database. This will probably include statistics like the number of tables, disk space used by the database, etc. You can then query and chart these datapoints over time in Grafana.

A PostgreSQL datasource in Grafana gives access to the database, but you can only run queries against the database. If you want to know how big the database was 2 weeks ago, you will not be able to get that by querying the database today. It only knows how big it is right now, not how big it was at another point in time.

like image 186
alexbclay Avatar answered Feb 16 '26 18:02

alexbclay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!