I’m using AWS hosted Grafana and querying an RDS Postgres database.
I’ve added the appropriate entries in the security groups to allow the hosted Grafana service to access the database, and confirmed success with the connectivity test in the data source.
I am getting somewhat regular 504 Gateway Timeouts, and upstream request timeouts from the query.
On the times it does work, it returns an incorrect result set. It is a pretty simple query, just returning a 0 or a 1 to indicate if a system has updated a log.
SELECT case when ((DATE_PART('day', now() - LastLog) * 24 +
DATE_PART('hour', now() - LastLog)) * 60 +
DATE_PART('minute', now() - LastLog)) > 15
then 0
else 1
end as Status
from SystemStatus
where System = 'Murray' ;
When I run this is Grafana and it returns a result, it just gives 1, but when I check on the DB directly it is retuning 0.
Anyone know how I can a) increase the query timeout interval for the data source in AWS hosted Grafana, and b) if Grafana caches results (and if so how I can stop it) or why it would be returning an incorrect result set?
Many thanks.