Grafana dashboard: Auditoria de Logins
Description: Monitorando logоn de usuários do Active Directory com servidor MySQL


{
  "__inputs": [
    {
      "name": "DS_AUDITORIA_DE LOGINS",
      "label": "Auditoria de Logins",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.3.1"
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "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": 14827,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_AUDITORIA_DE LOGINS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Tamanho"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              },
              {
                "id": "custom.width",
                "value": 118
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "rgba(115, 191, 105, 0)",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 30
                    },
                    {
                      "color": "red",
                      "value": 50
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Trabalho"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 97
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Estação"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 146
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Impressora"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 136
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Páginas"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 97
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Cópias"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 93
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Arquivo"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 627
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "ID"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 84
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Versão do Windows"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 263
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "IP"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 137
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Nome da estação"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 185
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Nome"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 270
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 24,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "7.3.1",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT id AS \"ID\",\n       hostname AS \"Nome da estação\",\n       nome AS \"Nome\",\n       login AS \"Login\",\n       mac AS \"MAC\",\n       ip AS \"IP\",\n       winver AS \"Versão do Windows\",\n       teamviewer AS \"Team Viewer ID\",\n       DATE_FORMAT(DATA, \"%d/%m/%Y %T\") AS \"Data\"\nFROM logins\nWHERE date(DATA) = date(now())\n  AND date(DATA) = date(now())\n  AND time_to_sec(SUBTIME(DATA, '24:00:00')) >= 0;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "printlog",
          "timeColumn": "timecreated",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Logons efetuados (hoje)",
      "type": "table"
    }
  ],
  "refresh": "5s",
  "schemaVersion": 26,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s"
    ]
  },
  "timezone": "",
  "title": "Auditoria de Logins",
  "uid": "uh8iK4G7z",
  "version": 8,
  "description": "Monitorando logоn de usuários do Active Directory com servidor MySQL"
}