mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 18:52:52 +01:00
fix query and allow for setting text and value of servername template var
This commit is contained in:
@@ -29,7 +29,9 @@ grafana:
|
|||||||
title: 'Security Onion Grid Overview'
|
title: 'Security Onion Grid Overview'
|
||||||
templating:
|
templating:
|
||||||
list:
|
list:
|
||||||
servername: {}
|
servername:
|
||||||
|
text: All
|
||||||
|
value: "$__all"
|
||||||
role:
|
role:
|
||||||
allValue: true
|
allValue: true
|
||||||
multi: true
|
multi: true
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{% if DASHBOARD == 'overview' %}
|
{% if DASHBOARD == 'overview' %}
|
||||||
{% set query = "show tag values with key=\\\"host\\\" WHERE (\\\"role\\\" =~ /^$role$/)" %}
|
{% set query = "show tag values with key=\\\"host\\\" WHERE (\\\"role\\\" =~ /^$role$/)" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set query = "show tag values with key=\\\"host\\\" WHERE (\\\"role\\\" = DASHBOARD ')" %}
|
{% set query = "show tag values with key=\\\"host\\\" WHERE (\\\"role\\\" = '" ~ DASHBOARD ~ "' )" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{
|
{
|
||||||
"allValue": null,
|
"allValue": null,
|
||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"text": [],
|
"text": [{{ TEMPLATES.servername.get('text', '')| json }}],
|
||||||
"value": []
|
"value": [{{ TEMPLATES.servername.get('value', '')| json }}]
|
||||||
},
|
},
|
||||||
"datasource": "InfluxDB",
|
"datasource": "InfluxDB",
|
||||||
"definition": "{{ query }}",
|
"definition": "{{ query }}",
|
||||||
|
|||||||
Reference in New Issue
Block a user