Grafana Variables#
Suppose you have a query like this:
node_load1{kubernetes_node="node1"}
And you want to make a variable instead of hard-coding node1
into your query.
First, create a variable
Name: node
Type: Query
Query:
label_values(node_load1, kubernetes_node)
Second, use the variable in your query:
node_load1{kubernetes_node=~"$node"}
Bemerkung
Be sure to use the =~
operator to make use of the „All option“!
Display Structured Logs in JSON Format From Loki as a Grafana Table
Clear Pycharm Remote Sources