$ Variable to filter per client


We want to use the same Dashboard graphs for different clients (to choose either one or the other one - or all of them) to visualise the data.

When we created a sample of a Custom ELK variable with the values of our client “actor_name” s, and we added “$actor_name” in the graphs queries (test 1), we don’t get the same information that if actually fill our actor_names (test 1 check).

Is there anything we missed?

Thank you in advanced for your help.

I’m not sure I understand the question. Do you want to template queries based on the logged in user? In that case I think you’ll want the $__user.* variables: Global variables | Grafana Labs

In the queries that we use for our graphs, we normally filter per client. So if we want to visualise the number of webhooks logs per client we would write de query:
actor_name_XXX AND "webhooks.

In order to use the same dashboard for all of our clients, we want to create a variable for the client field.

I created a custom variable with as many values as clients we have (value 1: actor_client_XXXX, value 2: actor_client_YYYYY …), but we don’t know how we should write the query in the graph in order to display the information for all of the clients.

If we take the precedent example would it be $actor_name AND "webhooks ? because it does not work properly when we select the value of the client we want to visualise.

Thank you again.