What are you trying to achieve?
we count the amount of servers and monitor the amount still in place. Datapoint each month.
stat panel works perfect, shows history also. However - when there was no server found, no data is added to DB with timestamp, postgres query doesnt return data for this.
Example: we had two servers 3 months ago and zero servers since last month, the stat panel does not show current value of 0. I’ve tried messing with postgresql coalesce, but that didnt work for me
- How are you trying to achieve it?
count(hostip) as “Servers”
WHERE operatingsystem = “Windows”
group by reportdate
order by reportdate
any ideas? I am sure I’m njot the only one with this issue, but I cant find how others resolved it. I looked at overrides, changing sql query, but the main issue seems to be that grafana cant show whats not there. i was hoping I could just select ‘current’ in stat panel instead of ‘last’ and grafana populating it with 0 or N/A if nothing there
Thank you so much!