Repository: alhazmy13/Synology-NAS-monitoring Branch: master Commit: 96d3678c1a3c Files: 29 Total size: 305.6 KB Directory structure: gitextract_je0y3692/ ├── .github/ │ └── workflows/ │ └── ci.yml ├── README.md ├── SynologyDsahboard.json ├── docker/ │ ├── Dockerfile │ ├── README.md │ ├── bash/ │ │ └── profile │ ├── grafana/ │ │ ├── grafana.ini │ │ └── provisioning/ │ │ └── datasources/ │ │ └── influxDB.yaml │ ├── influxdb/ │ │ └── influxdb.conf │ ├── rootfs/ │ │ └── grafana-plugins.sh │ ├── supervisord/ │ │ └── supervisord.conf │ ├── synology/ │ │ ├── SYNOLOGY-DISK-MIB.txt │ │ ├── SYNOLOGY-EBOX-MIB.txt │ │ ├── SYNOLOGY-FLASHCACHE-MIB.txt │ │ ├── SYNOLOGY-GPUINFO-MIB.txt │ │ ├── SYNOLOGY-ISCSILUN-MIB.txt │ │ ├── SYNOLOGY-PORT-MIB.txt │ │ ├── SYNOLOGY-RAID-MIB.txt │ │ ├── SYNOLOGY-SERVICES-MIB.txt │ │ ├── SYNOLOGY-SHA-MIB.txt │ │ ├── SYNOLOGY-SMART-MIB.txt │ │ ├── SYNOLOGY-SPACEIO-MIB.txt │ │ ├── SYNOLOGY-STORAGEIO-MIB.txt │ │ ├── SYNOLOGY-SYSTEM-MIB.txt │ │ └── SYNOLOGY-UPS-MIB.txt │ ├── syslog/ │ │ └── syslog-ng.conf │ └── telegraf/ │ ├── init.sh │ └── telegraf.conf └── docker-compose.yml ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/ci.yml ================================================ name: ci on: push: tags: - '**' workflow_dispatch: jobs: docker: runs-on: ubuntu-latest steps: - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v3 with: images: alhazmy13/telegraf-influxdb-grafana tags: | type=ref,event=branch type=ref,event=tag type=ref,event=pr type=raw,value=latest,enable={{is_default_branch}} - # Setting up Docker Buildx with docker-container driver is required # at the moment to be able to use a subdirectory with Git context name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Build and push uses: docker/build-push-action@v3 with: context: "{{defaultContext}}:docker" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} push-docker-readme: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Update repo description uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} repository: alhazmy13/telegraf-influxdb-grafana short-description: ${{ github.event.repository.description }} ================================================ FILE: README.md ================================================ # Synology NAS monitoring ![alt text](https://github.com/alhazmy13/Synology-NAS-monitoring/blob/master/dashboard.png) The main points of this project are: * Persistence is supported via mounting volumes to a Docker container. * Grafana will store its data in SQLite files instead of a MySQL. * Added snmp packages and Synology NAS MIBS. * Enable ## Enable SNMP 1. From Control panel in your Synology NAS go to Terminal & SNMP 2. Click on SNMP tab, and enable SNMPv1, SNMPv2 service 3. in Community input put ***public*** 4. Save ## Run Docker image in your Synology 1. Install Docker from Synology package center 2. Create two empty folders in your Synology ***influxdb*** and ***grafana***, we need to use it later to mount it to our container. 3. Open Docker client from Synology > Image > Add > Add from url and paste Hub page url "https://hub.docker.com/r/alhazmy13/telegraf-influxdb-grafana" 4. Wait until it finishes downloading the image 5. Click on the image "alhazmy13/telegraf-influxdb-grafana" and then click on Launch 6. Network Tab keep it in bridge mode 7. Check "Enable auto-restart." 8. Port settings, just change Local port for 3003 from Auto to 3003, and port 514 from Auto to 5144 9. In Volume settings, click Add folder and select the first folder that we created, "grafana" and on mount Path, paste ***/var/lib/grafana*** 10. In Volume settings again, click Add Folder and select the second folder that we created "influxdb" and on mount Path paste ***/var/lib/influxdb*** 12. [OPTIONAL] Environment Tab > Add new variable "TZ" with your local time zone **ignore this if you want to use the default UTC** 14. Apply, Next, Done and your container should be ready. ## Start Grafana 1. Open [http://YOUR_LOCAL_NAS_IP:3003](http://YOUR_LOCAL_NAS_IP:3003) and login with the default username ***root*** and password ***root*** 2. You need to import the dashboard. To do this, go to [http://YOUR_LOCAL_NAS_IP:3003/dashboard/import](http://YOUR_LOCAL_NAS_IP:3003/dashboard/import) and put ***14590*** in "Import via grafana.com" input 3. Click on load and complete the process ## Enable Logging 1. Install Log center From Synology package center 2. Open Log center app 3. Click on Log Sending > check "Send log to syslog server" 3. Set Server = ***localhost***, port = ***5144***, Protocol = ***UDP***, Format = ***BSD (RFC 3164)*** 4. For testing, click on "Send test log" 4. Apply ## Configure Firewall If the firewall is enabled, then you need to add a new rule for port UDP/161, This is mandatory otherwise, some data will be missing from the dashboard https://github.com/alhazmy13/Synology-NAS-monitoring/issues/7 . 1. Open Control panel 2. Security -> Firewall 3. Edit Rules -> Create New Rule 4. In the ports section, select from a built-in applications and chose SNMP service 5. In the IP section select Spesifc IP -> subnet -> Source: 172.12.0.0 / subnet: 255.255.0.0 6. Action = Allow 7. Disable and re-enable the firewall for it to take effect ================================================ FILE: SynologyDsahboard.json ================================================ { "__inputs": [ { "name": "DS_INFLUXDB", "label": "InfluxDB", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "panel", "id": "gauge", "name": "Gauge", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "7.3.5" }, { "type": "panel", "id": "graph", "name": "Graph", "version": "" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "singlestat", "name": "Singlestat", "version": "" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "table-old", "name": "Table (old)", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "A Dashboard to monitor Synology NAS", "editable": true, "gnetId": 14573, "graphTooltip": 0, "id": null, "iteration": 1623934144709, "links": [], "panels": [ { "collapsed": false, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 71, "panels": [], "title": "Overall", "type": "row" }, { "columns": [], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fontSize": "100%", "gridPos": { "h": 3, "w": 8, "x": 0, "y": 1 }, "id": 6, "links": [], "pageSize": null, "scroll": false, "showHeader": true, "sort": { "col": 0, "desc": true }, "styles": [ { "$$hashKey": "object:3881", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "link": false, "pattern": "Time", "type": "hidden" }, { "$$hashKey": "object:3882", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "targets": [ { "alias": "$col", "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [], "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "table", "select": [ [ { "params": [ "modelName" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "Synology Model" ], "type": "alias" } ], [ { "params": [ "version" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "DSM Version" ], "type": "alias" } ] ], "tags": [], "timeField": "@timestamp" } ], "title": "Synology NAS", "transform": "table", "type": "table-old" }, { "cacheTimeout": null, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": {}, "mappings": [ { "from": "30", "id": 0, "op": "=", "text": "Good", "to": "54", "type": 1, "value": "1" }, { "from": "", "id": 1, "operator": "", "text": "", "to": "", "type": 1, "value": "" } ], "max": 60, "min": 0, "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ { "color": "semi-dark-green", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 2 }, { "color": "rgba(245, 54, 54, 0.9)", "value": 3 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 6, "w": 6, "x": 8, "y": 1 }, "id": 67, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "7.3.5", "targets": [ { "alias": "$tag_diskID", "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "influxdb", "groupBy": [ { "params": [ "diskID" ], "type": "tag" } ], "measurement": "diskTable", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "query": "SELECT last(\"diskStatus\") FROM \"diskTable\" WHERE (\"agent_host\" =~ /^$host$/) AND $timeFilter GROUP BY \"diskID\"", "rawQuery": true, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "diskStatus" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [ { "key": "agent_host", "operator": "=~", "value": "/^$host$/" } ], "timeField": "@timestamp" } ], "timeFrom": null, "timeShift": null, "title": "Disk Status", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {}, "mappings": [ { "from": "30", "id": 0, "op": "=", "text": "N/A", "to": "54", "type": 1, "value": "null" } ], "max": 60, "min": 0, "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ { "color": "semi-dark-green", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 42 }, { "color": "rgba(245, 54, 54, 0.9)", "value": 48 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 6, "w": 6, "x": 14, "y": 1 }, "id": 69, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "7.3.5", "targets": [ { "alias": "$tag_diskID", "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "influxdb", "groupBy": [ { "params": [ "diskID" ], "type": "tag" } ], "measurement": "diskTable", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "diskTemperature" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [ { "key": "agent_host", "operator": "=~", "value": "/^$host$/" } ], "timeField": "@timestamp" } ], "timeFrom": null, "timeShift": null, "title": "Disk temperature", "type": "stat" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": "${DS_INFLUXDB}", "decimals": 1, "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "dtdurations", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 8, "x": 0, "y": 4 }, "id": 16, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:4104", "name": "value to text", "value": 1 }, { "$$hashKey": "object:4105", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "alias": "", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "system", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "uptime" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [] } ], "thresholds": "", "title": "NAS Uptime", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "$$hashKey": "object:4107", "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "center", "displayMode": "color-background", "filterable": false }, "mappings": [], "max": 1, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 0 }, { "color": "dark-green", "value": 1 } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 8, "x": 0, "y": 7 }, "id": 29, "links": [], "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "mean" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "7.3.5", "targets": [ { "alias": "$col", "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [], "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "query": "SELECT last(\"usersSSH\") AS \"SSH\", last(\"usersHTTP\") AS \"HTTP\", last(\"usersSFTP\") AS \"SFTP\" FROM \"snmp.SYNO\" WHERE (\"agent_host\" = '192.168.86.149') AND $timeFilter", "rawQuery": false, "refId": "A", "resultFormat": "table", "select": [ [ { "params": [ "usersSSH" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "SSH" ], "type": "alias" } ], [ { "params": [ "usersHTTP" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "HTTP" ], "type": "alias" } ], [ { "params": [ "usersSFTP" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "SFTP" ], "type": "alias" } ], [ { "params": [ "usersCIFS" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "CIFS" ], "type": "alias" } ], [ { "params": [ "usersAFP" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "AFP" ], "type": "alias" } ], [ { "params": [ "usersNFS" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "NFS" ], "type": "alias" } ], [ { "params": [ "usersFTP" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "FTP" ], "type": "alias" } ] ], "tags": [], "timeField": "@timestamp" } ], "title": "Connected Users/Servicess", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": {}, "mappings": [ { "$$hashKey": "object:2718", "id": 0, "op": "=", "text": "N/A", "type": 1, "value": "null" } ], "max": 100, "min": 0, "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ { "color": "rgba(50, 172, 45, 0.97)", "value": null }, { "color": "yellow", "value": 50 }, { "color": "rgba(245, 54, 54, 0.9)", "value": 75 } ] }, "unit": "celsius" }, "overrides": [] }, "gridPos": { "h": 6, "w": 3, "x": 8, "y": 7 }, "id": 11, "interval": null, "links": [], "maxDataPoints": 100, "options": { "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "7.3.5", "targets": [ { "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [ { "params": [ "$interval" ], "type": "time" } ], "hide": false, "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "temperature" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [], "timeField": "@timestamp" } ], "title": "System temperature", "type": "gauge" }, { "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": {}, "decimals": 0, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "percentage", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 50 }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 6, "w": 3, "x": 11, "y": 7 }, "id": 37, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "last" ], "fields": "/^mem\\.last$/", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "7.3.5", "targets": [ { "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "previous" ], "type": "fill" } ], "measurement": "mem", "orderByTime": "ASC", "policy": "default", "queryType": "randomWalk", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "used_percent" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [] } ], "timeFrom": null, "timeShift": null, "title": "Ram ", "type": "gauge" }, { "cacheTimeout": null, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {}, "decimals": 2, "mappings": [ { "$$hashKey": "object:2799", "id": 0, "op": "=", "text": "N/A", "type": 1, "value": "null" } ], "min": 0, "nullValueMode": "connected", "thresholds": { "mode": "percentage", "steps": [ { "color": "#299c46", "value": null }, { "color": "#EAB839", "value": 50 }, { "color": "red", "value": 80 } ] }, "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 6, "w": 3, "x": 14, "y": 7 }, "id": 22, "interval": null, "links": [], "maxDataPoints": 100, "options": { "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^disk\\.last$/", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "7.3.5", "targets": [ { "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "disk", "orderByTime": "ASC", "policy": "default", "queryType": "randomWalk", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "used" ], "type": "field" }, { "params": [], "type": "last" } ], [ { "params": [ "total" ], "type": "field" } ] ], "tags": [] } ], "title": "Used Capacity", "type": "gauge" }, { "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { "custom": {}, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 50 }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 6, "w": 3, "x": 17, "y": 7 }, "id": 39, "options": { "reduceOptions": { "calcs": [ "last" ], "fields": "/^cpu\\.last$/", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "7.3.5", "targets": [ { "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "previous" ], "type": "fill" } ], "measurement": "cpu", "orderByTime": "ASC", "policy": "default", "queryType": "randomWalk", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "usage_system" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [] } ], "timeFrom": null, "timeShift": null, "title": "CPU", "type": "gauge" }, { "cacheTimeout": null, "colorBackground": true, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 2, "x": 0, "y": 10 }, "id": 7, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:1726", "name": "value to text", "value": 1 }, { "$$hashKey": "object:1727", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "alias": "$col", "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "raidName" ], "type": "tag" } ], "measurement": "raidTable", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "raidStatus" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [], "timeField": "@timestamp" } ], "thresholds": "11,12", "title": "Raid Status", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "$$hashKey": "object:1729", "op": "=", "text": "Normal", "value": "1" }, { "$$hashKey": "object:1730", "op": "=", "text": "Repairing", "value": "2" }, { "$$hashKey": "object:1731", "op": "=", "text": "Migrating", "value": "3" }, { "$$hashKey": "object:1732", "op": "=", "text": "Expanding", "value": "4" }, { "$$hashKey": "object:1733", "op": "=", "text": "Deleting", "value": "5" }, { "$$hashKey": "object:1734", "op": "=", "text": "Creating", "value": "6" }, { "$$hashKey": "object:1735", "op": "=", "text": "RaidSyncing", "value": "7" }, { "$$hashKey": "object:1736", "op": "=", "text": "RaidParityChecking", "value": "8" }, { "$$hashKey": "object:1737", "op": "=", "text": "RaidAssembling", "value": "9" }, { "$$hashKey": "object:1738", "op": "=", "text": "Canceling", "value": "10" }, { "$$hashKey": "object:1739", "op": "=", "text": "Degrade", "value": "11" }, { "$$hashKey": "object:1740", "op": "=", "text": "Crashed", "value": "12" }, { "$$hashKey": "object:1741", "op": "=", "text": "Scrubbing", "value": "13" }, { "$$hashKey": "object:1742", "op": "=", "text": "Deploying volume", "value": "14" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": true, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 2, "x": 2, "y": 10 }, "id": 10, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:1824", "name": "value to text", "value": 1 }, { "$$hashKey": "object:1825", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "dsType": "InfluxDB", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "sysName" ], "type": "tag" } ], "measurement": "snmp.SYNO", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "systemStatus" ], "type": "field" }, { "params": [], "type": "last" } ] ], "tags": [] } ], "thresholds": "2,2", "title": "Overall status", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "$$hashKey": "object:1827", "op": "=", "text": "Normal", "value": "1" }, { "$$hashKey": "object:1828", "op": "=", "text": "Failed", "value": "2" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": true, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 2, "x": 4, "y": 10 }, "id": 25, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:1892", "name": "value to text", "value": 1 }, { "$$hashKey": "object:1893", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [ { "params": [ "agent_host" ], "type": "tag" } ], "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "powerStatus" ], "type": "field" } ] ], "tags": [], "timeField": "@timestamp" } ], "thresholds": "2,2", "title": "Power Status", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "$$hashKey": "object:1895", "op": "=", "text": "Normal", "value": "1" }, { "$$hashKey": "object:1896", "op": "=", "text": "Failed", "value": "2" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": true, "colorValue": false, "colors": [ "#FF780A", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 2, "x": 6, "y": 10 }, "id": 27, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:1960", "name": "value to text", "value": 1 }, { "$$hashKey": "object:1961", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [ { "params": [ "agent_host" ], "type": "tag" } ], "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "upgradeAvailable" ], "type": "field" } ] ], "tags": [], "timeField": "@timestamp" } ], "thresholds": "2,2", "title": "Upgrade Available", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "$$hashKey": "object:1963", "op": "=", "text": "YES", "value": "1" }, { "$$hashKey": "object:1964", "op": "=", "text": "NO", "value": "2" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": true, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 2, "x": 0, "y": 12 }, "id": 13, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "$$hashKey": "object:1652", "name": "value to text", "value": 1 }, { "$$hashKey": "object:1653", "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "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 }, "tableColumn": "", "targets": [ { "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [], "measurement": "snmp.SYNO", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "systemFanStatus" ], "type": "field" } ] ], "tags": [], "timeField": "@timestamp" } ], "thresholds": "2,2", "title": "Fan status", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "$$hashKey": "object:1655", "op": "=", "text": "Normal", "value": "1" }, { "$$hashKey": "object:1656", "op": "=", "text": "Failed", "value": "2" } ], "valueName": "current" }, { "collapsed": false, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, "id": 73, "panels": [], "title": "Disk", "type": "row" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 15 }, "hiddenSeries": false, "id": 47, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "max": true, "min": true, "rightSide": false, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_name: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" }, { "key": "path", "params": [ "tag" ], "type": "tag" } ], "measurement": "io_reads", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(writes),1s) as \"write\" FROM \"diskio\" WHERE \"name\" =~ /md[2-3]$/AND $timeFilter GROUP BY time($interval), *", "rawQuery": true, "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Write iops", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:560", "format": "iops", "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:561", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 15 }, "hiddenSeries": false, "id": 51, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "max": true, "min": true, "rightSide": false, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_host: $tag_name: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" }, { "key": "path", "params": [ "tag" ], "type": "tag" } ], "measurement": "io_reads", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(read_time),1s) as \"read\" FROM \"diskio\" WHERE \"name\" =~ /md[2-3]$/ AND $timeFilter GROUP BY time($interval), *", "rawQuery": true, "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Read I/O time", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:285", "format": "ms", "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:286", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 15 }, "hiddenSeries": false, "id": 53, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "max": true, "min": true, "rightSide": false, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_name: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" }, { "key": "path", "params": [ "tag" ], "type": "tag" } ], "measurement": "io_reads", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(write_time),1s) as \"write\" FROM \"diskio\" WHERE \"name\" =~ /md[2-3]$/ AND $timeFilter GROUP BY time($interval), *", "rawQuery": true, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Write I/O time", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:285", "format": "ms", "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:286", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 23 }, "hiddenSeries": false, "id": 49, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "max": true, "min": true, "rightSide": false, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_name: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" }, { "key": "path", "params": [ "tag" ], "type": "tag" } ], "measurement": "io_reads", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(reads),1s) as \"write\" FROM \"diskio\" WHERE \"name\" =~ /md[2-3]$/AND $timeFilter GROUP BY time($interval), *", "rawQuery": true, "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Read iops", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:560", "format": "iops", "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:561", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "decimals": 2, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 2, "fillGradient": 10, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 23 }, "hiddenSeries": false, "id": 57, "interval": "1m", "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": null, "sortDesc": null, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "paceLength": 10, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "SHR Array (Volume 1)", "dsType": "influxdb", "groupBy": [ { "params": [ "$__interval" ], "type": "time" } ], "hide": false, "measurement": "diskio", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(\"write_bytes\"), 1s) FROM \"diskio\" WHERE (\"host\" = '0d42d827caee' AND \"name\" = 'md2') AND $timeFilter GROUP BY time($__interval)", "rawQuery": false, "refId": "D", "resultFormat": "time_series", "select": [ [ { "params": [ "write_bytes" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1s" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "name", "operator": "=", "value": "md2" } ] }, { "alias": "SSD Disk (Volume 2)", "dsType": "influxdb", "groupBy": [ { "params": [ "$__interval" ], "type": "time" } ], "hide": false, "measurement": "diskio", "orderByTime": "ASC", "policy": "default", "refId": "I", "resultFormat": "time_series", "select": [ [ { "params": [ "write_bytes" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1s" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "name", "operator": "=", "value": "md3" } ] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Write Rates", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:441", "decimals": 1, "format": "Bps", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:442", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "decimals": 2, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 2, "fillGradient": 10, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 23 }, "hiddenSeries": false, "id": 55, "interval": "1m", "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": null, "sortDesc": null, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "paceLength": 10, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "SHR Array (Volume 1)", "dsType": "influxdb", "groupBy": [ { "params": [ "$__interval" ], "type": "time" } ], "hide": false, "measurement": "diskio", "orderByTime": "ASC", "policy": "default", "query": "SELECT non_negative_derivative(mean(\"read_bytes\"), 1s) FROM \"diskio\" WHERE (\"host\" = '0d42d827caee' AND \"name\" = 'md2') AND $timeFilter GROUP BY time($__interval)", "rawQuery": false, "refId": "D", "resultFormat": "time_series", "select": [ [ { "params": [ "read_bytes" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1s" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "name", "operator": "=", "value": "md2" } ] }, { "alias": "SSD Disk (Volume 2)", "dsType": "influxdb", "groupBy": [ { "params": [ "$__interval" ], "type": "time" } ], "hide": false, "measurement": "diskio", "orderByTime": "ASC", "policy": "default", "refId": "I", "resultFormat": "time_series", "select": [ [ { "params": [ "read_bytes" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1s" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "name", "operator": "=", "value": "md3" } ] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Disk Read Rates", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:595", "decimals": 1, "format": "Bps", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:596", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ], "yaxis": { "align": false, "alignLevel": null } }, { "columns": [], "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fontSize": "100%", "gridPos": { "h": 8, "w": 24, "x": 0, "y": 31 }, "id": 8, "links": [], "pageSize": null, "scroll": false, "showHeader": true, "sort": { "col": 1, "desc": false }, "styles": [ { "$$hashKey": "object:585", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "$$hashKey": "object:586", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "Model", "thresholds": [], "type": "string", "unit": "short" }, { "$$hashKey": "object:587", "alias": "", "align": "auto", "colorMode": "cell", "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "mappingType": 1, "pattern": "Status", "thresholds": [ "4", "5" ], "type": "string", "unit": "short", "valueMaps": [ { "$$hashKey": "object:643", "text": "Fail", "value": "0" }, { "$$hashKey": "object:644", "text": "OK", "value": "1" }, { "$$hashKey": "object:678", "text": "Initialized", "value": "2" }, { "$$hashKey": "object:680", "text": "Not initialized", "value": "3" } ] }, { "$$hashKey": "object:588", "align": "auto", "colorMode": "cell", "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "Température", "thresholds": [ "50", "70" ], "type": "number", "unit": "short" } ], "targets": [ { "bucketAggs": [ { "id": "2", "settings": { "interval": "auto" }, "type": "date_histogram" } ], "dsType": "InfluxDB", "groupBy": [ { "params": [ "diskID" ], "type": "tag" } ], "measurement": "diskTable", "metrics": [ { "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "table", "select": [ [ { "params": [ "diskModel" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "Model" ], "type": "alias" } ], [ { "params": [ "diskStatus" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "Status" ], "type": "alias" } ], [ { "params": [ "diskType" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "Disk Type" ], "type": "alias" } ], [ { "params": [ "diskTemperature" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "CurrentC" ], "type": "alias" } ], [ { "params": [ "diskTemperature" ], "type": "field" }, { "params": [], "type": "max" }, { "params": [ "MaxC" ], "type": "alias" } ], [ { "params": [ "diskTemperature" ], "type": "field" }, { "params": [], "type": "min" }, { "params": [ "MinC" ], "type": "alias" } ] ], "tags": [], "timeField": "@timestamp" } ], "title": "Disk Model & Status", "transform": "table", "type": "table-old" }, { "collapsed": false, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 39 }, "id": 75, "panels": [], "title": "CPU/RAM", "type": "row" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 8, "x": 0, "y": 40 }, "hiddenSeries": false, "id": 35, "legend": { "alignAsTable": true, "avg": false, "current": true, "max": true, "min": true, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "groupBy": [ { "params": [ "10s" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "cpu", "orderByTime": "ASC", "policy": "default", "queryType": "randomWalk", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "usage_system" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "System" ], "type": "alias" } ], [ { "params": [ "usage_user" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "User" ], "type": "alias" } ], [ { "params": [ "usage_iowait" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "I/O" ], "type": "alias" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "CPU Load", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:1029", "decimals": null, "format": "percent", "label": null, "logBase": 1, "max": "100", "min": null, "show": true }, { "$$hashKey": "object:1030", "format": "percent", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 8, "grid": {}, "gridPos": { "h": 9, "w": 8, "x": 8, "y": 40 }, "hiddenSeries": false, "id": 59, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_host: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" } ], "hide": false, "measurement": "cpu_percentageBusy", "orderByTime": "ASC", "policy": "default", "query": "SELECT mean(running) as running, mean(blocked) as blocked, mean(sleeping) as sleeping, mean(stopped) as stopped, mean(zombies) as zombies, mean(paging) as paging, mean(unknown) as unknown FROM \"processes\" WHERE $timeFilter GROUP BY time($interval), host ORDER BY asc", "rawQuery": true, "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Processes", "tooltip": { "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:3342", "format": "short", "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:3343", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 9, "w": 8, "x": 16, "y": 40 }, "hiddenSeries": false, "id": 63, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "show": true, "sort": null, "sortDesc": null, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_host: $col", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" } ], "measurement": "system_load1", "orderByTime": "ASC", "policy": "default", "query": "SELECT mean(load1) as load1,mean(load5) as load5,mean(load15) as load15 FROM \"system\" WHERE $timeFilter GROUP BY time($interval), * ORDER BY asc", "rawQuery": true, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "CPU Load Average", "tooltip": { "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:3560", "format": "short", "logBase": 1, "max": null, "min": 0, "show": true }, { "$$hashKey": "object:3561", "format": "short", "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "editable": true, "error": false, "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 8, "grid": {}, "gridPos": { "h": 9, "w": 8, "x": 0, "y": 49 }, "hiddenSeries": false, "id": 65, "interval": "$inter", "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": true, "max": true, "min": true, "rightSide": false, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:3659", "alias": "/cpu/" }, { "$$hashKey": "object:3660", "alias": "/avg/" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "$tag_cpu", "dsType": "influxdb", "function": "mean", "groupBy": [ { "interval": "auto", "params": [ "auto" ], "type": "time" }, { "key": "host", "params": [ "tag" ], "type": "tag" } ], "hide": false, "measurement": "cpu_percentageBusy", "orderByTime": "ASC", "policy": "default", "query": "SELECT 100 - mean(\"usage_idle\") FROM \"cpu\" WHERE (\"cpu\" =~ /cpu[0-9].*/) AND $timeFilter GROUP BY time($interval), \"cpu\" fill(null)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "CPU usage per core", "tooltip": { "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:3669", "decimals": null, "format": "percent", "logBase": 1, "max": "100", "min": 0, "show": true }, { "$$hashKey": "object:3670", "format": "short", "logBase": 1, "max": "100", "min": "0", "show": false } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {}, "links": [] }, "overrides": [] }, "fill": 6, "fillGradient": 2, "gridPos": { "h": 9, "w": 8, "x": 8, "y": 49 }, "hiddenSeries": false, "id": 61, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "rightSide": false, "show": true, "sort": null, "sortDesc": null, "total": false, "values": true }, "lines": true, "linewidth": 3, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "paceLength": 10, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "Memory Used %", "dsType": "influxdb", "groupBy": [], "measurement": "mem", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "used_percent" ], "type": "field" } ] ], "tags": [] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Memory Used (%)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:3462", "decimals": null, "format": "percent", "label": "", "logBase": 1, "max": "100", "min": "0", "show": true }, { "$$hashKey": "object:3463", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "collapsed": false, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 58 }, "id": 77, "panels": [], "title": "Network", "type": "row" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 11, "w": 16, "x": 0, "y": 59 }, "hiddenSeries": false, "id": 33, "legend": { "alignAsTable": true, "avg": false, "current": true, "max": true, "min": true, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "Network:$col", "bucketAggs": [ { "field": "@timestamp", "id": "2", "settings": { "interval": "auto", "min_doc_count": 0, "trimEdges": 0 }, "type": "date_histogram" } ], "dsType": "influxdb", "groupBy": [ { "params": [ "10s" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "ifTable", "metrics": [ { "field": "select field", "id": "1", "type": "count" } ], "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "ifInOctets" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "10s" ], "type": "non_negative_derivative" }, { "params": [ "in" ], "type": "alias" } ], [ { "params": [ "ifOutOctets" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "10s" ], "type": "non_negative_derivative" }, { "params": [ "out" ], "type": "alias" } ] ], "tags": [], "timeField": "@timestamp" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Traffic", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:2169", "format": "bps", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:2170", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ], "yaxis": { "align": false, "alignLevel": null } }, { "collapsed": false, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 70 }, "id": 79, "panels": [], "title": "Log", "type": "row" }, { "datasource": "${DS_INFLUXDB}", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "left", "displayMode": "auto", "filterable": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "dark-purple", "value": null }, { "color": "dark-red", "value": 2 }, { "color": "dark-orange", "value": 3 }, { "color": "dark-yellow", "value": 4 }, { "color": "rgb(150, 150, 150)", "value": 5 }, { "color": "rgb(51, 51, 51)", "value": 6 }, { "color": "rgb(5, 5, 5)", "value": 7 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "severity_code" }, "properties": [ { "id": "mappings", "value": [ { "from": "", "id": 0, "text": "Debug", "to": "", "type": 1, "value": "7" }, { "from": "", "id": 1, "text": "Info", "to": "", "type": 1, "value": "6" }, { "from": "", "id": 2, "text": "Notice", "to": "", "type": 1, "value": "5" }, { "from": "", "id": 3, "text": "Warning", "to": "", "type": 1, "value": "4" }, { "from": "", "id": 4, "text": "Error", "to": "", "type": 1, "value": "3" }, { "from": "", "id": 5, "text": "Critical", "to": "", "type": 1, "value": "2" }, { "from": "", "id": 6, "text": "Alert", "to": "", "type": 1, "value": "1" }, { "from": "", "id": 7, "text": "Emergency", "to": "", "type": 1, "value": "0" } ] }, { "id": "custom.displayMode", "value": "color-background" }, { "id": "custom.width", "value": 119 } ] }, { "matcher": { "id": "byName", "options": "Time" }, "properties": [ { "id": "custom.width", "value": 163 } ] }, { "matcher": { "id": "byName", "options": "hostname" }, "properties": [ { "id": "custom.width", "value": 194 } ] }, { "matcher": { "id": "byName", "options": "appname" }, "properties": [ { "id": "custom.width", "value": 264 } ] } ] }, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 71 }, "id": 43, "options": { "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Time" } ] }, "pluginVersion": "7.3.5", "targets": [ { "groupBy": [ { "params": [ "hostname" ], "type": "tag" }, { "params": [ "appname" ], "type": "tag" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "table", "select": [ [ { "params": [ "severity_code" ], "type": "field" } ], [ { "params": [ "message" ], "type": "field" } ] ], "tags": [ { "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] } ], "timeFrom": null, "timeShift": null, "title": "Syslog Messages", "type": "table" }, { "aliasColors": {}, "bars": true, "dashLength": 10, "dashes": false, "datasource": "${DS_INFLUXDB}", "decimals": 0, "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 71 }, "hiddenSeries": false, "id": 45, "interval": "", "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": null, "sortDesc": null, "total": true, "values": true }, "lines": false, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.3.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "alias": "Info", "color": "rgb(80, 80, 80)", "stack": "A" }, { "alias": "Notice", "color": "rgb(182, 182, 182)", "stack": "A" }, { "alias": "Warning", "color": "#E0B400", "stack": "A" }, { "alias": "Error", "color": "#FF780A", "stack": "A" }, { "alias": "Critical", "color": "#E02F44", "stack": "A" }, { "alias": "Alert", "color": "#8F3BB8", "stack": "A" }, { "alias": "Emergency", "color": "#8F3BB8", "stack": "A" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "Info", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "info" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Notice", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "notice" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Warning", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "D", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "warning" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Error", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "err" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Critical", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "E", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "crit" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Alert", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "F", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "alert" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] }, { "alias": "Emergency", "groupBy": [ { "params": [ "1m" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "syslog", "orderByTime": "ASC", "policy": "default", "refId": "G", "resultFormat": "time_series", "select": [ [ { "params": [ "severity_code" ], "type": "field" }, { "params": [], "type": "count" } ] ], "tags": [ { "key": "severity", "operator": "=", "value": "emerg" }, { "condition": "AND", "key": "hostname", "operator": "=~", "value": "/^$logHost$/" }, { "condition": "AND", "key": "severity", "operator": "=~", "value": "/^$severity$/" }, { "condition": "AND", "key": "appname", "operator": "=~", "value": "/^$appname$/" }, { "condition": "AND", "key": "message", "operator": "=~", "value": "/$Query/" } ] } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "syslog count", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "decimals": 0, "format": "none", "label": "Messages / min", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ], "yaxis": { "align": false, "alignLevel": null } } ], "refresh": false, "schemaVersion": 26, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "InfluxDB", "value": "InfluxDB" }, "error": null, "hide": 0, "includeAll": false, "label": null, "multi": false, "name": "InfluxDB", "options": [], "query": "influxdb", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "Syno:", "multi": true, "name": "host", "options": [], "query": "SHOW TAG VALUES FROM \"snmp.SYNO\" WITH KEY = \"agent_host\"", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "Interface:", "multi": true, "name": "intf", "options": [], "query": "SHOW TAG VALUES FROM \"ifTable\" WITH KEY = \"ifDescr\" WHERE \"agent_host\" =~ /^$host/", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "Appname", "multi": true, "name": "appname", "options": [], "query": "SHOW TAG VALUES FROM syslog WITH KEY=appname", "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "LogHostname", "multi": true, "name": "logHost", "options": [], "query": "SHOW TAG VALUES FROM syslog WITH KEY=hostname", "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "Severity", "multi": true, "name": "severity", "options": [], "query": "SHOW TAG VALUES FROM syslog WITH KEY=severity", "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_INFLUXDB}", "definition": "", "error": null, "hide": 0, "includeAll": true, "label": "disk", "multi": true, "name": "disk", "options": [], "query": "SHOW TAG VALUES FROM \"diskio\" WITH KEY = \"name\"", "refresh": 1, "regex": "/[a-z]d[\\D]$/", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": true }, { "current": {}, "error": null, "hide": 0, "label": "LogQuery", "name": "Query", "options": [], "query": "", "skipUrlSync": false, "type": "textbox" }, { "auto": true, "auto_count": "100", "auto_min": "30s", "current": { "selected": false, "text": "1m", "value": "1m" }, "error": null, "hide": 0, "label": "Interval", "name": "inter", "options": [ { "selected": false, "text": "auto", "value": "$__auto_interval_inter" }, { "selected": true, "text": "1m", "value": "1m" } ], "query": "1m", "queryValue": "", "refresh": 2, "skipUrlSync": false, "type": "interval" } ] }, "time": { "from": "now-7d", "to": "now" }, "timepicker": { "refresh_intervals": [ "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "browser", "title": "Synology DashBoard", "uid": "TIcL1_ezk22", "version": 27 } ================================================ FILE: docker/Dockerfile ================================================ FROM ubuntu:20.04 LABEL maintainer="Abdullah ALhazmy " ENV DEBIAN_FRONTEND noninteractive ENV LANG C.UTF-8 # Default versions ENV TELEGRAF_VERSION 1.16.3-1 ENV INFLUXDB_VERSION 1.8.6 ENV GRAFANA_VERSION 9.1.3 ENV CHRONOGRAF_VERSION 1.8.9.1 ENV GF_DATABASE_TYPE=sqlite3 # Clear previous sources RUN rm /var/lib/apt/lists/* -vf # Base dependencies RUN apt-get -y update && \ apt-get -y dist-upgrade && \ apt-get -y install \ apt-utils \ ca-certificates \ curl \ git \ htop \ libfontconfig \ mc \ net-tools \ openssh-server \ supervisor \ gnupg \ gnupg2 \ gnupg1 \ snmp \ syslog-ng \ snmp-mibs-downloader \ wget && \ curl -sL https://deb.nodesource.com/setup_15.x | bash - && \ apt-get install -y nodejs # Configure Supervisord, SSH and base env COPY supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf WORKDIR /root RUN mkdir -p /var/log/supervisor && \ mkdir -p /var/run/sshd && \ echo 'root:root' | chpasswd && \ rm -rf .ssh && \ rm -rf .profile && \ mkdir .ssh COPY bash/profile .profile # Install InfluxDB RUN wget https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb && \ dpkg -i influxdb_${INFLUXDB_VERSION}_amd64.deb && rm influxdb_${INFLUXDB_VERSION}_amd64.deb # Configure InfluxDB COPY influxdb/influxdb.conf /etc/influxdb/influxdb.conf RUN chmod 0777 /var/lib/influxdb #install syslog-ng COPY syslog/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf # Install Telegraf RUN wget https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_amd64.deb && \ dpkg -i telegraf_${TELEGRAF_VERSION}_amd64.deb && rm telegraf_${TELEGRAF_VERSION}_amd64.deb # Configure Telegraf RUN mv -f /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.default COPY telegraf/telegraf.conf /etc/telegraf/telegraf.conf COPY telegraf/init.sh /etc/init.d/telegraf RUN chmod 0777 /etc/init.d/telegraf # Install Chronograf RUN wget https://dl.influxdata.com/chronograf/releases/chronograf_${CHRONOGRAF_VERSION}_amd64.deb && \ dpkg -i chronograf_${CHRONOGRAF_VERSION}_amd64.deb && rm chronograf_${CHRONOGRAF_VERSION}_amd64.deb # Install Grafana RUN wget https://dl.grafana.com/oss/release/grafana_${GRAFANA_VERSION}_amd64.deb && \ dpkg -i grafana_${GRAFANA_VERSION}_amd64.deb && rm grafana_${GRAFANA_VERSION}_amd64.deb # Configure Grafana with provisioning ADD grafana/provisioning /etc/grafana/provisioning COPY grafana/grafana.ini /etc/grafana/grafana.ini RUN chmod 0777 /var/lib/grafana # Synology SNMP COPY synology/* /usr/share/snmp/mibs RUN chown root:root /usr/share/snmp/mibs RUN chmod 755 /usr/share/snmp/mibs # Install plugins #COPY rootfs /tmp #RUN /tmp/grafana-plugins.sh # EXPOSE 22/tcp 3003/tcp 8086/tcp 8888/tcp 8125/udp 514/udp #VOLUME /var/lib/influxdb /var/lib/grafana /var/lib/backups # Cleanup RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* /var/tmp/* CMD ["/usr/bin/supervisord"] ================================================ FILE: docker/README.md ================================================ # Synology NAS monitoring The main points of this project are: * Persistence is supported via mounting volumes to a Docker container. * Grafana will store its data in SQLite files instead of a MySQL. * Added snmp packages and Synology NAS MIBS. * Enable ## Run Docker image in your Synology 1. Install Docker from Synology package center 2. Create two empty folders in your Synology "influxdb" and "grafana", we need to use it later to mount it to our container. 3. Open Docker client from Synslogy > Image > Add > Add from url and paste Hub page url "https://hub.docker.com/r/alhazmy13/telegraf-influxdb-grafana" 4. Wait until it finishes downloading the image 5. Click on the image "alhazmy13/telegraf-influxdb-grafana" and then click on Lunch 6. Click on Advanced Settings and check "Enable auto-restart." 7. From the Volume tab, click Add folder and select the first folder that we created, "grafana" and on mount Path, paste "/var/lib/grafana" 8. From the Volume tab again, click Add Folder and select the second folder that we created "influxdb" and on mount Path paste "/var/lib/influxdb" 9. Network Tab keep it in bridge mode 10. Port settings, just change Local port for 3003 from Auto to 3003, and port 514 from Auto to 5144 11. Envirument Tab > Add new variable "TZ" with your local time zone **ignore this if you want to use the default UTC** 12. Apply, Next, Done and your container should be ready. ## Start Grafana 1. Open [http://YOUR_LOCAL_NAS_IP:3003](http://YOUR_LOCAL_NAS_IP:3003) and login with the default username "root" and password "root" 2. You need to import the dashboard. To do this, go to [http://YOUR_LOCAL_NAS_IP:3003/dashboard/import](http://YOUR_LOCAL_NAS_IP:3003/dashboard/import) and put "14590" in "Import via grafana.com" input 3. click on load and complete the process ## Enable Logging 1. Install Log center From Synslogy package center 2. Open Log center app 3. click on Log Sending > check "Send log to syslog server" 3. Set Server = "localhost", port = "5144", Protocol = "UDP", Format = "BSD (RFC 3164)" 4. For testing, click on "Send test log" 4. Apply ================================================ FILE: docker/bash/profile ================================================ # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n export HOME=/root ================================================ FILE: docker/grafana/grafana.ini ================================================ ##################### Grafana Configuration Example ##################### # # Everything has defaults so you only need to uncomment things you want to # change # possible values : production, development ;app_mode = production # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty ;instance_name = ${HOSTNAME} #################################### Paths #################################### [paths] # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) data = /var/lib/grafana # Temporary files in `data` directory older than given duration will be removed ;temp_data_lifetime = 24h # Directory where grafana can store logs logs = /var/log/grafana # Directory where grafana will automatically scan and look for plugins plugins = /var/lib/grafana/plugins # folder that contains provisioning config files that grafana will apply on startup and while running. provisioning = /etc/grafana/provisioning #################################### Server #################################### [server] # Protocol (http, https, h2, socket) protocol = http # The ip address to bind to, empty will bind to all interfaces ;http_addr = # The http port to use http_port = 3003 # The public facing domain name used to access grafana from a browser domain = localhost # Redirect to correct domain if host header does not match domain # Prevents DNS rebinding attacks ;enforce_domain = false # The full public facing url you use in browser, used for redirects and emails # If you use reverse proxy and sub path specify full url (with sub path) ;root_url = %(protocol)s://%(domain)s:%(http_port)s/ # Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. ;serve_from_sub_path = false # Log web requests ;router_logging = false # the path relative working path ;static_root_path = public # enable gzip ;enable_gzip = false # https certs & key file ;cert_file = ;cert_key = # Unix socket path ;socket = #################################### Database #################################### [database] # You can configure the database connection by specifying type, host, name, user and password # as separate properties or as on string using the url properties. # Either "mysql", "postgres" or "sqlite3", it's your choice type = sqlite3 host = 127.0.0.1:3306 name = grafana user = grafana # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" password = grafana # Use either URL or the previous fields to configure the database # Example: mysql://user:secret@host:port/database ;url = # For "postgres" only, either "disable", "require" or "verify-full" ;ssl_mode = disable ;ca_cert_path = ;client_key_path = ;client_cert_path = ;server_cert_name = # For "sqlite3" only, path relative to data_path setting ;path = grafana.db # Max idle conn setting default is 2 ;max_idle_conn = 2 # Max conn setting default is 0 (mean not set) ;max_open_conn = # Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) ;conn_max_lifetime = 14400 # Set to true to log the sql calls and execution times. ;log_queries = # For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared) ;cache_mode = private #################################### Cache server ############################# [remote_cache] # Either "redis", "memcached" or "database" default is "database" ;type = database # cache connectionstring options # database: will use Grafana primary database. # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=0,ssl=false`. Only addr is required. ssl may be 'true', 'false', or 'insecure'. # memcache: 127.0.0.1:11211 ;connstr = #################################### Data proxy ########################### [dataproxy] # This enables data proxy logging, default is false ;logging = false # How long the data proxy waits before timing out, default is 30 seconds. # This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set. ;timeout = 30 # How many seconds the data proxy waits before sending a keepalive probe request. ;keep_alive_seconds = 30 # How many seconds the data proxy waits for a successful TLS Handshake before timing out. ;tls_handshake_timeout_seconds = 10 # How many seconds the data proxy will wait for a server's first response headers after # fully writing the request headers if the request has an "Expect: 100-continue" # header. A value of 0 will result in the body being sent immediately, without # waiting for the server to approve. ;expect_continue_timeout_seconds = 1 # The maximum number of idle connections that Grafana will keep alive. ;max_idle_connections = 100 # How many seconds the data proxy keeps an idle connection open before timing out. ;idle_conn_timeout_seconds = 90 # If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. ;send_user_header = false #################################### Analytics #################################### [analytics] # Server reporting, sends usage counters to stats.grafana.org every 24 hours. # No ip addresses are being tracked, only simple counters to track # running instances, dashboard and error counts. It is very helpful to us. # Change this option to false to disable reporting. ;reporting_enabled = true # Set to false to disable all checks to https://grafana.net # for new versions (grafana itself and plugins), check is used # in some UI views to notify that grafana or plugin update exists # This option does not cause any auto updates, nor send any information # only a GET request to http://grafana.com to get latest versions ;check_for_updates = true # Google Analytics universal tracking code, only enabled if you specify an id here ;google_analytics_ua_id = # Google Tag Manager ID, only enabled if you specify an id here ;google_tag_manager_id = #################################### Security #################################### [security] # disable creation of admin user on first start of grafana ;disable_initial_admin_creation = false # default admin user, created on startup admin_user = root # default admin password, can be changed before first start of grafana, or in profile settings admin_password = root # used for signing ;secret_key = SW2YcwTIb9zpOOhoPsMm # disable gravatar profile images ;disable_gravatar = false # data source proxy whitelist (ip_or_domain:port separated by spaces) ;data_source_proxy_whitelist = # disable protection against brute force login attempts ;disable_brute_force_login_protection = false # set to true if you host Grafana behind HTTPS. default is false. ;cookie_secure = false # set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict", "none" and "disabled" ;cookie_samesite = lax # set to true if you want to allow browsers to render Grafana in a ,