Help in Creating a Grafana Panel in Dashboards

  • What Grafana version and what operating system are you using?
    Hi , I am working on Grafana which is Connected to prometheus both of them running in an EKS cluster.

  • What are you trying to achieve?

I have an metric “UP” which is queried something like this :
up{app_kubernetes_io_instance=“$job”, pod=~“$node”}
This returns 1 or 0 based on if the cluster(application) is Up or Down respectively

I am trying to create a dashboard for my application and the up time is a major component of that, for which I am trying to create a “Status History” panel (suggest me if there is a better option) which would be in color green if the response of query is 1 which means cluster is up and cluster is down if the color is red.

  • How are you trying to achieve it?
  1. I am creating a panel
  2. Choosing status history
  3. Query is up{app_kubernetes_io_instance=“$job”, pod=~“$node”}
  • What happened?

The panel works fine and shows the information as I intend it to

But when I try to increase the time range for example 4 hours, 5 hours 1 day

It gives me an error like this

  • What did you expect to happen?

I want to have a fixed number of bars in the panel and the range change for each bar when the time range is increased

Can someone please help me achieve this?