SELECT NOW () as time,
round( (blks_hit :: NUMERIC / (blks_hit + blks_read) :: NUMERIC) * 100,2) AS read_hit_percentage
FROM
pg_stat_database
WHERE
blks_hit + blks_read > 0 AND datname=‘mydatabase’
it does not give me any error, but still does not produce the graphic. What Am Im missing here?
Grafana does not collect metrics or remember metrics. Grafana only does visualization you need some other software (for example collectd or telegraf) to do the collecting.
I already use zabbix integrated with grafana, but when I saw this postgresql datasource directly integrated with grafana, making it possible to do whatever query I wanted, it’s a all new level, in terms of flexibility.
So this makes me wonder what’s the point of having this datasource if we still need an intermediate to do metrics?
With zabbix, using “userParameters” in the agent side I can perform any kind of Query.
I thought by using directly the postgresql datasource in grafana iI could directly access the same data (wich I can) but it is only usefull to “print” current values. To build a simple graph over time ( for example like an hour) it can’t because it does not store the past values.
I think this datasource as the potential to be great by allowing the flexibility to query any postgres DB we want for monitoring… But it could collect values, this could be store e grafana DB no?