Grafana dashboard: Service Graph


{
  "__inputs": [
    {
      "name": "DS_LOCALINFLUX",
      "label": "LocalInflux",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.7.3"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "novatec-service-dependency-graph-panel",
      "name": "Service Dependency Graph",
      "version": "2.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:728",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10142,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1588835372501,
  "links": [],
  "panels": [
    {
      "dataMapping": {
        "errorRateColumn": "error-rate",
        "errorRateOutgoingColumn": "error-rate-out",
        "extOrigin": "origin_external",
        "extTarget": "target_external",
        "requestRateColumn": "in_count",
        "requestRateExternalColumn": "request-rate-external",
        "requestRateOutgoingColumn": "out_count",
        "responseTimeColumn": "in_responsetime",
        "responseTimeExternalColumn": "response-time-external",
        "responseTimeOutgoingColumn": "out_responsetime",
        "sourceComponentPrefix": "origin_",
        "targetComponentPrefix": "target_",
        "type": "protocol"
      },
      "datasource": "${DS_LOCALINFLUX}",
      "gridPos": {
        "h": 20,
        "w": 22,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "links": [],
      "sdgSettings": {
        "externalIcons": [
          {
            "icon": "web",
            "type": "web"
          },
          {
            "icon": "message",
            "type": "jms"
          },
          {
            "icon": "database",
            "type": "jdbc"
          },
          {
            "icon": "http",
            "type": "http"
          }
        ],
        "filterEmptyConnections": true,
        "layout": "ltrTree",
        "maxVolume": 10000,
        "showConnectionStats": true,
        "sumTimings": false
      },
      "sdgStyle": {
        "dangerColor": "rgb(184, 36, 36)",
        "healthyColor": "rgb(87, 148, 242)"
      },
      "settings": {
        "animate": true,
        "dataMapping": {
          "errorRateColumn": "in_errors",
          "errorRateOutgoingColumn": "out_errors",
          "extOrigin": "origin_external",
          "extTarget": "target_external",
          "requestRateColumn": "in_count",
          "requestRateOutgoingColumn": "out_count",
          "responseTimeColumn": "in_responsetime",
          "responseTimeOutgoingColumn": "out_responsetime",
          "sourceComponentPrefix": "origin_",
          "targetComponentPrefix": "target_",
          "type": "protocol"
        },
        "drillDownLink": "",
        "externalIcons": [
          {
            "$$hashKey": "object:822",
            "filename": "web",
            "name": "web"
          },
          {
            "$$hashKey": "object:823",
            "filename": "message",
            "name": "jms"
          },
          {
            "$$hashKey": "object:824",
            "filename": "database",
            "name": "jdbc"
          },
          {
            "$$hashKey": "object:825",
            "filename": "http",
            "name": "http"
          }
        ],
        "filterEmptyConnections": true,
        "showConnectionStats": true,
        "showDebugInformation": false,
        "showDummyData": false,
        "style": {
          "dangerColor": "rgb(184, 36, 36)",
          "healthyColor": "rgb(87, 148, 242)"
        },
        "sumTimings": false
      },
      "targets": [
        {
          "alias": "in_count",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "service_in_count",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"count\") AS \"in_count\" FROM \"autogen\".\"service_in_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"origin_service\" =~ /^$service$/) AND $timeFilter\nGROUP BY \"service\", \"origin_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "spread"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"count\") AS \"out_count\" FROM \"autogen\".\"service_out_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"target_service\" =~ /^$service$/) AND $timeFilter\nGROUP BY \"service\", \"target_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "B",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"sum\")/SUM(\"count\") AS \"in_responsetime\" FROM \"autogen\".\"service_in_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"origin_service\" =~ /^$service$/) AND $timeFilter\nGROUP BY \"service\", \"origin_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "C",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"sum\")/SUM(\"count\") AS \"out_responsetime\" FROM \"autogen\".\"service_out_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"target_service\" =~ /^$service$/) AND $timeFilter\nGROUP BY \"service\", \"target_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "D",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        },
        {
          "alias": "in_count",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "service_in_count",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"count\") AS \"in_errors\" FROM \"autogen\".\"service_in_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"origin_service\" =~ /^$service$/) AND \"error\"='true' AND $timeFilter\nGROUP BY \"service\", \"origin_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "E",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "spread"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT SUM(\"count\") AS \"out_errors\" FROM \"autogen\".\"service_out_responsetime\" \nWHERE (\"service\" =~ /^$service$/ OR \"target_service\" =~ /^$service$/) AND \"error\"='true' AND $timeFilter\nGROUP BY \"service\", \"target_service\", \"target_external\", \"protocol\"",
          "rawQuery": true,
          "refId": "F",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "title": "Service Graph",
      "type": "novatec-service-dependency-graph-panel"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "selected": true,
          "text": "service",
          "value": "service"
        },
        "hide": 2,
        "includeAll": false,
        "label": "",
        "multi": false,
        "name": "aggregationType",
        "options": [
          {
            "selected": true,
            "text": "service",
            "value": "service"
          }
        ],
        "query": "service",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_LOCALINFLUX}",
        "definition": "SHOW TAG VALUES WITH KEY=\"service\"",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Service",
        "multi": true,
        "name": "service",
        "options": [],
        "query": "SHOW TAG VALUES WITH KEY=\"service\"",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Service Graph",
  "uid": "Kx4wbZRZk",
  "variables": {
    "list": []
  },
  "version": 1
}