简体   繁体   English

Grafana 中 prometheus-postgres-exporter 和 PostgreSQL 数据源原生插件有什么区别?

[英]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?你能解释一下 Grafana 中 prometheus-postgres-exporter 和 PostgreSQL 数据源原生插件之间的区别吗? And why do I need to use one over another.为什么我需要使用一个而不是另一个。 Unfortunately, couldn't find a proper explanation in the docs.不幸的是,在文档中找不到正确的解释。

Thank you.谢谢你。

prometheus-postgres-exporter provides an endpoint for Prometheus to gather time series data about your database. prometheus-postgres-exporter为 Prometheus 提供了一个端点来收集有关您的数据库的时间序列数据。 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.这可能包括诸如表数量、数据库使用的磁盘空间等统计信息。然后您可以在 Grafana 中查询和绘制这些数据点随时间变化的图表。

A PostgreSQL datasource in Grafana gives access to the database, but you can only run queries against the database. Grafana 中的PostgreSQL数据源可以访问数据库,但您只能对数据库运行查询。 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.如果您想知道 2 周前的数据库有多大,那么今天通过查询数据库将无法获得。 It only knows how big it is right now , not how big it was at another point in time.它只知道它现在有多大,而不知道它在另一个时间点有多大。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM