Cloudwatch Logs
A simple Amazon Cloudwatch logs dashboard. It allow filtering by log groups, and quick searches of any terms to filter the log lines.
### Description
This Dashboard allow you to show Cloudwatch logs without giving access to Explore. This is useful when you want to restrict access to only a couple of logs groups to a bunch of users or teams. The viewer permission is enough, no need for them to be editors.

### Features : 
- Show stats of event lines
- Show number of events
- Filter logs by log group
- Search an word to filter the lines

### How to use
After you import this dashboard, you'll need to change the variable $log_group to suit your needs.
You can either uses a fixed number of groups, or use * to show them all.

Cheers
{
  "__inputs": [
    {
      "name": "DS_CLOUDWATCH-WEBFACTORY",
      "label": "CloudWatch",
      "description": "",
      "type": "datasource",
      "pluginId": "cloudwatch",
      "pluginName": "CloudWatch"
    }
  ],
  "__requires": [
    {
      "type": "datasource",
      "id": "cloudwatch",
      "name": "CloudWatch",
      "version": "1.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.4.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "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": 14109,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1616413072501,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLOUDWATCH-WEBFACTORY}",
      "fieldConfig": {
        "defaults": {
          "color": {},
          "custom": {},
          "thresholds": {
            "mode": "absolute",
            "steps": []
          },
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 20,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 4,
      "interval": "5m",
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.4.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Log events",
          "dimensions": {
            "LogGroupName": "$log_group"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricName": "IncomingLogEvents",
          "namespace": "AWS/Logs",
          "period": "",
          "queryMode": "Metrics",
          "refId": "A",
          "region": "default",
          "statistics": [
            "Average"
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Events timeline",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:97",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:98",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_CLOUDWATCH-WEBFACTORY}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 6,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "alias": "",
          "dimensions": {
            "LogGroupName": "$log_group"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricName": "IncomingLogEvents",
          "namespace": "AWS/Logs",
          "period": "",
          "refId": "A",
          "region": "default",
          "statistics": [
            "Average"
          ]
        }
      ],
      "title": "Total events",
      "type": "stat"
    },
    {
      "datasource": "${DS_CLOUDWATCH-WEBFACTORY}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 24,
        "x": 0,
        "y": 5
      },
      "id": 2,
      "options": {
        "showLabels": false,
        "showTime": false,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "expression": "fields @message | filter @log like \"$log_group\" | filter @message like /(?i)$search/",
          "id": "",
          "logGroupNames": [],
          "namespace": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "default",
          "statsGroups": []
        }
      ],
      "title": "Logs",
      "type": "logs"
    }
  ],
  "refresh": false,
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "selected": true,
          "text": "your_log_group_1",
          "value": "your_log_group_1"
        },
        "description": "Cloudwatch Log groups",
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Log Group",
        "multi": false,
        "name": "log_group",
        "options": [
          {
            "selected": true,
            "text": "your_log_group_1",
            "value": "your_log_group_1"
          },
          {
            "selected": false,
            "text": "your_log_group_2",
            "value": "your_log_group_2"
          }
        ],
        "query": "your_log_group_1,your_log_group_2",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "description": null,
        "error": null,
        "hide": 0,
        "label": "Search",
        "name": "search",
        "options": [
          {
            "selected": true,
            "text": "",
            "value": ""
          }
        ],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-2d",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Cloudwatch Logs",
  "uid": "lYQ8-oQGk",
  "version": 3,
  "description": "A simple Amazon Cloudwatch logs dashboard. It allow filtering by log groups, and quick searches of any terms to filter the log lines."
}