Hi Team,
is it possible to hide the panel / don’t shown it when there is no data ?
I have a dashboard where the panels are repeated for the list of servers in the variable filter on the dashboard.
There are general metrics like CPU and RAM which exists for each server, so they are getting repeated for each server which is normal.
some servers are DB servers where there are SQL metrics. what’s happening is as the panels gets repeated, non DB servers the panels are blank.
What I wanted is to hide them if there is no data or the metric is not relevant to that server.
Any help would be highly appreciated.
Thank you.
Regards,
Pradeep
don’t load those servers that have no metrics in the first place. then they wont be added in the repeat. meaning imagine this sample data
--server_metrics
server_1 2024-07-07 16:32:09.563 1trop
server_1 2024-07-07 17:32:09.563 1porpynit
server_2 2024-07-07 16:32:09.563 2trop
server_2 2024-07-07 17:32:09.563 2porpynit
server_2 2024-07-08 14:32:09.563 2sutats
server_2 2024-07-08 20:32:09.563 2sutats
server_3 2024-07-07 17:32:09.563 3porpynit
server_4 2024-07-07 17:32:09.563 4porpynit
server_a 2024-07-05 22:32:09.563 amehcspedni
server_a 2024-07-07 10:32:09.563 atad_peed_nim
servers
server_1
server_2
server_3
server_4
server_a
server_zoro
notice server_zoro
has no metrics. when creating your variable you will loop on, exclude server_zoro
. Apply the same logic to your datasource
1 Like
Thanks @yosiasz for your response.
The challenge is my input filter variables are static JSON data as below.
{
“applications”: [
{
“name”: “APP-1”,
“servers”: [“appserver1”, “dbserver1”,“webserver1”]
},
{
“name”: “APP-2”,
“servers”: [“appserver2”, “dbserver2”,“webserveer2”]
}
]
}
I used Infinity plugin with JSON and JQL to populate APP and Servers. The user will choose APP from the APP_NAME on dashboard UI to see the metrics for all the servers. The panels that are being built for RAM , CPU which is common for APP,DB,WEB servers … but DB server have only SQL metrics.
As I set the panel to repeat for the servers, the dashboard is trying to pull all the metrics for APP,WEB servers. As there will be NO DB metrics for the servers, they end-up as blank panels.
Please see the below screen print on how CPU, RAM are displayed APP, DB, WEB servers. But the DB metrics are blank for APP , WEB servers
so the short answer is you cannot hide panel if there is no data unless maybe you use business chart plugin.