Coloring the state of a switch port with singlestat pannel & observium

Hi everyone,

I’m writing to you because I can’t find a solution to my problem.

Indeed, I’m using the SQL data source to query my Observium database, and I found the way to view if a switch port is up or down.
I’m using this sql query to view this state :
select ifOperStatus from ports where ifAlias=‘port_description’;

This query give us the value of the port : up or down

I need to color the background of the pannel for each state : green for up and red for down.

I can’t find the way to do this and I think I need some help !

Thanks a lot for your help, have a nice day :slight_smile:

Grafana v6.2.5