Task Dashboard
Dashboard for tasks
{
  "__inputs": [
    {
      "name": "DS_TASKDB",
      "label": "TaskDb",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.1"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10407,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1560954452048,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "datasource": "${DS_TASKDB}",
      "description": "This panel displays the current tasks which were completed successfully and the total number of tasks.",
      "gridPos": {
        "h": 7,
        "w": 22,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "interval": "",
      "links": [],
      "options": {
        "displayMode": "lcd",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 10000,
            "min": 0,
            "title": "Total Tasks : $totalTasks"
          },
          "mappings": [
            {
              "from": "",
              "id": 1,
              "operator": "",
              "text": "",
              "to": "",
              "type": 1,
              "value": ""
            }
          ],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "green",
              "index": 1,
              "value": 10000
            }
          ],
          "values": false
        },
        "orientation": "auto"
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "alias": "Successfully executed tasks",
          "groupBy": [],
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"totaltasks\" count(totaltasks)/totaltasks FROM \"tasksperformed\" WHERE (\"status\" = 'Succeeded') AND $timeFilter",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "totaltasks"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "status",
              "operator": "=",
              "value": "Succeeded"
            }
          ]
        },
        {
          "alias": "Total tasks",
          "groupBy": [],
          "hide": true,
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "totaltasks"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [],
          "hide": true,
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT  \"Currenttasks/Totaltasks\" FROM \"tasksperformed\" WHERE $timeFilter",
          "rawQuery": false,
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "taskduration"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Currenttasks/Totaltasks"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tasks",
      "type": "bargauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_TASKDB}",
      "description": "This panel displays the number of workers per hosts for all the various hosts.",
      "gridPos": {
        "h": 6,
        "w": 22,
        "x": 0,
        "y": 7
      },
      "id": 4,
      "interval": "",
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "sum"
          ],
          "defaults": {
            "max": 400,
            "min": 0,
            "title": ""
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "green",
              "index": 1,
              "value": 50
            }
          ],
          "values": true
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": false
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "alias": "$tag_host",
          "groupBy": [
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "taskduration"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Workers per Host",
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "description": "Time taken by each host for successful completion of Tasks",
      "gridPos": {
        "h": 7,
        "w": 22,
        "x": 0,
        "y": 13
      },
      "id": 8,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "sum"
          ],
          "defaults": {
            "decimals": 3,
            "max": 100,
            "min": 0,
            "title": "",
            "unit": "ms"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "red",
              "index": 1,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.2.1",
      "repeat": null,
      "repeatDirection": null,
      "targets": [
        {
          "alias": "$tag_host",
          "groupBy": [
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "taskduration"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "status",
              "operator": "=",
              "value": "Succeeded"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Time for successful completion of Tasks Per Host",
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_TASKDB}",
      "description": "This panel displays the number of tasks per workers for all the hosts.",
      "gridPos": {
        "h": 51,
        "w": 24,
        "x": 0,
        "y": 20
      },
      "id": 6,
      "interval": "",
      "links": [],
      "options": {
        "displayMode": "basic",
        "fieldOptions": {
          "calcs": [
            "sum"
          ],
          "defaults": {
            "max": 100,
            "min": 0
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "red",
              "index": 1,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "horizontal"
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "alias": "$tag_workerid",
          "groupBy": [
            {
              "params": [
                "workerid"
              ],
              "type": "tag"
            }
          ],
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "starttime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "status",
              "operator": "=",
              "value": "Succeeded"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            }
          ]
        },
        {
          "alias": "$tag_workerid",
          "groupBy": [
            {
              "params": [
                "workerid"
              ],
              "type": "tag"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "hide": true,
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "starttime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "status",
              "operator": "=",
              "value": "Succeeded"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=",
              "value": "node019.beehive.itwm.fhg.de"
            }
          ]
        },
        {
          "alias": "$tag_workerid",
          "groupBy": [
            {
              "params": [
                "workerid"
              ],
              "type": "tag"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "hide": true,
          "measurement": "tasksperformed",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "starttime"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "status",
              "operator": "=",
              "value": "Succeeded"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=",
              "value": "node020.beehive.itwm.fhg.de"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tasks per Workers",
      "type": "bargauge"
    }
  ],
  "refresh": "1s",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TASKDB}",
        "definition": "SHOW TAG VALUES WITH KEY = \"host\"",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "host",
        "options": [],
        "query": "SHOW TAG VALUES WITH KEY = \"host\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TASKDB}",
        "definition": "SHOW TAG VALUES WITH KEY = \"workerid\"",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "workers",
        "options": [],
        "query": "SHOW TAG VALUES WITH KEY = \"workerid\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": true
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TASKDB}",
        "definition": "select \"totaltasks\" from \"tasksperformed\"",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "totalTasks",
        "options": [],
        "query": "select \"totaltasks\" from \"tasksperformed\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "2019-06-01T04:49:19.797Z",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "1s",
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Task Dashboard",
  "uid": "DJCa-NnWk",
  "version": 33,
  "description": "Dashboard for tasks"
}