I am creating a panel to show the instance's health status. In LOKI, If "ERROR" is present in the log then the instance status should be in Red else it should be in Green.
I'm using the following query,
{component="dz-snmp", cloud=~"${cloud}", environment=~"${environment}", location=~"${location}",service="dz"} |= "ERROR"
I tried to visualize it using Gauge. And I got the expected result when an instance is in unhealthy state, I set the threshold value as 1 so if the log has the "ERROR" keyword then the visualization will be turnout to RED. But the problem is When there's no error(healthy state) it shows as No data.
When the instance log has no Error, it should be Green and when has an ERROR it needs to turn Red. How could I achieve it?
Any help at all would be a great help!