Tooltip for stat panel

I have a postgres table “infra_table” with columns id, display_name, cpu, ram, disk and status. I need to show a Grafana dashboard using stat panel, where panel will be green if status is “up”, and panel is red if status is “down”. The panel should show display_name as value on stat panel and cpu, ram and disk values as mouse over tool tip.

I have created the panel with below query:
SELECT
display_name,
CONCAT('CPU: ', cpu, ', RAM: ', ram, ', Disk: ', disk) AS details,
status
FROM infra_table

With this, I am able to see stat panel with display_name as main text. But mouse hover tooltip shows “display_name” instead of values of “details”.

Please let me know how to fix this.

what does this query result look like

SELECT
display_name,
CONCAT('CPU: ', cpu, ', RAM: ', ram, ', Disk: ', disk) AS details,
status
FROM infra_table

and what does your stat panel currently look like and how did you set it up?


At present, it shows machine name properly. But mouse over will just show name of field (display_name) instead of value of cpu/ram/disk.

Query output is below: