Grafana dashboard: Ansible Metrics Tower
Description: This Dashboard is created to publish the ansible tower Metrics. The Credit goes to @leoaaraujo. 


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.6.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 13100,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "panels": [],
      "title": "License & Instances",
      "type": "row"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#3274D9",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "format": "short",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 0,
        "y": 1
      },
      "id": 25,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.6.2",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false,
        "ymax": null,
        "ymin": null
      },
      "tableColumn": "tower_version",
      "targets": [
        {
          "expr": "awx_system_info",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Tower Version",
      "type": "singlestat",
      "valueFontSize": "120%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 2,
        "y": 1
      },
      "id": 13,
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "light-blue",
                  "value": null
                }
              ]
            },
            "title": "Instances"
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "count(awx_instance_info)",
          "legendFormat": "Total",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 6,
        "y": 1
      },
      "id": 6,
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "light-blue",
                  "value": null
                }
              ]
            },
            "title": "Hosts Available"
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "awx_license_instance_total",
          "legendFormat": "Total de Licenças",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 10,
        "y": 1
      },
      "id": 9,
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 30
                },
                {
                  "color": "semi-dark-red",
                  "value": 40
                }
              ]
            },
            "title": "Hosts Used",
            "unit": "short"
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "(awx_license_instance_total - awx_license_instance_free)",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 14,
        "y": 1
      },
      "hideTimeOverride": true,
      "id": 11,
      "links": [],
      "options": {
        "displayMode": "basic",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [],
          "values": false
        },
        "orientation": "horizontal",
        "showUnfilled": true
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "awx_users_total",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Total",
          "refId": "A"
        },
        {
          "expr": "count(awx_sessions_total{type=\"user\"})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Users",
          "refId": "B"
        },
        {
          "expr": "count(awx_sessions_total{type=\"anonymous\"})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Anonymous",
          "refId": "C"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Total Users",
      "type": "bargauge"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorPostfix": true,
      "colorPrefix": true,
      "colorValue": true,
      "colors": [
        "#3274D9",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "format": "short",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 0,
        "y": 4
      },
      "id": 29,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.6.2",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false,
        "ymax": null,
        "ymin": null
      },
      "tableColumn": "ansible_version",
      "targets": [
        {
          "expr": "awx_system_info",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Ansible Version",
      "type": "singlestat",
      "valueFontSize": "120%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 4,
      "panels": [],
      "title": "Jobs",
      "type": "row"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 8
      },
      "id": 21,
      "links": [],
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "mappings": [
              {
                "id": 0,
                "op": "=",
                "text": "N/A",
                "type": 1,
                "value": "null"
              }
            ],
            "nullValueMode": "connected",
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "title": "Jobs successful",
            "unit": "none"
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "awx_status_total{status=\"successful\"}",
          "format": "time_series",
          "instant": false,
          "intervalFactor": 1,
          "legendFormat": "Successful",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 6,
        "y": 8
      },
      "id": 22,
      "links": [],
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "mappings": [
              {
                "id": 0,
                "op": "=",
                "text": "N/A",
                "type": 1,
                "value": "null"
              }
            ],
            "nullValueMode": "connected",
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                }
              ]
            },
            "title": "Jobs failed",
            "unit": "none"
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "awx_status_total{status=\"failed\"}",
          "legendFormat": "Failed",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 19,
      "links": [],
      "options": {
        "colorMode": "background",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto"
      },
      "pluginVersion": "6.6.2",
      "targets": [
        {
          "expr": "sum(awx_instance_launch_type_total{launch_type=\"dependency\"})",
          "hide": false,
          "instant": true,
          "legendFormat": "Dependency",
          "refId": "A"
        },
        {
          "expr": "sum(awx_instance_launch_type_total{launch_type=\"manual\"})",
          "hide": false,
          "instant": true,
          "legendFormat": "Manual",
          "refId": "B"
        },
        {
          "expr": "sum(awx_instance_launch_type_total{launch_type=\"relaunch\"})",
          "instant": true,
          "legendFormat": "Relaunch",
          "refId": "C"
        },
        {
          "expr": "sum(awx_instance_launch_type_total{launch_type=\"scheduled\"})",
          "instant": true,
          "legendFormat": "Scheduled",
          "refId": "D"
        },
        {
          "expr": "sum(awx_instance_launch_type_total{launch_type=\"workflow\"})",
          "instant": true,
          "legendFormat": "Workflow",
          "refId": "E"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "decimals": 0,
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 13
      },
      "hiddenSeries": false,
      "id": 23,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "6.6.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "expr": "ceil(rate(awx_running_jobs_total[1m] offset 1d))",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "legendFormat": "Last day",
          "refId": "A"
        },
        {
          "expr": "awx_running_jobs_total[1d]",
          "hide": false,
          "instant": true,
          "legendFormat": "Actual",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Job Running",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "decimals": 0,
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 13
      },
      "hiddenSeries": false,
      "id": 28,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "6.6.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "expr": "ceil(rate(awx_pending_jobs_total[1m] offset 1d))",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "legendFormat": "Last day",
          "refId": "A"
        },
        {
          "expr": "awx_pending_jobs_total[1d]",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "legendFormat": "Actual",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Job Pending",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 19
      },
      "hiddenSeries": false,
      "id": 15,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "6.6.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "awx_job_templates_total",
          "legendFormat": "Job Templates",
          "refId": "A"
        },
        {
          "expr": "awx_inventories_total",
          "legendFormat": "Inventories",
          "refId": "B"
        },
        {
          "expr": "awx_projects_total",
          "legendFormat": "Projects",
          "refId": "C"
        },
        {
          "expr": "awx_organizations_total",
          "legendFormat": "Organizations",
          "refId": "D"
        },
        {
          "expr": "awx_hosts_total{type=\"active\"}",
          "legendFormat": "Active Hosts",
          "refId": "E"
        },
        {
          "expr": "awx_teams_total",
          "legendFormat": "Teams",
          "refId": "F"
        },
        {
          "expr": "awx_workflow_job_templates_total",
          "legendFormat": "Workflow  Job Templates",
          "refId": "G"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Overview",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "5s",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Ansible Metrics Tower",
  "uid": "dTC0e9wZk",
  "version": 1,
  "description": "This Dashboard is created to publish the ansible tower Metrics. The Credit goes to @leoaaraujo. "
}