Grafana dashboard: Service Graph


{
  "__inputs": [
    {
      "name": "DS_LOCALPROMETHEUS",
      "label": "LocalPrometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.7.3"
    },
    {
      "type": "panel",
      "id": "novatec-service-dependency-graph-panel",
      "name": "Service Dependency Graph",
      "version": "2.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:1388",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10139,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1588833980797,
  "links": [],
  "panels": [
    {
      "dataMapping": {
        "errorRateColumn": "error-rate",
        "errorRateOutgoingColumn": "error-rate-out",
        "extOrigin": "origin_external",
        "extTarget": "target_external",
        "requestRateColumn": "Value #A",
        "requestRateExternalColumn": "",
        "requestRateOutgoingColumn": "Value #B",
        "responseTimeColumn": "Value #C",
        "responseTimeExternalColumn": "",
        "responseTimeOutgoingColumn": "Value #D",
        "sourceComponentPrefix": "origin_",
        "targetComponentPrefix": "target_",
        "type": "protocol"
      },
      "datasource": "${DS_LOCALPROMETHEUS}",
      "gridPos": {
        "h": 19,
        "w": 23,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "links": [],
      "sdgSettings": {
        "externalIcons": [
          {
            "icon": "web",
            "type": "web"
          },
          {
            "icon": "message",
            "type": "jms"
          },
          {
            "icon": "database",
            "type": "jdbc"
          },
          {
            "icon": "http",
            "type": "http"
          }
        ],
        "filterEmptyConnections": true,
        "layout": "ltrTree",
        "maxVolume": "100000",
        "showConnectionStats": true,
        "sumTimings": true
      },
      "sdgStyle": {
        "dangerColor": "rgb(184, 36, 36)",
        "healthyColor": "rgb(87, 148, 242)"
      },
      "settings": {
        "animate": true,
        "dataMapping": {
          "errorRateColumn": "Value #E",
          "errorRateOutgoingColumn": "Value #F",
          "extOrigin": "origin_external",
          "extTarget": "target_external",
          "requestRateColumn": "Value #A",
          "requestRateOutgoingColumn": "Value #B",
          "responseTimeColumn": "Value #C",
          "responseTimeOutgoingColumn": "Value #D",
          "sourceComponentPrefix": "origin_",
          "targetComponentPrefix": "target_",
          "type": "protocol"
        },
        "drillDownLink": "",
        "externalIcons": [
          {
            "$$hashKey": "object:1411",
            "filename": "web",
            "name": "web"
          },
          {
            "$$hashKey": "object:1412",
            "filename": "message",
            "name": "jms"
          },
          {
            "$$hashKey": "object:1413",
            "filename": "database",
            "name": "jdbc"
          },
          {
            "$$hashKey": "object:1414",
            "filename": "http",
            "name": "http"
          }
        ],
        "filterEmptyConnections": true,
        "showConnectionStats": true,
        "showDebugInformation": false,
        "showDummyData": false,
        "style": {
          "dangerColor": "rgb(184, 36, 36)",
          "healthyColor": "rgb(87, 148, 242)"
        },
        "sumTimings": true
      },
      "targets": [
        {
          "expr": "sum(increase(service_in_count{service=~\"$service\"}[$__range]) or increase(service_in_count{origin_service=~\"$service\"}[$__range]) >= 0) by (service,origin_service,origin_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        },
        {
          "expr": "sum(increase(service_out_count{service=~\"$service\"}[$__range]) or increase(service_out_count{target_service=~\"$service\"}[$__range]) >= 0) by (service,target_service,target_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "B"
        },
        {
          "expr": "sum(increase(service_in_responsetime_sum{service=~\"$service\"}[$__range]) or increase(service_in_responsetime_sum{origin_service=~\"$service\"}[$__range]) >= 0) by (service,origin_service,origin_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "C"
        },
        {
          "expr": "sum(increase(service_out_responsetime_sum{service=~\"$service\"}[$__range]) or increase(service_out_responsetime_sum{target_service=~\"$service\"}[$__range]) >= 0) by (service,target_service,target_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "D"
        },
        {
          "expr": "sum(increase(service_in_count{service=~\"$service\",error=\"true\"}[$__range]) or increase(service_in_count{origin_service=~\"$service\",error=\"true\"}[$__range]) >= 0) by (service,origin_service,origin_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        },
        {
          "expr": "sum(increase(service_out_count{service=~\"$service\",error=\"true\"}[$__range]) or increase(service_out_count{target_service=~\"$service\",error=\"true\"}[$__range]) >= 0) by (service,target_service,target_external,protocol) > 0",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "F"
        }
      ],
      "title": "Service Graph",
      "type": "novatec-service-dependency-graph-panel"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "service",
          "value": "service"
        },
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "aggregationType",
        "options": [
          {
            "selected": true,
            "text": "service",
            "value": "service"
          }
        ],
        "query": "service",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_LOCALPROMETHEUS}",
        "definition": "label_values(service)",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Services",
        "multi": true,
        "name": "service",
        "options": [],
        "query": "label_values(service)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "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": "FlzDnieiz",
  "variables": {
    "list": []
  },
  "version": 1
}