]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
network-usage-by-node: Fix mon_server queries
authorZack Cerza <zack@redhat.com>
Fri, 22 Jun 2018 18:55:21 +0000 (12:55 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 22 Jun 2018 18:55:21 +0000 (12:55 -0600)
The variable queries needed to drop 'mon.' from the mon names, and the
panel queries needed '[[mon_servers]]' to be wrapped in parentheses.

Signed-off-by: Zack Cerza <zack@redhat.com>
dashboards/mgr-prometheus/network-usage-by-node.json

index 2249cdf2a1d70f22e4cd4a943947b9d5b932c0f1..124f5b930ebda5a410834754e73dfe575f64c787 100644 (file)
@@ -90,7 +90,7 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "sum (irate(node_network_receive_bytes{instance=~\"[[mon_servers]].*\",device=~\"[[interfaces]].*\"}[30s])) + \nsum (irate(node_network_transmit_bytes{instance=~\"[[mon_servers]].*\",device=~\"[[interfaces]].*\"}[30s]))",
+          "expr": "sum (irate(node_network_receive_bytes{instance=~\"([[mon_servers]]).*\",device=~\"[[interfaces]].*\"}[30s])) + \nsum (irate(node_network_transmit_bytes{instance=~\"([[mon_servers]]).*\",device=~\"[[interfaces]].*\"}[30s]))",
           "format": "time_series",
           "intervalFactor": 2,
           "legendFormat": "MONs",
           "steppedLine": false,
           "targets": [
             {
-              "expr": "sum (irate(node_network_receive_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance) + \nsum (irate(node_network_transmit_bytes{instance=~\"[[mon_servers]].*\", device=~\"[[interfaces]].*\"}[30s])) by (instance)",
+              "expr": "sum (irate(node_network_receive_bytes{instance=~\"([[mon_servers]]).*\", device=~\"[[interfaces]].*\"}[30s])) by (instance) + \nsum (irate(node_network_transmit_bytes{instance=~\"([[mon_servers]]).*\", device=~\"[[interfaces]].*\"}[30s])) by (instance)",
               "format": "time_series",
               "intervalFactor": 1,
               "legendFormat": "{{instance}}",
         "options": [],
         "query": "label_values(ceph_mon_quorum_status, ceph_daemon)",
         "refresh": 1,
-        "regex": "",
+        "regex": "/mon.(.*)/",
         "sort": 1,
         "tagValuesQuery": "",
         "tags": [],