Using Grafana, I am trying to figure out how to use a single variable in a SQL statement using a table that will be populated with different values. For example, I have two "Stat" visualizations configured to provide a single value count; Hidden and Downloaded
If I click on Hidden, I want the table to show processes that have a hidden attribute set. If I click on Downloaded, I want the table to show running processes that were downloaded.
My SQL statement is:
select process, path, md5
from proctable
$procTest
group by 1,2,3;
I want the variable $procTest to be replaced with "hidden is true" or "downloaded is true" depending on which single value is clicked.
I spent a great deal of time trying to figure out how to do this. I am currently using a data link to accomplish this, but I am using a variable for each. This will become difficult to manage once I start adding more single values.
Is this something that can be done using Grafana?