diff --git a/README.rst b/README.rst index 43f4fc7..75c5d7c 100644 --- a/README.rst +++ b/README.rst @@ -208,7 +208,7 @@ How to find dashboards using specific data sources? :: # Display all dashboards which use a specific data source, filtered by data source name. - grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].type=="")' + grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].name=="")' # Display all dashboards using data sources with a specific type. Here: InfluxDB. grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].type=="influxdb")' diff --git a/grafana_wtf/commands.py b/grafana_wtf/commands.py index 8a36070..3f49777 100644 --- a/grafana_wtf/commands.py +++ b/grafana_wtf/commands.py @@ -95,7 +95,7 @@ def run(): grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources_missing) | .dashboard + {ds_missing: .datasources_missing[] | [.name]}' # Display all dashboards which use a specific data source, filtered by data source name. - grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].type=="")' + grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].name=="")' # Display all dashboards using data sources with a specific type. Here: InfluxDB. grafana-wtf explore dashboards --format=json | jq '.[] | select(.datasources | .[].type=="influxdb")'