├── cadvisor └── .env.example ├── node-exporter └── .env.example ├── prometheus ├── .env.example └── config │ └── prometheus.yml ├── .env.example ├── smartctl-exporter └── .env.example ├── dozzle ├── .env.example └── data │ └── users.yaml ├── dcgm-exporter └── .env.example ├── plex-prometheus-exporter └── .env.example ├── grafana ├── .env.example └── provisioning │ ├── dashboards │ ├── provider.yml │ ├── plex-streaming.json │ ├── storage.json │ ├── gpu.json │ ├── container.json │ ├── thermals.json │ └── plex.json │ └── datasources │ └── prometheus.yml ├── plex └── .env.example ├── .gitignore ├── LICENSE ├── README.md └── compose.yaml /cadvisor/.env.example: -------------------------------------------------------------------------------- 1 | # cAdvisor configuration 2 | TZ=America/Chicago -------------------------------------------------------------------------------- /node-exporter/.env.example: -------------------------------------------------------------------------------- 1 | # Node Exporter configuration 2 | TZ=America/Chicago -------------------------------------------------------------------------------- /prometheus/.env.example: -------------------------------------------------------------------------------- 1 | # Prometheus configuration 2 | TZ=America/Chicago 3 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | MEDIA_PATH=/path/to/your/media 2 | MEDIA_SERVER_PATH=/path/to/this/directory 3 | -------------------------------------------------------------------------------- /smartctl-exporter/.env.example: -------------------------------------------------------------------------------- 1 | # SmartCTL Exporter configuration 2 | TZ=America/Chicago 3 | -------------------------------------------------------------------------------- /dozzle/.env.example: -------------------------------------------------------------------------------- 1 | # Dozzle configuration 2 | TZ=America/Chicago 3 | DOZZLE_AUTH_PROVIDER=simple -------------------------------------------------------------------------------- /dcgm-exporter/.env.example: -------------------------------------------------------------------------------- 1 | # DCGM Exporter configuration 2 | TZ=America/Chicago 3 | NVIDIA_VISIBLE_DEVICES=all 4 | NVIDIA_DRIVER_CAPABILITIES=all 5 | -------------------------------------------------------------------------------- /plex-prometheus-exporter/.env.example: -------------------------------------------------------------------------------- 1 | # Plex Prometheus Exporter configuration 2 | TZ=America/Chicago 3 | PLEX_SERVER=http://plex:32400 4 | PLEX_TOKEN=your_plex_token_here 5 | 6 | -------------------------------------------------------------------------------- /grafana/.env.example: -------------------------------------------------------------------------------- 1 | # Grafana configuration 2 | TZ=America/Chicago 3 | GF_SECURITY_ADMIN_USER=admin 4 | GF_SECURITY_ADMIN_PASSWORD=changeme 5 | GF_SERVER_ROOT_URL=http://localhost:3000 6 | GF_USERS_ALLOW_SIGN_UP=false -------------------------------------------------------------------------------- /plex/.env.example: -------------------------------------------------------------------------------- 1 | # Plex configuration 2 | TZ=America/Chicago 3 | PLEX_CLAIM= 4 | NVIDIA_VISIBLE_DEVICES=all 5 | NVIDIA_DRIVER_CAPABILITIES=all 6 | PLEX_UID=1000 7 | PLEX_GID=1000 8 | CHANGE_CONFIG_DIR_OWNERSHIP=false 9 | -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/provider.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | providers: 3 | - name: default 4 | type: file 5 | options: 6 | path: /etc/grafana/provisioning/dashboards 7 | foldersFromFilesStructure: true 8 | -------------------------------------------------------------------------------- /grafana/provisioning/datasources/prometheus.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | datasources: 3 | - name: Prometheus 4 | type: prometheus 5 | access: proxy 6 | url: http://prometheus:9090 7 | isDefault: true 8 | jsonData: 9 | httpMethod: POST 10 | manageAlerts: false 11 | -------------------------------------------------------------------------------- /dozzle/data/users.yaml: -------------------------------------------------------------------------------- 1 | users: 2 | admin: 3 | email: admin@example.com 4 | name: admin 5 | # Generate with docker run -it --rm amir20/dozzle generate --name admin --email admin@example.com --password your_password_here admin 6 | password: your_password_hash_here 7 | filter: "" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Runtime data directories - these are mapped from outside the container 2 | prometheus/data/* 3 | grafana/data/* 4 | plex/config/* 5 | dozzle/data/admin/ 6 | 7 | # Environment files (should be created locally) 8 | */.env 9 | .env 10 | 11 | # Logs 12 | *.log 13 | 14 | # OS generated files 15 | .DS_Store 16 | .DS_Store? 17 | ._* 18 | .Spotlight-V100 19 | .Trashes 20 | ehthumbs.db 21 | Thumbs.db 22 | 23 | # IDE files 24 | .vscode/ 25 | .idea/ 26 | *.swp 27 | *.swo 28 | 29 | # Backup files 30 | *.bak 31 | *.tmp -------------------------------------------------------------------------------- /prometheus/config/prometheus.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | evaluation_interval: 15s 4 | external_labels: 5 | cluster: homelab 6 | 7 | scrape_configs: 8 | - job_name: prometheus 9 | static_configs: 10 | - targets: ["prometheus:9090"] 11 | 12 | - job_name: plex 13 | static_configs: 14 | - targets: ["prometheus-plex-exporter:9000"] 15 | 16 | - job_name: node 17 | static_configs: 18 | - targets: ["host.docker.internal:9100"] # using this because node_exporter is running in host network mode 19 | relabel_configs: 20 | - target_label: instance 21 | replacement: "node_exporter:9100" 22 | 23 | - job_name: dcgm 24 | static_configs: 25 | - targets: ["dcgm-exporter:9400"] 26 | 27 | - job_name: smartctl 28 | static_configs: 29 | - targets: ["smartctl-exporter:9633"] 30 | 31 | - job_name: cadvisor 32 | static_configs: 33 | - targets: ['cadvisor:8080'] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plex Monitoring Stack 2 | 3 | A comprehensive Docker Compose setup for a Plex media server with monitoring and management capabilities. 4 | 5 | ## Services 6 | 7 | - **Plex**: Media server with hardware transcoding support 8 | - **Prometheus**: Metrics collection and storage 9 | - **Grafana**: Visualization and dashboarding 10 | - **Dozzle**: Docker container log viewer 11 | - **Node Exporter**: System metrics exporter 12 | - **DCGM Exporter**: NVIDIA GPU metrics exporter 13 | - **SmartCTL Exporter**: Disk health metrics exporter 14 | - **cAdvisor**: Container metrics exporter 15 | - **Plex Prometheus Exporter**: Plex-specific metrics exporter 16 | 17 | ## Prerequisites 18 | 19 | - Docker and Docker Compose 20 | - NVIDIA GPU with Docker GPU support (for hardware transcoding) 21 | - Environment variables configured (see Setup section) 22 | 23 | ## Setup 24 | 25 | 1. Clone this repository 26 | 2. Copy the environment file templates and configure them: 27 | 28 | ```bash 29 | # Create environment files for each service 30 | cp plex/.env.example plex/.env 31 | cp prometheus/.env.example prometheus/.env 32 | cp grafana/.env.example grafana/.env 33 | # ... configure other .env files as needed 34 | ``` 35 | 36 | 3. Set the required environment variables in your shell or create a `.env` file in the root: 37 | 38 | ```bash 39 | export MEDIA_PATH="/path/to/your/media" 40 | export MEDIA_SERVER_PATH="/path/to/this/directory" 41 | ``` 42 | 43 | 4. Create the data directories that will be mounted: 44 | 45 | ```bash 46 | mkdir -p prometheus/data 47 | mkdir -p grafana/data 48 | mkdir -p plex/config 49 | mkdir -p dozzle/data 50 | ``` 51 | 52 | 5. Configure user permissions for data directories: 53 | 54 | ```bash 55 | sudo chown -R $(id -u):$(id -g) prometheus/data 56 | sudo chown -R $(id -u):$(id -g) grafana/data 57 | ``` 58 | 59 | 6. Start the services: 60 | 61 | ```bash 62 | docker compose up -d 63 | ``` 64 | 65 | ## Access Points 66 | 67 | - **Plex**: 68 | - **Grafana**: 69 | - **Prometheus**: 70 | - **Dozzle**: 71 | 72 | ## Configuration Files 73 | 74 | - `prometheus/config/prometheus.yml`: Prometheus configuration 75 | - `prometheus/config/rules/`: Prometheus alerting rules 76 | - `grafana/provisioning/`: Grafana datasources and dashboards 77 | - `dozzle/data/users.yaml`: Dozzle user authentication 78 | 79 | ## Dashboards 80 | 81 | This repository includes pre-configured Grafana dashboards for monitoring your Plex monitoring stack. For the most up-to-date Plex monitoring dashboards and additional configuration options, visit the [prometheus-plex-exporter repository](https://github.com/timothystewart6/prometheus-plex-exporter). 82 | 83 | ## Data Persistence 84 | 85 | The following directories contain persistent data and are mounted from the host: 86 | 87 | - `prometheus/data/`: Time series data 88 | - `grafana/data/`: Dashboards, users, and settings 89 | - `plex/config/`: Plex configuration and metadata 90 | - `dozzle/data/`: Log viewer configuration 91 | 92 | ## Notes 93 | 94 | - GPU support is configured for NVIDIA cards 95 | - Prometheus retains data for 30 days 96 | - All services are configured with security best practices (no-new-privileges) 97 | - Services are set to restart unless explicitly stopped 98 | - This stack provides comprehensive monitoring for Plex server performance, resource usage, and streaming analytics 99 | 100 | ## Further reading 101 | 102 | For a walk-through and explanation of the design and dashboards used by this stack, see the accompanying blog post: 103 | 104 | - ["Monitor your Plex Server like a Pro"](https://technotim.live/posts/monitor-your-plex-server-like-a-pro/) 105 | -------------------------------------------------------------------------------- /compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | plex: 3 | container_name: plex 4 | image: plexinc/pms-docker:plexpass 5 | pull_policy: always 6 | restart: unless-stopped 7 | env_file: 8 | - ./plex/.env 9 | gpus: all 10 | ports: 11 | - 32400:32400/tcp 12 | security_opt: 13 | - no-new-privileges:true 14 | tmpfs: 15 | - /transcode:size=8G 16 | volumes: 17 | - ${MEDIA_SERVER_PATH}/plex/config:/config 18 | - ${MEDIA_PATH}/movies:/movies:ro 19 | - ${MEDIA_PATH}/recorded_tv:/recorded_tv 20 | 21 | dozzle: 22 | container_name: dozzle 23 | image: amir20/dozzle:latest 24 | pull_policy: always 25 | restart: unless-stopped 26 | env_file: 27 | - ./dozzle/.env 28 | ports: 29 | - 8080:8080/tcp 30 | security_opt: 31 | - no-new-privileges:true 32 | secrets: 33 | - source: users 34 | target: /data/users.yaml 35 | volumes: 36 | - /var/run/docker.sock:/var/run/docker.sock 37 | - ${MEDIA_SERVER_PATH}/dozzle/data:/data 38 | 39 | prometheus-plex-exporter: 40 | container_name: prometheus-plex-exporter 41 | image: ghcr.io/timothystewart6/prometheus-plex-exporter:latest 42 | pull_policy: always 43 | restart: unless-stopped 44 | depends_on: 45 | - plex 46 | env_file: 47 | - ./plex-prometheus-exporter/.env 48 | # ports: 49 | # - 9000:9000/tcp 50 | security_opt: 51 | - no-new-privileges:true 52 | prometheus: 53 | image: prom/prometheus:latest 54 | container_name: prometheus 55 | pull_policy: always 56 | restart: unless-stopped 57 | extra_hosts: 58 | - "host.docker.internal:host-gateway" # Allows access to host network from container 59 | env_file: 60 | - ./prometheus/.env 61 | user: "1000:1000" 62 | ports: 63 | - 9090:9090/tcp 64 | security_opt: 65 | - no-new-privileges:true 66 | volumes: 67 | - ${MEDIA_SERVER_PATH}/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml:ro 68 | - ${MEDIA_SERVER_PATH}/prometheus/config/rules:/etc/prometheus/rules:ro 69 | - ${MEDIA_SERVER_PATH}/prometheus/data/:/prometheus 70 | 71 | command: 72 | - --config.file=/etc/prometheus/prometheus.yml 73 | - --storage.tsdb.path=/prometheus 74 | - --storage.tsdb.retention.time=30d 75 | - --web.enable-lifecycle 76 | - --web.enable-admin-api 77 | node_exporter: 78 | image: quay.io/prometheus/node-exporter:latest 79 | container_name: node_exporter 80 | pull_policy: always 81 | restart: unless-stopped 82 | network_mode: host 83 | env_file: 84 | - ./node-exporter/.env 85 | # ports: 86 | # - 9100:9100 87 | security_opt: 88 | - no-new-privileges:true 89 | command: 90 | - '--path.rootfs=/host' 91 | - '--path.procfs=/host/proc' 92 | - '--path.sysfs=/host/sys' 93 | - '--collector.cpu.info' 94 | pid: host 95 | volumes: 96 | - '/:/host:ro,rslave' 97 | dcgm-exporter: 98 | image: nvidia/dcgm-exporter:4.3.1-4.4.1-ubuntu22.04 99 | container_name: dcgm-exporter 100 | pull_policy: always 101 | restart: unless-stopped 102 | gpus: all 103 | cap_add: 104 | - SYS_ADMIN 105 | security_opt: 106 | - no-new-privileges:true 107 | env_file: 108 | - ./dcgm-exporter/.env 109 | # ports: 110 | # - "9400:9400" 111 | smartctl-exporter: 112 | image: quay.io/prometheuscommunity/smartctl-exporter:latest 113 | container_name: smartctl-exporter 114 | pull_policy: always 115 | restart: unless-stopped 116 | privileged: true 117 | user: root 118 | grafana: 119 | image: grafana/grafana:latest 120 | container_name: grafana 121 | pull_policy: always 122 | restart: unless-stopped 123 | depends_on: 124 | - prometheus 125 | env_file: 126 | - ./grafana/.env 127 | user: "1000:1000" 128 | ports: 129 | - 3000:3000/tcp 130 | security_opt: 131 | - no-new-privileges:true 132 | volumes: 133 | - ${MEDIA_SERVER_PATH}/grafana/data:/var/lib/grafana 134 | - ${MEDIA_SERVER_PATH}/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources 135 | - ${MEDIA_SERVER_PATH}/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards 136 | 137 | cadvisor: 138 | image: gcr.io/cadvisor/cadvisor:latest 139 | container_name: cadvisor 140 | pull_policy: always 141 | restart: unless-stopped 142 | env_file: 143 | - ./cadvisor/.env 144 | volumes: 145 | - /:/rootfs:ro 146 | - /var/run:/var/run:ro 147 | - /sys:/sys:ro 148 | - /var/lib/docker/:/var/lib/docker:ro 149 | - /dev/disk/:/dev/disk:ro 150 | 151 | secrets: 152 | users: 153 | file: ${MEDIA_SERVER_PATH}/dozzle/data/users.yaml -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/plex-streaming.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "editable": true, 19 | "fiscalYearStartMonth": 0, 20 | "graphTooltip": 0, 21 | "id": 20, 22 | "links": [], 23 | "panels": [ 24 | { 25 | "collapsed": false, 26 | "gridPos": { 27 | "h": 1, 28 | "w": 24, 29 | "x": 0, 30 | "y": 0 31 | }, 32 | "id": 1, 33 | "panels": [], 34 | "title": "Now", 35 | "type": "row" 36 | }, 37 | { 38 | "datasource": { 39 | "uid": "$datasource" 40 | }, 41 | "description": "Total number of streams", 42 | "fieldConfig": { 43 | "defaults": { 44 | "mappings": [], 45 | "thresholds": { 46 | "mode": "absolute", 47 | "steps": [ 48 | { 49 | "color": "green", 50 | "value": 0 51 | }, 52 | { 53 | "color": "red", 54 | "value": 1 55 | } 56 | ] 57 | }, 58 | "unit": "short" 59 | }, 60 | "overrides": [] 61 | }, 62 | "gridPos": { 63 | "h": 5, 64 | "w": 3, 65 | "x": 0, 66 | "y": 1 67 | }, 68 | "id": 2, 69 | "options": { 70 | "colorMode": "value", 71 | "graphMode": "none", 72 | "justifyMode": "auto", 73 | "orientation": "auto", 74 | "percentChangeColorMode": "standard", 75 | "reduceOptions": { 76 | "calcs": [ 77 | "last" 78 | ], 79 | "fields": "", 80 | "values": false 81 | }, 82 | "showPercentChange": false, 83 | "textMode": "auto", 84 | "wideLayout": true 85 | }, 86 | "pluginVersion": "12.2.0-17027759091", 87 | "targets": [ 88 | { 89 | "editorMode": "code", 90 | "expr": "count(\n sum by (session) (\n rate(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\", stream_type!=\"\"}[45s])\n ) > 0\n)", 91 | "range": true, 92 | "refId": "A" 93 | } 94 | ], 95 | "title": "Stream Count", 96 | "type": "stat" 97 | }, 98 | { 99 | "datasource": { 100 | "uid": "$datasource" 101 | }, 102 | "description": "Total number of streams that are transcoding video", 103 | "fieldConfig": { 104 | "defaults": { 105 | "mappings": [], 106 | "thresholds": { 107 | "mode": "absolute", 108 | "steps": [ 109 | { 110 | "color": "green", 111 | "value": 0 112 | }, 113 | { 114 | "color": "yellow", 115 | "value": 1 116 | } 117 | ] 118 | }, 119 | "unit": "short" 120 | }, 121 | "overrides": [] 122 | }, 123 | "gridPos": { 124 | "h": 5, 125 | "w": 3, 126 | "x": 3, 127 | "y": 1 128 | }, 129 | "id": 9, 130 | "options": { 131 | "colorMode": "value", 132 | "graphMode": "none", 133 | "justifyMode": "auto", 134 | "orientation": "auto", 135 | "percentChangeColorMode": "standard", 136 | "reduceOptions": { 137 | "calcs": [ 138 | "last" 139 | ], 140 | "fields": "", 141 | "values": false 142 | }, 143 | "showPercentChange": false, 144 | "textMode": "auto", 145 | "wideLayout": true 146 | }, 147 | "pluginVersion": "12.2.0-17027759091", 148 | "targets": [ 149 | { 150 | "editorMode": "code", 151 | "expr": "count(\n sum by (session) (\n rate(play_seconds_total{job=~\"$job\",instance=~\"$instance\",server=~\"$server\",stream_type=\"transcode\"}[45s])\n ) > 0\n)\n", 152 | "legendFormat": "__auto", 153 | "range": true, 154 | "refId": "A" 155 | } 156 | ], 157 | "title": "Video Transcodes", 158 | "type": "stat" 159 | }, 160 | { 161 | "datasource": { 162 | "uid": "$datasource" 163 | }, 164 | "description": "Total number of streams that are transcoding audio (work in progress)", 165 | "fieldConfig": { 166 | "defaults": { 167 | "mappings": [], 168 | "thresholds": { 169 | "mode": "absolute", 170 | "steps": [ 171 | { 172 | "color": "green", 173 | "value": 0 174 | }, 175 | { 176 | "color": "yellow", 177 | "value": 1 178 | } 179 | ] 180 | }, 181 | "unit": "short" 182 | }, 183 | "overrides": [] 184 | }, 185 | "gridPos": { 186 | "h": 5, 187 | "w": 3, 188 | "x": 6, 189 | "y": 1 190 | }, 191 | "id": 3, 192 | "options": { 193 | "colorMode": "value", 194 | "graphMode": "none", 195 | "justifyMode": "auto", 196 | "orientation": "auto", 197 | "percentChangeColorMode": "standard", 198 | "reduceOptions": { 199 | "calcs": [ 200 | "last" 201 | ], 202 | "fields": "", 203 | "values": false 204 | }, 205 | "showPercentChange": false, 206 | "textMode": "auto", 207 | "wideLayout": true 208 | }, 209 | "pluginVersion": "12.2.0-17027759091", 210 | "targets": [ 211 | { 212 | "editorMode": "code", 213 | "expr": "count(\n (\n label_replace(\n label_replace(\n label_replace(\n sum by (session) (\n rate(play_seconds_total{job=~\"$job\",instance=~\"$instance\",server=~\"$server\",stream_type=\"transcode\"}[45s])\n ) > 0,\n \"src\",\"4k\",\"stream_file_resolution\",\"4[Kk]\"\n ),\n \"src\",\"sd\",\"stream_file_resolution\",\"[Ss][Dd]\"\n ),\n \"src\",\"$1\",\"stream_file_resolution\",\".*?([0-9]+).*\"\n )\n )\n and on (session, src)\n (\n label_replace(\n label_replace(\n label_replace(\n sum by (session) (\n rate(play_seconds_total{job=~\"$job\",instance=~\"$instance\",server=~\"$server\",stream_type=\"transcode\"}[45s])\n ) > 0,\n \"src\",\"4k\",\"stream_resolution\",\"4[Kk]\"\n ),\n \"src\",\"sd\",\"stream_resolution\",\"[Ss][Dd]\"\n ),\n \"src\",\"$1\",\"stream_resolution\",\".*?([0-9]+).*\"\n )\n )\n)\n", 214 | "range": true, 215 | "refId": "A" 216 | } 217 | ], 218 | "title": "Audio Transcodes", 219 | "type": "stat" 220 | }, 221 | { 222 | "datasource": { 223 | "uid": "$datasource" 224 | }, 225 | "fieldConfig": { 226 | "defaults": { 227 | "mappings": [ 228 | { 229 | "options": { 230 | "0": { 231 | "color": "red", 232 | "text": "Down" 233 | }, 234 | "1": { 235 | "color": "green", 236 | "text": "Up" 237 | } 238 | }, 239 | "type": "value" 240 | } 241 | ], 242 | "thresholds": { 243 | "mode": "absolute", 244 | "steps": [ 245 | { 246 | "color": "red", 247 | "value": 0 248 | }, 249 | { 250 | "color": "green", 251 | "value": 1 252 | } 253 | ] 254 | } 255 | }, 256 | "overrides": [] 257 | }, 258 | "gridPos": { 259 | "h": 5, 260 | "w": 3, 261 | "x": 9, 262 | "y": 1 263 | }, 264 | "id": 4, 265 | "options": { 266 | "colorMode": "value", 267 | "graphMode": "none", 268 | "justifyMode": "auto", 269 | "orientation": "auto", 270 | "percentChangeColorMode": "standard", 271 | "reduceOptions": { 272 | "calcs": [ 273 | "last" 274 | ], 275 | "fields": "", 276 | "values": false 277 | }, 278 | "showPercentChange": false, 279 | "textMode": "auto", 280 | "wideLayout": true 281 | }, 282 | "pluginVersion": "12.2.0-17027759091", 283 | "targets": [ 284 | { 285 | "expr": "min_over_time( up{job=\"plex\", instance=~\"$instance\"}[2m] )", 286 | "refId": "A" 287 | } 288 | ], 289 | "title": "Status", 290 | "type": "stat" 291 | }, 292 | { 293 | "datasource": { 294 | "uid": "$datasource" 295 | }, 296 | "fieldConfig": { 297 | "defaults": { 298 | "mappings": [], 299 | "thresholds": { 300 | "mode": "absolute", 301 | "steps": [ 302 | { 303 | "color": "green", 304 | "value": 0 305 | }, 306 | { 307 | "color": "red", 308 | "value": 80 309 | } 310 | ] 311 | }, 312 | "unit": "s" 313 | }, 314 | "overrides": [] 315 | }, 316 | "gridPos": { 317 | "h": 5, 318 | "w": 5, 319 | "x": 12, 320 | "y": 1 321 | }, 322 | "id": 5, 323 | "options": { 324 | "colorMode": "value", 325 | "graphMode": "none", 326 | "justifyMode": "auto", 327 | "orientation": "auto", 328 | "percentChangeColorMode": "standard", 329 | "reduceOptions": { 330 | "calcs": [ 331 | "last" 332 | ], 333 | "fields": "", 334 | "values": false 335 | }, 336 | "showPercentChange": false, 337 | "textMode": "auto", 338 | "wideLayout": true 339 | }, 340 | "pluginVersion": "12.2.0-17027759091", 341 | "targets": [ 342 | { 343 | "expr": "time() - process_start_time_seconds{job=\"plex\", instance=~\"$instance\"}", 344 | "refId": "A" 345 | } 346 | ], 347 | "title": "Uptime", 348 | "type": "stat" 349 | }, 350 | { 351 | "collapsed": false, 352 | "gridPos": { 353 | "h": 1, 354 | "w": 24, 355 | "x": 0, 356 | "y": 6 357 | }, 358 | "id": 6, 359 | "panels": [], 360 | "title": "Availability & Uptime", 361 | "type": "row" 362 | }, 363 | { 364 | "datasource": { 365 | "uid": "$datasource" 366 | }, 367 | "fieldConfig": { 368 | "defaults": { 369 | "color": { 370 | "mode": "palette-classic" 371 | }, 372 | "custom": { 373 | "axisBorderShow": false, 374 | "axisCenteredZero": false, 375 | "axisColorMode": "text", 376 | "axisLabel": "", 377 | "axisPlacement": "auto", 378 | "barAlignment": 0, 379 | "barWidthFactor": 0.6, 380 | "drawStyle": "line", 381 | "fillOpacity": 33, 382 | "gradientMode": "opacity", 383 | "hideFrom": { 384 | "legend": false, 385 | "tooltip": false, 386 | "viz": false 387 | }, 388 | "insertNulls": false, 389 | "lineInterpolation": "linear", 390 | "lineStyle": { 391 | "fill": "solid" 392 | }, 393 | "lineWidth": 3, 394 | "pointSize": 5, 395 | "scaleDistribution": { 396 | "type": "linear" 397 | }, 398 | "showPoints": "auto", 399 | "spanNulls": false, 400 | "stacking": { 401 | "group": "A", 402 | "mode": "none" 403 | }, 404 | "thresholdsStyle": { 405 | "mode": "off" 406 | } 407 | }, 408 | "mappings": [], 409 | "thresholds": { 410 | "mode": "absolute", 411 | "steps": [ 412 | { 413 | "color": "green", 414 | "value": 0 415 | }, 416 | { 417 | "color": "red", 418 | "value": 80 419 | } 420 | ] 421 | }, 422 | "unit": "s" 423 | }, 424 | "overrides": [] 425 | }, 426 | "gridPos": { 427 | "h": 6, 428 | "w": 12, 429 | "x": 0, 430 | "y": 7 431 | }, 432 | "id": 8, 433 | "options": { 434 | "legend": { 435 | "calcs": [], 436 | "displayMode": "list", 437 | "placement": "bottom", 438 | "showLegend": false 439 | }, 440 | "tooltip": { 441 | "hideZeros": false, 442 | "mode": "single", 443 | "sort": "none" 444 | } 445 | }, 446 | "pluginVersion": "12.2.0-17027759091", 447 | "targets": [ 448 | { 449 | "expr": "time() - process_start_time_seconds{job=\"plex\", instance=~\"$instance\"}", 450 | "legendFormat": "{{instance}}", 451 | "refId": "A" 452 | } 453 | ], 454 | "title": "Uptime (time series)", 455 | "type": "timeseries" 456 | }, 457 | { 458 | "datasource": { 459 | "uid": "$datasource" 460 | }, 461 | "fieldConfig": { 462 | "defaults": { 463 | "color": { 464 | "mode": "palette-classic" 465 | }, 466 | "custom": { 467 | "axisBorderShow": false, 468 | "axisCenteredZero": false, 469 | "axisColorMode": "text", 470 | "axisLabel": "", 471 | "axisPlacement": "auto", 472 | "barAlignment": 0, 473 | "barWidthFactor": 0.6, 474 | "drawStyle": "line", 475 | "fillOpacity": 33, 476 | "gradientMode": "none", 477 | "hideFrom": { 478 | "legend": false, 479 | "tooltip": false, 480 | "viz": false 481 | }, 482 | "insertNulls": false, 483 | "lineInterpolation": "linear", 484 | "lineWidth": 3, 485 | "pointSize": 5, 486 | "scaleDistribution": { 487 | "type": "linear" 488 | }, 489 | "showPoints": "auto", 490 | "spanNulls": false, 491 | "stacking": { 492 | "group": "A", 493 | "mode": "none" 494 | }, 495 | "thresholdsStyle": { 496 | "mode": "off" 497 | } 498 | }, 499 | "mappings": [], 500 | "thresholds": { 501 | "mode": "absolute", 502 | "steps": [ 503 | { 504 | "color": "green", 505 | "value": 0 506 | }, 507 | { 508 | "color": "red", 509 | "value": 80 510 | } 511 | ] 512 | }, 513 | "unit": "percent" 514 | }, 515 | "overrides": [] 516 | }, 517 | "gridPos": { 518 | "h": 6, 519 | "w": 12, 520 | "x": 12, 521 | "y": 7 522 | }, 523 | "id": 7, 524 | "options": { 525 | "legend": { 526 | "calcs": [], 527 | "displayMode": "list", 528 | "placement": "bottom", 529 | "showLegend": false 530 | }, 531 | "tooltip": { 532 | "hideZeros": false, 533 | "mode": "single", 534 | "sort": "none" 535 | } 536 | }, 537 | "pluginVersion": "12.2.0-17027759091", 538 | "targets": [ 539 | { 540 | "expr": "100 * avg_over_time( up{job=\"plex\", instance=~\"$instance\"}[5m] )", 541 | "legendFormat": "{{instance}}", 542 | "refId": "A" 543 | } 544 | ], 545 | "title": "Availability (rolling % up)", 546 | "type": "timeseries" 547 | } 548 | ], 549 | "preload": false, 550 | "refresh": "10s", 551 | "schemaVersion": 41, 552 | "tags": [], 553 | "templating": { 554 | "list": [ 555 | { 556 | "current": { 557 | "text": "Prometheus", 558 | "value": "Prometheus" 559 | }, 560 | "label": "Data Source", 561 | "name": "datasource", 562 | "query": "prometheus", 563 | "refresh": 1, 564 | "type": "datasource" 565 | }, 566 | { 567 | "allValue": ".+", 568 | "datasource": { 569 | "type": "prometheus", 570 | "uid": "$datasource" 571 | }, 572 | "includeAll": true, 573 | "label": "job", 574 | "name": "job", 575 | "query": "label_values(play_seconds_total, job)", 576 | "refresh": 1, 577 | "sort": 1, 578 | "type": "query" 579 | }, 580 | { 581 | "allValue": ".+", 582 | "datasource": { 583 | "type": "prometheus", 584 | "uid": "$datasource" 585 | }, 586 | "includeAll": true, 587 | "label": "instance", 588 | "name": "instance", 589 | "query": "label_values(up{job=~\"$job\"}, instance)", 590 | "refresh": 1, 591 | "sort": 1, 592 | "type": "query" 593 | }, 594 | { 595 | "allValue": ".+", 596 | "datasource": { 597 | "type": "prometheus", 598 | "uid": "$datasource" 599 | }, 600 | "includeAll": true, 601 | "label": "server", 602 | "name": "server", 603 | "query": "label_values(play_seconds_total{job=~\"$job\", instance=~\"$instance\"}, server)", 604 | "refresh": 1, 605 | "type": "query" 606 | } 607 | ] 608 | }, 609 | "time": { 610 | "from": "now-24h", 611 | "to": "now" 612 | }, 613 | "timepicker": {}, 614 | "timezone": "browser", 615 | "title": "Plex Streaming Dashboard", 616 | "uid": "2e5dc2d8-cd64-4800-b6af-66a1ca75a3a9", 617 | "version": 1 618 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/storage.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "description": "prometheus-community\r\n/\r\nsmartctl_exporter\r\n", 19 | "editable": true, 20 | "fiscalYearStartMonth": 0, 21 | "graphTooltip": 0, 22 | "id": 3, 23 | "links": [], 24 | "panels": [ 25 | { 26 | "collapsed": false, 27 | "gridPos": { 28 | "h": 1, 29 | "w": 24, 30 | "x": 0, 31 | "y": 0 32 | }, 33 | "id": 7, 34 | "panels": [], 35 | "title": "SMART General", 36 | "type": "row" 37 | }, 38 | { 39 | "datasource": "${DS_PROMETHEUS}", 40 | "fieldConfig": { 41 | "defaults": { 42 | "color": { 43 | "mode": "palette-classic" 44 | }, 45 | "custom": { 46 | "axisBorderShow": false, 47 | "axisCenteredZero": false, 48 | "axisColorMode": "text", 49 | "axisLabel": "", 50 | "axisPlacement": "auto", 51 | "barAlignment": 0, 52 | "barWidthFactor": 0.6, 53 | "drawStyle": "line", 54 | "fillOpacity": 0, 55 | "gradientMode": "none", 56 | "hideFrom": { 57 | "legend": false, 58 | "tooltip": false, 59 | "viz": false 60 | }, 61 | "insertNulls": false, 62 | "lineInterpolation": "linear", 63 | "lineStyle": { 64 | "fill": "solid" 65 | }, 66 | "lineWidth": 1, 67 | "pointSize": 5, 68 | "scaleDistribution": { 69 | "type": "linear" 70 | }, 71 | "showPoints": "auto", 72 | "spanNulls": false, 73 | "stacking": { 74 | "group": "A", 75 | "mode": "none" 76 | }, 77 | "thresholdsStyle": { 78 | "mode": "dashed" 79 | } 80 | }, 81 | "mappings": [], 82 | "max": 100, 83 | "min": 0, 84 | "thresholds": { 85 | "mode": "absolute", 86 | "steps": [ 87 | { 88 | "color": "green", 89 | "value": 0 90 | }, 91 | { 92 | "color": "#EAB839", 93 | "value": 60 94 | }, 95 | { 96 | "color": "red", 97 | "value": 80 98 | } 99 | ] 100 | }, 101 | "unit": "celsius" 102 | }, 103 | "overrides": [] 104 | }, 105 | "gridPos": { 106 | "h": 8, 107 | "w": 12, 108 | "x": 0, 109 | "y": 1 110 | }, 111 | "id": 10, 112 | "options": { 113 | "legend": { 114 | "calcs": [], 115 | "displayMode": "list", 116 | "placement": "right", 117 | "showLegend": true 118 | }, 119 | "tooltip": { 120 | "hideZeros": false, 121 | "mode": "single", 122 | "sort": "none" 123 | } 124 | }, 125 | "pluginVersion": "12.2.0-17027759091", 126 | "targets": [ 127 | { 128 | "datasource": "${DS_PROMETHEUS}", 129 | "disableTextWrap": false, 130 | "editorMode": "builder", 131 | "expr": "smartctl_device_temperature{instance=~\"$instance\", device=~\"$device\"}", 132 | "fullMetaSearch": false, 133 | "includeNullMetadata": true, 134 | "instant": false, 135 | "legendFormat": "{{device}}", 136 | "range": true, 137 | "refId": "A", 138 | "useBackend": false 139 | } 140 | ], 141 | "title": "Temperature", 142 | "type": "timeseries" 143 | }, 144 | { 145 | "datasource": "${DS_PROMETHEUS}", 146 | "fieldConfig": { 147 | "defaults": { 148 | "color": { 149 | "mode": "thresholds" 150 | }, 151 | "decimals": 0, 152 | "mappings": [ 153 | { 154 | "options": { 155 | "0": { 156 | "color": "dark-red", 157 | "index": 1, 158 | "text": "Bad" 159 | }, 160 | "1": { 161 | "color": "dark-green", 162 | "index": 0, 163 | "text": "Good" 164 | } 165 | }, 166 | "type": "value" 167 | } 168 | ], 169 | "max": 1, 170 | "min": 0, 171 | "thresholds": { 172 | "mode": "absolute", 173 | "steps": [ 174 | { 175 | "color": "green", 176 | "value": 0 177 | }, 178 | { 179 | "color": "dark-red", 180 | "value": 0 181 | } 182 | ] 183 | }, 184 | "unit": "bool" 185 | }, 186 | "overrides": [] 187 | }, 188 | "gridPos": { 189 | "h": 4, 190 | "w": 12, 191 | "x": 12, 192 | "y": 1 193 | }, 194 | "id": 5, 195 | "options": { 196 | "colorMode": "value", 197 | "graphMode": "none", 198 | "justifyMode": "center", 199 | "orientation": "vertical", 200 | "percentChangeColorMode": "standard", 201 | "reduceOptions": { 202 | "calcs": [ 203 | "lastNotNull" 204 | ], 205 | "fields": "", 206 | "values": false 207 | }, 208 | "showPercentChange": false, 209 | "textMode": "auto", 210 | "wideLayout": true 211 | }, 212 | "pluginVersion": "12.2.0-17027759091", 213 | "targets": [ 214 | { 215 | "datasource": "${DS_PROMETHEUS}", 216 | "disableTextWrap": false, 217 | "editorMode": "builder", 218 | "expr": "smartctl_device_smart_status{instance=~\"$instance\", device=~\"$device\"}", 219 | "fullMetaSearch": false, 220 | "includeNullMetadata": true, 221 | "instant": false, 222 | "legendFormat": "{{device}}", 223 | "range": true, 224 | "refId": "A", 225 | "useBackend": false 226 | } 227 | ], 228 | "title": "SMART STATUS", 229 | "type": "stat" 230 | }, 231 | { 232 | "datasource": "${DS_PROMETHEUS}", 233 | "fieldConfig": { 234 | "defaults": { 235 | "color": { 236 | "mode": "thresholds" 237 | }, 238 | "mappings": [ 239 | { 240 | "options": { 241 | "0": { 242 | "color": "dark-green", 243 | "index": 0, 244 | "text": "None" 245 | } 246 | }, 247 | "type": "value" 248 | }, 249 | { 250 | "options": { 251 | "from": 1, 252 | "result": { 253 | "color": "dark-red", 254 | "index": 1, 255 | "text": "Bad" 256 | } 257 | }, 258 | "type": "range" 259 | } 260 | ], 261 | "thresholds": { 262 | "mode": "absolute", 263 | "steps": [ 264 | { 265 | "color": "green", 266 | "value": 0 267 | } 268 | ] 269 | } 270 | }, 271 | "overrides": [] 272 | }, 273 | "gridPos": { 274 | "h": 4, 275 | "w": 12, 276 | "x": 12, 277 | "y": 5 278 | }, 279 | "id": 3, 280 | "options": { 281 | "colorMode": "value", 282 | "graphMode": "none", 283 | "justifyMode": "auto", 284 | "orientation": "auto", 285 | "percentChangeColorMode": "standard", 286 | "reduceOptions": { 287 | "calcs": [ 288 | "lastNotNull" 289 | ], 290 | "fields": "", 291 | "values": false 292 | }, 293 | "showPercentChange": false, 294 | "textMode": "auto", 295 | "wideLayout": true 296 | }, 297 | "pluginVersion": "12.2.0-17027759091", 298 | "targets": [ 299 | { 300 | "datasource": "${DS_PROMETHEUS}", 301 | "disableTextWrap": false, 302 | "editorMode": "builder", 303 | "expr": "smartctl_device_critical_warning{instance=~\"$instance\", device=~\"$device\"}", 304 | "fullMetaSearch": false, 305 | "includeNullMetadata": true, 306 | "instant": false, 307 | "legendFormat": "{{device}}", 308 | "range": true, 309 | "refId": "A", 310 | "useBackend": false 311 | } 312 | ], 313 | "title": "Device Critical Warning", 314 | "type": "stat" 315 | }, 316 | { 317 | "datasource": "${DS_PROMETHEUS}", 318 | "fieldConfig": { 319 | "defaults": { 320 | "color": { 321 | "mode": "fixed" 322 | }, 323 | "decimals": 1, 324 | "mappings": [], 325 | "thresholds": { 326 | "mode": "absolute", 327 | "steps": [ 328 | { 329 | "color": "green", 330 | "value": 0 331 | } 332 | ] 333 | }, 334 | "unit": "s" 335 | }, 336 | "overrides": [] 337 | }, 338 | "gridPos": { 339 | "h": 4, 340 | "w": 12, 341 | "x": 0, 342 | "y": 9 343 | }, 344 | "id": 1, 345 | "options": { 346 | "colorMode": "value", 347 | "graphMode": "none", 348 | "justifyMode": "auto", 349 | "orientation": "vertical", 350 | "percentChangeColorMode": "standard", 351 | "reduceOptions": { 352 | "calcs": [ 353 | "lastNotNull" 354 | ], 355 | "fields": "", 356 | "values": false 357 | }, 358 | "showPercentChange": false, 359 | "textMode": "value_and_name", 360 | "wideLayout": true 361 | }, 362 | "pluginVersion": "12.2.0-17027759091", 363 | "targets": [ 364 | { 365 | "datasource": "${DS_PROMETHEUS}", 366 | "disableTextWrap": false, 367 | "editorMode": "builder", 368 | "exemplar": false, 369 | "expr": "smartctl_device_power_on_seconds{instance=~\"$instance\", device=~\"$device\"}", 370 | "format": "time_series", 371 | "fullMetaSearch": false, 372 | "includeNullMetadata": true, 373 | "instant": false, 374 | "interval": "", 375 | "legendFormat": "{{device}}", 376 | "range": true, 377 | "refId": "A", 378 | "useBackend": false 379 | } 380 | ], 381 | "title": "Power on Time", 382 | "type": "stat" 383 | }, 384 | { 385 | "datasource": "${DS_PROMETHEUS}", 386 | "fieldConfig": { 387 | "defaults": { 388 | "color": { 389 | "mode": "thresholds" 390 | }, 391 | "mappings": [ 392 | { 393 | "options": { 394 | "0": { 395 | "index": 0, 396 | "text": "None" 397 | } 398 | }, 399 | "type": "value" 400 | } 401 | ], 402 | "thresholds": { 403 | "mode": "absolute", 404 | "steps": [ 405 | { 406 | "color": "dark-green", 407 | "value": 0 408 | }, 409 | { 410 | "color": "dark-red", 411 | "value": 1 412 | } 413 | ] 414 | }, 415 | "unit": "none" 416 | }, 417 | "overrides": [] 418 | }, 419 | "gridPos": { 420 | "h": 4, 421 | "w": 12, 422 | "x": 12, 423 | "y": 9 424 | }, 425 | "id": 11, 426 | "options": { 427 | "colorMode": "value", 428 | "graphMode": "none", 429 | "justifyMode": "auto", 430 | "orientation": "auto", 431 | "percentChangeColorMode": "standard", 432 | "reduceOptions": { 433 | "calcs": [ 434 | "lastNotNull" 435 | ], 436 | "fields": "", 437 | "values": false 438 | }, 439 | "showPercentChange": false, 440 | "text": { 441 | "valueSize": 50 442 | }, 443 | "textMode": "auto", 444 | "wideLayout": true 445 | }, 446 | "pluginVersion": "12.2.0-17027759091", 447 | "targets": [ 448 | { 449 | "datasource": "${DS_PROMETHEUS}", 450 | "disableTextWrap": false, 451 | "editorMode": "builder", 452 | "expr": "smartctl_device_media_errors{instance=~\"$instance\", device=~\"$device\"}", 453 | "fullMetaSearch": false, 454 | "includeNullMetadata": true, 455 | "instant": false, 456 | "legendFormat": "{{device}}", 457 | "range": true, 458 | "refId": "A", 459 | "useBackend": false 460 | } 461 | ], 462 | "title": "Device Media Error", 463 | "type": "stat" 464 | }, 465 | { 466 | "datasource": "${DS_PROMETHEUS}", 467 | "fieldConfig": { 468 | "defaults": { 469 | "color": { 470 | "mode": "fixed" 471 | }, 472 | "mappings": [], 473 | "thresholds": { 474 | "mode": "absolute", 475 | "steps": [ 476 | { 477 | "color": "green", 478 | "value": 0 479 | } 480 | ] 481 | }, 482 | "unit": "none" 483 | }, 484 | "overrides": [] 485 | }, 486 | "gridPos": { 487 | "h": 4, 488 | "w": 12, 489 | "x": 0, 490 | "y": 13 491 | }, 492 | "id": 8, 493 | "options": { 494 | "colorMode": "value", 495 | "graphMode": "none", 496 | "justifyMode": "auto", 497 | "orientation": "auto", 498 | "percentChangeColorMode": "standard", 499 | "reduceOptions": { 500 | "calcs": [ 501 | "lastNotNull" 502 | ], 503 | "fields": "", 504 | "values": false 505 | }, 506 | "showPercentChange": false, 507 | "textMode": "auto", 508 | "wideLayout": true 509 | }, 510 | "pluginVersion": "12.2.0-17027759091", 511 | "targets": [ 512 | { 513 | "datasource": "${DS_PROMETHEUS}", 514 | "disableTextWrap": false, 515 | "editorMode": "builder", 516 | "expr": "smartctl_device_power_cycle_count{instance=~\"$instance\", device=~\"$device\"}", 517 | "fullMetaSearch": false, 518 | "includeNullMetadata": true, 519 | "instant": false, 520 | "legendFormat": "{{device}}", 521 | "range": true, 522 | "refId": "A", 523 | "useBackend": false 524 | } 525 | ], 526 | "title": "Power Cycle", 527 | "type": "stat" 528 | }, 529 | { 530 | "collapsed": false, 531 | "gridPos": { 532 | "h": 1, 533 | "w": 24, 534 | "x": 0, 535 | "y": 17 536 | }, 537 | "id": 6, 538 | "panels": [], 539 | "title": "NVME Info", 540 | "type": "row" 541 | }, 542 | { 543 | "datasource": "${DS_PROMETHEUS}", 544 | "fieldConfig": { 545 | "defaults": { 546 | "color": { 547 | "mode": "palette-classic" 548 | }, 549 | "custom": { 550 | "axisBorderShow": false, 551 | "axisCenteredZero": false, 552 | "axisColorMode": "text", 553 | "axisLabel": "", 554 | "axisPlacement": "auto", 555 | "barAlignment": 0, 556 | "barWidthFactor": 0.6, 557 | "drawStyle": "line", 558 | "fillOpacity": 0, 559 | "gradientMode": "none", 560 | "hideFrom": { 561 | "legend": false, 562 | "tooltip": false, 563 | "viz": false 564 | }, 565 | "insertNulls": false, 566 | "lineInterpolation": "linear", 567 | "lineStyle": { 568 | "fill": "solid" 569 | }, 570 | "lineWidth": 1, 571 | "pointSize": 5, 572 | "scaleDistribution": { 573 | "type": "linear" 574 | }, 575 | "showPoints": "auto", 576 | "spanNulls": false, 577 | "stacking": { 578 | "group": "A", 579 | "mode": "none" 580 | }, 581 | "thresholdsStyle": { 582 | "mode": "off" 583 | } 584 | }, 585 | "mappings": [], 586 | "thresholds": { 587 | "mode": "absolute", 588 | "steps": [ 589 | { 590 | "color": "green", 591 | "value": 0 592 | }, 593 | { 594 | "color": "red", 595 | "value": 80 596 | } 597 | ] 598 | }, 599 | "unit": "Bps" 600 | }, 601 | "overrides": [] 602 | }, 603 | "gridPos": { 604 | "h": 8, 605 | "w": 12, 606 | "x": 0, 607 | "y": 18 608 | }, 609 | "id": 4, 610 | "options": { 611 | "legend": { 612 | "calcs": [], 613 | "displayMode": "list", 614 | "placement": "bottom", 615 | "showLegend": true 616 | }, 617 | "tooltip": { 618 | "hideZeros": false, 619 | "mode": "single", 620 | "sort": "asc" 621 | } 622 | }, 623 | "pluginVersion": "12.2.0-17027759091", 624 | "targets": [ 625 | { 626 | "datasource": "${DS_PROMETHEUS}", 627 | "disableTextWrap": false, 628 | "editorMode": "builder", 629 | "expr": "rate(smartctl_device_bytes_written{instance=~\"$instance\", device=~\"$device\"}[$__rate_interval])", 630 | "fullMetaSearch": false, 631 | "includeNullMetadata": true, 632 | "instant": false, 633 | "legendFormat": "{{device}}", 634 | "range": true, 635 | "refId": "A", 636 | "useBackend": false 637 | } 638 | ], 639 | "title": "Device Data Written (rate)", 640 | "type": "timeseries" 641 | }, 642 | { 643 | "datasource": "${DS_PROMETHEUS}", 644 | "fieldConfig": { 645 | "defaults": { 646 | "color": { 647 | "mode": "continuous-RdYlGr" 648 | }, 649 | "mappings": [], 650 | "max": 100, 651 | "min": 0, 652 | "thresholds": { 653 | "mode": "absolute", 654 | "steps": [ 655 | { 656 | "color": "green", 657 | "value": 0 658 | }, 659 | { 660 | "color": "red", 661 | "value": 20 662 | }, 663 | { 664 | "color": "#EAB839", 665 | "value": 50 666 | } 667 | ] 668 | }, 669 | "unit": "percent" 670 | }, 671 | "overrides": [] 672 | }, 673 | "gridPos": { 674 | "h": 8, 675 | "w": 12, 676 | "x": 12, 677 | "y": 18 678 | }, 679 | "id": 2, 680 | "options": { 681 | "minVizHeight": 200, 682 | "minVizWidth": 200, 683 | "orientation": "auto", 684 | "reduceOptions": { 685 | "calcs": [ 686 | "lastNotNull" 687 | ], 688 | "fields": "", 689 | "values": false 690 | }, 691 | "showThresholdLabels": false, 692 | "showThresholdMarkers": true, 693 | "sizing": "auto" 694 | }, 695 | "pluginVersion": "12.2.0-17027759091", 696 | "targets": [ 697 | { 698 | "datasource": "${DS_PROMETHEUS}", 699 | "disableTextWrap": false, 700 | "editorMode": "builder", 701 | "expr": "smartctl_device_available_spare{instance=~\"$instance\", device=~\"$device\"}", 702 | "fullMetaSearch": false, 703 | "includeNullMetadata": true, 704 | "instant": false, 705 | "legendFormat": "{{device}}", 706 | "range": true, 707 | "refId": "A", 708 | "useBackend": false 709 | } 710 | ], 711 | "title": "Available Spare on NVME", 712 | "type": "gauge" 713 | } 714 | ], 715 | "preload": false, 716 | "refresh": "auto", 717 | "schemaVersion": 41, 718 | "tags": [], 719 | "templating": { 720 | "list": [ 721 | { 722 | "current": { 723 | "text": "Prometheus", 724 | "value": "PBFA97CFB590B2093" 725 | }, 726 | "label": "Data source", 727 | "name": "DS_PROMETHEUS", 728 | "options": [], 729 | "query": "prometheus", 730 | "refresh": 1, 731 | "type": "datasource" 732 | }, 733 | { 734 | "allValue": ".*", 735 | "current": { 736 | "text": "All", 737 | "value": "$__all" 738 | }, 739 | "datasource": "${DS_PROMETHEUS}", 740 | "definition": "label_values(smartctl_device, instance)", 741 | "includeAll": true, 742 | "label": "Instance", 743 | "multi": true, 744 | "name": "instance", 745 | "options": [], 746 | "query": { 747 | "query": "label_values(smartctl_device, instance)", 748 | "refId": "PromVar1" 749 | }, 750 | "refresh": 2, 751 | "type": "query" 752 | }, 753 | { 754 | "allValue": ".*", 755 | "current": { 756 | "text": "All", 757 | "value": "$__all" 758 | }, 759 | "datasource": "${DS_PROMETHEUS}", 760 | "definition": "label_values(smartctl_device{instance=~\"$instance\"}, device)", 761 | "includeAll": true, 762 | "label": "Device", 763 | "multi": true, 764 | "name": "device", 765 | "options": [], 766 | "query": { 767 | "query": "label_values(smartctl_device{instance=~\"$instance\"}, device)", 768 | "refId": "PromVar2" 769 | }, 770 | "refresh": 2, 771 | "type": "query" 772 | } 773 | ] 774 | }, 775 | "time": { 776 | "from": "now-6h", 777 | "to": "now" 778 | }, 779 | "timepicker": {}, 780 | "timezone": "", 781 | "title": "Storage Dashboard", 782 | "uid": "f8f249a0-be78-41b1-97fe-8d0a92a71b93", 783 | "version": 7 784 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/gpu.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "$$hashKey": "object:192", 6 | "builtIn": 1, 7 | "datasource": { 8 | "type": "datasource", 9 | "uid": "grafana" 10 | }, 11 | "enable": true, 12 | "hide": true, 13 | "iconColor": "rgba(0, 211, 255, 1)", 14 | "name": "Annotations & Alerts", 15 | "type": "dashboard" 16 | } 17 | ] 18 | }, 19 | "description": "This dashboard is to display the metrics from DCGM Exporter on a host or Kubernetes cluster", 20 | "editable": true, 21 | "fiscalYearStartMonth": 0, 22 | "graphTooltip": 0, 23 | "id": 12, 24 | "links": [], 25 | "panels": [ 26 | { 27 | "datasource": { 28 | "uid": "$datasource" 29 | }, 30 | "fieldConfig": { 31 | "defaults": { 32 | "color": { 33 | "mode": "palette-classic" 34 | }, 35 | "custom": { 36 | "axisBorderShow": false, 37 | "axisCenteredZero": false, 38 | "axisColorMode": "text", 39 | "axisLabel": "", 40 | "axisPlacement": "auto", 41 | "barAlignment": 0, 42 | "barWidthFactor": 0.6, 43 | "drawStyle": "line", 44 | "fillOpacity": 10, 45 | "gradientMode": "none", 46 | "hideFrom": { 47 | "legend": false, 48 | "tooltip": false, 49 | "viz": false 50 | }, 51 | "insertNulls": false, 52 | "lineInterpolation": "linear", 53 | "lineWidth": 2, 54 | "pointSize": 5, 55 | "scaleDistribution": { 56 | "type": "linear" 57 | }, 58 | "showPoints": "never", 59 | "spanNulls": false, 60 | "stacking": { 61 | "group": "A", 62 | "mode": "none" 63 | }, 64 | "thresholdsStyle": { 65 | "mode": "off" 66 | } 67 | }, 68 | "mappings": [], 69 | "thresholds": { 70 | "mode": "absolute", 71 | "steps": [ 72 | { 73 | "color": "green", 74 | "value": 0 75 | }, 76 | { 77 | "color": "red", 78 | "value": 80 79 | } 80 | ] 81 | }, 82 | "unit": "celsius" 83 | }, 84 | "overrides": [] 85 | }, 86 | "gridPos": { 87 | "h": 8, 88 | "w": 18, 89 | "x": 0, 90 | "y": 0 91 | }, 92 | "id": 12, 93 | "options": { 94 | "dataLinks": [], 95 | "legend": { 96 | "calcs": [ 97 | "mean", 98 | "lastNotNull", 99 | "max" 100 | ], 101 | "displayMode": "table", 102 | "placement": "right", 103 | "showLegend": true 104 | }, 105 | "tooltip": { 106 | "hideZeros": false, 107 | "mode": "multi", 108 | "sort": "none" 109 | } 110 | }, 111 | "pluginVersion": "12.2.0-17027759091", 112 | "targets": [ 113 | { 114 | "datasource": { 115 | "uid": "$datasource" 116 | }, 117 | "expr": "DCGM_FI_DEV_GPU_TEMP{instance=~\"$instance\", gpu=~\"$gpu\"}", 118 | "instant": false, 119 | "interval": "", 120 | "legendFormat": "GPU {{gpu}}", 121 | "refId": "A" 122 | } 123 | ], 124 | "title": "GPU Temperature", 125 | "type": "timeseries" 126 | }, 127 | { 128 | "datasource": { 129 | "uid": "$datasource" 130 | }, 131 | "fieldConfig": { 132 | "defaults": { 133 | "color": { 134 | "mode": "thresholds" 135 | }, 136 | "mappings": [], 137 | "max": 100, 138 | "min": 0, 139 | "thresholds": { 140 | "mode": "absolute", 141 | "steps": [ 142 | { 143 | "color": "green", 144 | "value": 0 145 | }, 146 | { 147 | "color": "#EAB839", 148 | "value": 83 149 | }, 150 | { 151 | "color": "red", 152 | "value": 87 153 | } 154 | ] 155 | }, 156 | "unit": "celsius" 157 | }, 158 | "overrides": [] 159 | }, 160 | "gridPos": { 161 | "h": 8, 162 | "w": 6, 163 | "x": 18, 164 | "y": 0 165 | }, 166 | "id": 14, 167 | "options": { 168 | "minVizHeight": 75, 169 | "minVizWidth": 75, 170 | "orientation": "auto", 171 | "reduceOptions": { 172 | "calcs": [ 173 | "mean" 174 | ], 175 | "fields": "", 176 | "values": false 177 | }, 178 | "showThresholdLabels": false, 179 | "showThresholdMarkers": true, 180 | "sizing": "auto" 181 | }, 182 | "pluginVersion": "12.2.0-17027759091", 183 | "targets": [ 184 | { 185 | "datasource": { 186 | "uid": "$datasource" 187 | }, 188 | "expr": "avg(DCGM_FI_DEV_GPU_TEMP{instance=~\"$instance\", gpu=~\"$gpu\"})", 189 | "interval": "", 190 | "legendFormat": "", 191 | "refId": "A" 192 | } 193 | ], 194 | "title": "GPU Avg. Temp", 195 | "type": "gauge" 196 | }, 197 | { 198 | "datasource": { 199 | "uid": "$datasource" 200 | }, 201 | "fieldConfig": { 202 | "defaults": { 203 | "color": { 204 | "mode": "palette-classic" 205 | }, 206 | "custom": { 207 | "axisBorderShow": false, 208 | "axisCenteredZero": false, 209 | "axisColorMode": "text", 210 | "axisLabel": "", 211 | "axisPlacement": "auto", 212 | "barAlignment": 0, 213 | "barWidthFactor": 0.6, 214 | "drawStyle": "line", 215 | "fillOpacity": 10, 216 | "gradientMode": "none", 217 | "hideFrom": { 218 | "legend": false, 219 | "tooltip": false, 220 | "viz": false 221 | }, 222 | "insertNulls": false, 223 | "lineInterpolation": "linear", 224 | "lineWidth": 2, 225 | "pointSize": 5, 226 | "scaleDistribution": { 227 | "type": "linear" 228 | }, 229 | "showPoints": "never", 230 | "spanNulls": false, 231 | "stacking": { 232 | "group": "A", 233 | "mode": "none" 234 | }, 235 | "thresholdsStyle": { 236 | "mode": "off" 237 | } 238 | }, 239 | "mappings": [], 240 | "thresholds": { 241 | "mode": "absolute", 242 | "steps": [ 243 | { 244 | "color": "green", 245 | "value": 0 246 | }, 247 | { 248 | "color": "red", 249 | "value": 80 250 | } 251 | ] 252 | }, 253 | "unit": "watt" 254 | }, 255 | "overrides": [] 256 | }, 257 | "gridPos": { 258 | "h": 8, 259 | "w": 18, 260 | "x": 0, 261 | "y": 8 262 | }, 263 | "id": 10, 264 | "options": { 265 | "dataLinks": [], 266 | "legend": { 267 | "calcs": [ 268 | "mean", 269 | "lastNotNull", 270 | "max" 271 | ], 272 | "displayMode": "table", 273 | "placement": "right", 274 | "showLegend": true 275 | }, 276 | "tooltip": { 277 | "hideZeros": false, 278 | "mode": "multi", 279 | "sort": "none" 280 | } 281 | }, 282 | "pluginVersion": "12.2.0-17027759091", 283 | "targets": [ 284 | { 285 | "datasource": { 286 | "uid": "$datasource" 287 | }, 288 | "expr": "DCGM_FI_DEV_POWER_USAGE{instance=~\"$instance\", gpu=~\"$gpu\"}", 289 | "interval": "", 290 | "legendFormat": "GPU {{gpu}}", 291 | "refId": "A" 292 | } 293 | ], 294 | "title": "GPU Power Usage", 295 | "type": "timeseries" 296 | }, 297 | { 298 | "datasource": { 299 | "uid": "$datasource" 300 | }, 301 | "fieldConfig": { 302 | "defaults": { 303 | "color": { 304 | "mode": "thresholds" 305 | }, 306 | "mappings": [], 307 | "max": 2400, 308 | "min": 0, 309 | "thresholds": { 310 | "mode": "absolute", 311 | "steps": [ 312 | { 313 | "color": "green", 314 | "value": 0 315 | }, 316 | { 317 | "color": "#EAB839", 318 | "value": 1800 319 | }, 320 | { 321 | "color": "red", 322 | "value": 2200 323 | } 324 | ] 325 | }, 326 | "unit": "watt" 327 | }, 328 | "overrides": [] 329 | }, 330 | "gridPos": { 331 | "h": 8, 332 | "w": 6, 333 | "x": 18, 334 | "y": 8 335 | }, 336 | "id": 16, 337 | "options": { 338 | "minVizHeight": 75, 339 | "minVizWidth": 75, 340 | "orientation": "horizontal", 341 | "reduceOptions": { 342 | "calcs": [ 343 | "sum" 344 | ], 345 | "fields": "", 346 | "values": false 347 | }, 348 | "showThresholdLabels": false, 349 | "showThresholdMarkers": true, 350 | "sizing": "auto" 351 | }, 352 | "pluginVersion": "12.2.0-17027759091", 353 | "targets": [ 354 | { 355 | "datasource": { 356 | "uid": "$datasource" 357 | }, 358 | "expr": "sum(DCGM_FI_DEV_POWER_USAGE{instance=~\"$instance\", gpu=~\"$gpu\"})", 359 | "instant": true, 360 | "interval": "", 361 | "legendFormat": "", 362 | "range": false, 363 | "refId": "A" 364 | } 365 | ], 366 | "title": "GPU Power Total", 367 | "type": "gauge" 368 | }, 369 | { 370 | "datasource": { 371 | "uid": "$datasource" 372 | }, 373 | "fieldConfig": { 374 | "defaults": { 375 | "color": { 376 | "mode": "palette-classic" 377 | }, 378 | "custom": { 379 | "axisBorderShow": false, 380 | "axisCenteredZero": false, 381 | "axisColorMode": "text", 382 | "axisLabel": "", 383 | "axisPlacement": "auto", 384 | "barAlignment": 0, 385 | "barWidthFactor": 0.6, 386 | "drawStyle": "line", 387 | "fillOpacity": 10, 388 | "gradientMode": "none", 389 | "hideFrom": { 390 | "legend": false, 391 | "tooltip": false, 392 | "viz": false 393 | }, 394 | "insertNulls": false, 395 | "lineInterpolation": "linear", 396 | "lineWidth": 2, 397 | "pointSize": 5, 398 | "scaleDistribution": { 399 | "type": "linear" 400 | }, 401 | "showPoints": "never", 402 | "spanNulls": false, 403 | "stacking": { 404 | "group": "A", 405 | "mode": "none" 406 | }, 407 | "thresholdsStyle": { 408 | "mode": "off" 409 | } 410 | }, 411 | "mappings": [], 412 | "thresholds": { 413 | "mode": "absolute", 414 | "steps": [ 415 | { 416 | "color": "green", 417 | "value": 0 418 | }, 419 | { 420 | "color": "red", 421 | "value": 80 422 | } 423 | ] 424 | }, 425 | "unit": "hertz" 426 | }, 427 | "overrides": [] 428 | }, 429 | "gridPos": { 430 | "h": 8, 431 | "w": 12, 432 | "x": 0, 433 | "y": 16 434 | }, 435 | "id": 2, 436 | "options": { 437 | "dataLinks": [], 438 | "legend": { 439 | "calcs": [ 440 | "mean", 441 | "lastNotNull", 442 | "max" 443 | ], 444 | "displayMode": "table", 445 | "placement": "right", 446 | "showLegend": true 447 | }, 448 | "tooltip": { 449 | "hideZeros": false, 450 | "mode": "multi", 451 | "sort": "none" 452 | } 453 | }, 454 | "pluginVersion": "12.2.0-17027759091", 455 | "targets": [ 456 | { 457 | "datasource": { 458 | "uid": "$datasource" 459 | }, 460 | "expr": "DCGM_FI_DEV_SM_CLOCK{instance=~\"$instance\", gpu=~\"$gpu\"} * 1000000", 461 | "format": "time_series", 462 | "interval": "", 463 | "intervalFactor": 1, 464 | "legendFormat": "GPU {{gpu}}", 465 | "refId": "A" 466 | } 467 | ], 468 | "title": "GPU SM Clocks", 469 | "type": "timeseries" 470 | }, 471 | { 472 | "datasource": { 473 | "uid": "$datasource" 474 | }, 475 | "fieldConfig": { 476 | "defaults": { 477 | "color": { 478 | "mode": "palette-classic" 479 | }, 480 | "custom": { 481 | "axisBorderShow": false, 482 | "axisCenteredZero": false, 483 | "axisColorMode": "text", 484 | "axisLabel": "", 485 | "axisPlacement": "auto", 486 | "barAlignment": 0, 487 | "barWidthFactor": 0.6, 488 | "drawStyle": "line", 489 | "fillOpacity": 10, 490 | "gradientMode": "none", 491 | "hideFrom": { 492 | "legend": false, 493 | "tooltip": false, 494 | "viz": false 495 | }, 496 | "insertNulls": false, 497 | "lineInterpolation": "linear", 498 | "lineWidth": 2, 499 | "pointSize": 5, 500 | "scaleDistribution": { 501 | "type": "linear" 502 | }, 503 | "showPoints": "never", 504 | "spanNulls": false, 505 | "stacking": { 506 | "group": "A", 507 | "mode": "none" 508 | }, 509 | "thresholdsStyle": { 510 | "mode": "off" 511 | } 512 | }, 513 | "mappings": [], 514 | "max": 100, 515 | "min": 0, 516 | "thresholds": { 517 | "mode": "absolute", 518 | "steps": [ 519 | { 520 | "color": "green", 521 | "value": 0 522 | }, 523 | { 524 | "color": "red", 525 | "value": 80 526 | } 527 | ] 528 | }, 529 | "unit": "percent" 530 | }, 531 | "overrides": [] 532 | }, 533 | "gridPos": { 534 | "h": 8, 535 | "w": 12, 536 | "x": 12, 537 | "y": 16 538 | }, 539 | "id": 6, 540 | "options": { 541 | "dataLinks": [], 542 | "legend": { 543 | "calcs": [ 544 | "mean", 545 | "lastNotNull", 546 | "max" 547 | ], 548 | "displayMode": "table", 549 | "placement": "right", 550 | "showLegend": true 551 | }, 552 | "tooltip": { 553 | "hideZeros": false, 554 | "mode": "multi", 555 | "sort": "none" 556 | } 557 | }, 558 | "pluginVersion": "12.2.0-17027759091", 559 | "targets": [ 560 | { 561 | "datasource": { 562 | "uid": "$datasource" 563 | }, 564 | "expr": "DCGM_FI_DEV_GPU_UTIL{instance=~\"$instance\", gpu=~\"$gpu\"}", 565 | "interval": "", 566 | "legendFormat": "GPU {{gpu}}", 567 | "refId": "A" 568 | } 569 | ], 570 | "title": "GPU Utilization", 571 | "type": "timeseries" 572 | }, 573 | { 574 | "datasource": { 575 | "uid": "$datasource" 576 | }, 577 | "fieldConfig": { 578 | "defaults": { 579 | "color": { 580 | "mode": "palette-classic" 581 | }, 582 | "custom": { 583 | "axisBorderShow": false, 584 | "axisCenteredZero": false, 585 | "axisColorMode": "text", 586 | "axisLabel": "", 587 | "axisPlacement": "auto", 588 | "barAlignment": 0, 589 | "barWidthFactor": 0.6, 590 | "drawStyle": "line", 591 | "fillOpacity": 10, 592 | "gradientMode": "none", 593 | "hideFrom": { 594 | "legend": false, 595 | "tooltip": false, 596 | "viz": false 597 | }, 598 | "insertNulls": false, 599 | "lineInterpolation": "linear", 600 | "lineWidth": 2, 601 | "pointSize": 5, 602 | "scaleDistribution": { 603 | "type": "linear" 604 | }, 605 | "showPoints": "never", 606 | "spanNulls": false, 607 | "stacking": { 608 | "group": "A", 609 | "mode": "none" 610 | }, 611 | "thresholdsStyle": { 612 | "mode": "off" 613 | } 614 | }, 615 | "mappings": [], 616 | "thresholds": { 617 | "mode": "absolute", 618 | "steps": [ 619 | { 620 | "color": "green", 621 | "value": 0 622 | }, 623 | { 624 | "color": "red", 625 | "value": 80 626 | } 627 | ] 628 | }, 629 | "unit": "decmbytes" 630 | }, 631 | "overrides": [] 632 | }, 633 | "gridPos": { 634 | "h": 8, 635 | "w": 12, 636 | "x": 0, 637 | "y": 24 638 | }, 639 | "id": 18, 640 | "options": { 641 | "dataLinks": [], 642 | "legend": { 643 | "calcs": [ 644 | "mean", 645 | "lastNotNull", 646 | "max" 647 | ], 648 | "displayMode": "table", 649 | "placement": "right", 650 | "showLegend": true 651 | }, 652 | "tooltip": { 653 | "hideZeros": false, 654 | "mode": "multi", 655 | "sort": "none" 656 | } 657 | }, 658 | "pluginVersion": "12.2.0-17027759091", 659 | "targets": [ 660 | { 661 | "datasource": { 662 | "uid": "$datasource" 663 | }, 664 | "expr": "DCGM_FI_DEV_FB_USED{instance=~\"$instance\", gpu=~\"$gpu\"}", 665 | "interval": "", 666 | "legendFormat": "GPU {{gpu}}", 667 | "refId": "A" 668 | } 669 | ], 670 | "title": "GPU Framebuffer Mem Used", 671 | "type": "timeseries" 672 | }, 673 | { 674 | "datasource": { 675 | "uid": "$datasource" 676 | }, 677 | "fieldConfig": { 678 | "defaults": { 679 | "color": { 680 | "mode": "palette-classic" 681 | }, 682 | "custom": { 683 | "axisBorderShow": false, 684 | "axisCenteredZero": false, 685 | "axisColorMode": "text", 686 | "axisLabel": "", 687 | "axisPlacement": "auto", 688 | "barAlignment": 0, 689 | "barWidthFactor": 0.6, 690 | "drawStyle": "line", 691 | "fillOpacity": 10, 692 | "gradientMode": "none", 693 | "hideFrom": { 694 | "legend": false, 695 | "tooltip": false, 696 | "viz": false 697 | }, 698 | "insertNulls": false, 699 | "lineInterpolation": "linear", 700 | "lineWidth": 2, 701 | "pointSize": 5, 702 | "scaleDistribution": { 703 | "type": "linear" 704 | }, 705 | "showPoints": "never", 706 | "spanNulls": false, 707 | "stacking": { 708 | "group": "A", 709 | "mode": "none" 710 | }, 711 | "thresholdsStyle": { 712 | "mode": "off" 713 | } 714 | }, 715 | "mappings": [], 716 | "max": 100, 717 | "min": 0, 718 | "thresholds": { 719 | "mode": "absolute", 720 | "steps": [ 721 | { 722 | "color": "green", 723 | "value": 0 724 | }, 725 | { 726 | "color": "red", 727 | "value": 80 728 | } 729 | ] 730 | }, 731 | "unit": "percent" 732 | }, 733 | "overrides": [] 734 | }, 735 | "gridPos": { 736 | "h": 8, 737 | "w": 12, 738 | "x": 12, 739 | "y": 24 740 | }, 741 | "id": 24, 742 | "options": { 743 | "dataLinks": [], 744 | "legend": { 745 | "calcs": [ 746 | "mean", 747 | "lastNotNull", 748 | "max" 749 | ], 750 | "displayMode": "table", 751 | "placement": "right", 752 | "showLegend": true 753 | }, 754 | "tooltip": { 755 | "hideZeros": false, 756 | "mode": "multi", 757 | "sort": "none" 758 | } 759 | }, 760 | "pluginVersion": "12.2.0-17027759091", 761 | "targets": [ 762 | { 763 | "datasource": { 764 | "uid": "$datasource" 765 | }, 766 | "expr": "DCGM_FI_DEV_ENC_UTIL{instance=~\"$instance\", gpu=~\"$gpu\"}", 767 | "interval": "", 768 | "legendFormat": "NVENC {{gpu}}", 769 | "refId": "A" 770 | }, 771 | { 772 | "datasource": { 773 | "uid": "$datasource" 774 | }, 775 | "expr": "DCGM_FI_DEV_DEC_UTIL{instance=~\"$instance\", gpu=~\"$gpu\"}", 776 | "interval": "", 777 | "legendFormat": "NVDEC {{gpu}}", 778 | "refId": "B" 779 | } 780 | ], 781 | "title": "NVENC / NVDEC Utilization (Device)", 782 | "type": "timeseries" 783 | } 784 | ], 785 | "preload": false, 786 | "refresh": "auto", 787 | "schemaVersion": 41, 788 | "tags": [], 789 | "templating": { 790 | "list": [ 791 | { 792 | "current": { 793 | "text": "Prometheus", 794 | "value": "PBFA97CFB590B2093" 795 | }, 796 | "includeAll": false, 797 | "name": "datasource", 798 | "options": [], 799 | "query": "prometheus", 800 | "refresh": 1, 801 | "regex": "", 802 | "type": "datasource" 803 | }, 804 | { 805 | "current": { 806 | "text": "All", 807 | "value": [ 808 | "$__all" 809 | ] 810 | }, 811 | "datasource": "$datasource", 812 | "definition": "label_values(DCGM_FI_DEV_GPU_TEMP, instance)", 813 | "includeAll": true, 814 | "multi": true, 815 | "name": "instance", 816 | "options": [], 817 | "query": "label_values(DCGM_FI_DEV_GPU_TEMP, instance)", 818 | "refresh": 1, 819 | "regex": "", 820 | "sort": 1, 821 | "type": "query" 822 | }, 823 | { 824 | "current": { 825 | "text": "All", 826 | "value": [ 827 | "$__all" 828 | ] 829 | }, 830 | "datasource": "$datasource", 831 | "definition": "label_values(DCGM_FI_DEV_GPU_TEMP, gpu)", 832 | "includeAll": true, 833 | "multi": true, 834 | "name": "gpu", 835 | "options": [], 836 | "query": "label_values(DCGM_FI_DEV_GPU_TEMP, gpu)", 837 | "refresh": 1, 838 | "regex": "", 839 | "sort": 1, 840 | "type": "query" 841 | } 842 | ] 843 | }, 844 | "time": { 845 | "from": "now-15m", 846 | "to": "now" 847 | }, 848 | "timepicker": {}, 849 | "timezone": "", 850 | "title": "GPU Dashboard", 851 | "uid": "Oxed_c6Wz", 852 | "version": 5 853 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/container.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "description": "Container metrics only (cAdvisor/Prometheus). Node-level metrics removed. Uses a datasource variable instead of ${DS_PROMETHEUS}.", 19 | "editable": true, 20 | "fiscalYearStartMonth": 0, 21 | "graphTooltip": 1, 22 | "id": 16, 23 | "links": [], 24 | "panels": [ 25 | { 26 | "datasource": { 27 | "uid": "$datasource" 28 | }, 29 | "fieldConfig": { 30 | "defaults": { 31 | "color": { 32 | "mode": "palette-classic" 33 | }, 34 | "custom": { 35 | "axisBorderShow": false, 36 | "axisCenteredZero": false, 37 | "axisColorMode": "text", 38 | "axisLabel": "", 39 | "axisPlacement": "auto", 40 | "barAlignment": 0, 41 | "barWidthFactor": 0.6, 42 | "drawStyle": "bars", 43 | "fillOpacity": 100, 44 | "gradientMode": "none", 45 | "hideFrom": { 46 | "legend": false, 47 | "tooltip": false, 48 | "viz": false 49 | }, 50 | "insertNulls": false, 51 | "lineInterpolation": "linear", 52 | "lineWidth": 3, 53 | "pointSize": 5, 54 | "scaleDistribution": { 55 | "type": "linear" 56 | }, 57 | "showPoints": "never", 58 | "spanNulls": false, 59 | "stacking": { 60 | "group": "A", 61 | "mode": "normal" 62 | }, 63 | "thresholdsStyle": { 64 | "mode": "off" 65 | } 66 | }, 67 | "mappings": [], 68 | "min": 0, 69 | "thresholds": { 70 | "mode": "absolute", 71 | "steps": [ 72 | { 73 | "color": "green", 74 | "value": 0 75 | }, 76 | { 77 | "color": "red", 78 | "value": 80 79 | } 80 | ] 81 | }, 82 | "unit": "none" 83 | }, 84 | "overrides": [ 85 | { 86 | "matcher": { 87 | "id": "byName", 88 | "options": "Ops-Infrastructure" 89 | }, 90 | "properties": [ 91 | { 92 | "id": "color", 93 | "value": { 94 | "fixedColor": "#447EBC", 95 | "mode": "fixed" 96 | } 97 | } 98 | ] 99 | }, 100 | { 101 | "matcher": { 102 | "id": "byName", 103 | "options": "{}" 104 | }, 105 | "properties": [ 106 | { 107 | "id": "color", 108 | "value": { 109 | "fixedColor": "#DEDAF7", 110 | "mode": "fixed" 111 | } 112 | } 113 | ] 114 | } 115 | ] 116 | }, 117 | "gridPos": { 118 | "h": 4, 119 | "w": 4, 120 | "x": 0, 121 | "y": 0 122 | }, 123 | "id": 7, 124 | "options": { 125 | "legend": { 126 | "calcs": [], 127 | "displayMode": "list", 128 | "placement": "bottom", 129 | "showLegend": false 130 | }, 131 | "tooltip": { 132 | "hideZeros": false, 133 | "mode": "multi", 134 | "sort": "none" 135 | } 136 | }, 137 | "pluginVersion": "12.2.0-17027759091", 138 | "targets": [ 139 | { 140 | "datasource": { 141 | "uid": "$datasource" 142 | }, 143 | "expr": "count(container_memory_usage_bytes{name=~\"$container\", image=~\"$containergroup\"}) by (image)", 144 | "intervalFactor": 2, 145 | "legendFormat": "{{image}}", 146 | "refId": "A", 147 | "step": 4 148 | } 149 | ], 150 | "title": "Running Containers (by Image)", 151 | "type": "timeseries" 152 | }, 153 | { 154 | "datasource": { 155 | "uid": "$datasource" 156 | }, 157 | "fieldConfig": { 158 | "defaults": { 159 | "color": { 160 | "mode": "palette-classic" 161 | }, 162 | "custom": { 163 | "axisBorderShow": false, 164 | "axisCenteredZero": false, 165 | "axisColorMode": "text", 166 | "axisLabel": "", 167 | "axisPlacement": "auto", 168 | "barAlignment": 0, 169 | "barWidthFactor": 0.6, 170 | "drawStyle": "line", 171 | "fillOpacity": 30, 172 | "gradientMode": "none", 173 | "hideFrom": { 174 | "legend": false, 175 | "tooltip": false, 176 | "viz": false 177 | }, 178 | "insertNulls": false, 179 | "lineInterpolation": "linear", 180 | "lineWidth": 2, 181 | "pointSize": 5, 182 | "scaleDistribution": { 183 | "type": "linear" 184 | }, 185 | "showPoints": "never", 186 | "spanNulls": false, 187 | "stacking": { 188 | "group": "A", 189 | "mode": "normal" 190 | }, 191 | "thresholdsStyle": { 192 | "mode": "off" 193 | } 194 | }, 195 | "mappings": [], 196 | "thresholds": { 197 | "mode": "absolute", 198 | "steps": [ 199 | { 200 | "color": "green", 201 | "value": 0 202 | }, 203 | { 204 | "color": "red", 205 | "value": 80 206 | } 207 | ] 208 | }, 209 | "unit": "bytes" 210 | }, 211 | "overrides": [] 212 | }, 213 | "gridPos": { 214 | "h": 6, 215 | "w": 12, 216 | "x": 12, 217 | "y": 0 218 | }, 219 | "id": 10, 220 | "options": { 221 | "legend": { 222 | "calcs": [], 223 | "displayMode": "list", 224 | "placement": "bottom", 225 | "showLegend": true 226 | }, 227 | "tooltip": { 228 | "hideZeros": false, 229 | "mode": "multi", 230 | "sort": "none" 231 | } 232 | }, 233 | "pluginVersion": "12.2.0-17027759091", 234 | "targets": [ 235 | { 236 | "datasource": { 237 | "uid": "$datasource" 238 | }, 239 | "expr": "sum(container_memory_rss{name=~\"$container\", image=~\"$containergroup\"}) by (name)", 240 | "hide": false, 241 | "intervalFactor": 2, 242 | "legendFormat": "{{name}}", 243 | "refId": "A", 244 | "step": 2 245 | } 246 | ], 247 | "title": "Memory Usage per Container (RSS, Stacked)", 248 | "type": "timeseries" 249 | }, 250 | { 251 | "datasource": { 252 | "uid": "$datasource" 253 | }, 254 | "fieldConfig": { 255 | "defaults": { 256 | "color": { 257 | "mode": "palette-classic" 258 | }, 259 | "custom": { 260 | "axisBorderShow": false, 261 | "axisCenteredZero": false, 262 | "axisColorMode": "text", 263 | "axisLabel": "", 264 | "axisPlacement": "auto", 265 | "barAlignment": 0, 266 | "barWidthFactor": 0.6, 267 | "drawStyle": "line", 268 | "fillOpacity": 50, 269 | "gradientMode": "none", 270 | "hideFrom": { 271 | "legend": false, 272 | "tooltip": false, 273 | "viz": false 274 | }, 275 | "insertNulls": false, 276 | "lineInterpolation": "linear", 277 | "lineWidth": 1, 278 | "pointSize": 5, 279 | "scaleDistribution": { 280 | "type": "linear" 281 | }, 282 | "showPoints": "never", 283 | "spanNulls": false, 284 | "stacking": { 285 | "group": "A", 286 | "mode": "normal" 287 | }, 288 | "thresholdsStyle": { 289 | "mode": "off" 290 | } 291 | }, 292 | "mappings": [], 293 | "thresholds": { 294 | "mode": "absolute", 295 | "steps": [ 296 | { 297 | "color": "green", 298 | "value": 0 299 | }, 300 | { 301 | "color": "red", 302 | "value": 80 303 | } 304 | ] 305 | }, 306 | "unit": "percent" 307 | }, 308 | "overrides": [] 309 | }, 310 | "gridPos": { 311 | "h": 8, 312 | "w": 12, 313 | "x": 0, 314 | "y": 4 315 | }, 316 | "id": 1, 317 | "options": { 318 | "legend": { 319 | "calcs": [], 320 | "displayMode": "list", 321 | "placement": "bottom", 322 | "showLegend": true 323 | }, 324 | "tooltip": { 325 | "hideZeros": false, 326 | "mode": "multi", 327 | "sort": "none" 328 | } 329 | }, 330 | "pluginVersion": "12.2.0-17027759091", 331 | "targets": [ 332 | { 333 | "datasource": { 334 | "uid": "$datasource" 335 | }, 336 | "expr": "sum(rate(container_cpu_usage_seconds_total{name=~\"$container\", image=~\"$containergroup\"}[$interval])) by (name) * 100", 337 | "hide": false, 338 | "interval": "", 339 | "intervalFactor": 2, 340 | "legendFormat": "{{name}}", 341 | "metric": "container_cp", 342 | "refId": "F", 343 | "step": 2 344 | } 345 | ], 346 | "title": "CPU Usage per Container (Stacked)", 347 | "type": "timeseries" 348 | }, 349 | { 350 | "datasource": { 351 | "uid": "$datasource" 352 | }, 353 | "fieldConfig": { 354 | "defaults": { 355 | "color": { 356 | "mode": "palette-classic" 357 | }, 358 | "custom": { 359 | "axisBorderShow": false, 360 | "axisCenteredZero": false, 361 | "axisColorMode": "text", 362 | "axisLabel": "", 363 | "axisPlacement": "auto", 364 | "barAlignment": 0, 365 | "barWidthFactor": 0.6, 366 | "drawStyle": "line", 367 | "fillOpacity": 30, 368 | "gradientMode": "none", 369 | "hideFrom": { 370 | "legend": false, 371 | "tooltip": false, 372 | "viz": false 373 | }, 374 | "insertNulls": false, 375 | "lineInterpolation": "linear", 376 | "lineWidth": 2, 377 | "pointSize": 5, 378 | "scaleDistribution": { 379 | "type": "linear" 380 | }, 381 | "showPoints": "never", 382 | "spanNulls": false, 383 | "stacking": { 384 | "group": "A", 385 | "mode": "normal" 386 | }, 387 | "thresholdsStyle": { 388 | "mode": "off" 389 | } 390 | }, 391 | "mappings": [], 392 | "thresholds": { 393 | "mode": "absolute", 394 | "steps": [ 395 | { 396 | "color": "green", 397 | "value": 0 398 | }, 399 | { 400 | "color": "red", 401 | "value": 80 402 | } 403 | ] 404 | }, 405 | "unit": "bytes" 406 | }, 407 | "overrides": [] 408 | }, 409 | "gridPos": { 410 | "h": 6, 411 | "w": 12, 412 | "x": 12, 413 | "y": 6 414 | }, 415 | "id": 11, 416 | "options": { 417 | "legend": { 418 | "calcs": [], 419 | "displayMode": "list", 420 | "placement": "bottom", 421 | "showLegend": true 422 | }, 423 | "tooltip": { 424 | "hideZeros": false, 425 | "mode": "multi", 426 | "sort": "none" 427 | } 428 | }, 429 | "pluginVersion": "12.2.0-17027759091", 430 | "targets": [ 431 | { 432 | "datasource": { 433 | "uid": "$datasource" 434 | }, 435 | "expr": "sum(container_memory_cache{name=~\"$container\", image=~\"$containergroup\"}) by (name)", 436 | "hide": false, 437 | "intervalFactor": 2, 438 | "legendFormat": "{{name}}", 439 | "refId": "C", 440 | "step": 2 441 | } 442 | ], 443 | "title": "Cached Memory per Container (Stacked)", 444 | "type": "timeseries" 445 | }, 446 | { 447 | "datasource": { 448 | "uid": "$datasource" 449 | }, 450 | "fieldConfig": { 451 | "defaults": { 452 | "color": { 453 | "mode": "palette-classic" 454 | }, 455 | "custom": { 456 | "axisBorderShow": false, 457 | "axisCenteredZero": false, 458 | "axisColorMode": "text", 459 | "axisLabel": "", 460 | "axisPlacement": "auto", 461 | "barAlignment": 0, 462 | "barWidthFactor": 0.6, 463 | "drawStyle": "line", 464 | "fillOpacity": 10, 465 | "gradientMode": "none", 466 | "hideFrom": { 467 | "legend": false, 468 | "tooltip": false, 469 | "viz": false 470 | }, 471 | "insertNulls": false, 472 | "lineInterpolation": "linear", 473 | "lineWidth": 2, 474 | "pointSize": 5, 475 | "scaleDistribution": { 476 | "type": "linear" 477 | }, 478 | "showPoints": "never", 479 | "spanNulls": false, 480 | "stacking": { 481 | "group": "A", 482 | "mode": "none" 483 | }, 484 | "thresholdsStyle": { 485 | "mode": "off" 486 | } 487 | }, 488 | "mappings": [], 489 | "thresholds": { 490 | "mode": "absolute", 491 | "steps": [ 492 | { 493 | "color": "green", 494 | "value": 0 495 | }, 496 | { 497 | "color": "red", 498 | "value": 80 499 | } 500 | ] 501 | }, 502 | "unit": "Bps" 503 | }, 504 | "overrides": [] 505 | }, 506 | "gridPos": { 507 | "h": 6, 508 | "w": 12, 509 | "x": 0, 510 | "y": 12 511 | }, 512 | "id": 9, 513 | "options": { 514 | "legend": { 515 | "calcs": [], 516 | "displayMode": "list", 517 | "placement": "bottom", 518 | "showLegend": true 519 | }, 520 | "tooltip": { 521 | "hideZeros": false, 522 | "mode": "multi", 523 | "sort": "none" 524 | } 525 | }, 526 | "pluginVersion": "12.2.0-17027759091", 527 | "targets": [ 528 | { 529 | "datasource": { 530 | "uid": "$datasource" 531 | }, 532 | "expr": "sum(rate(container_network_transmit_bytes_total{name=~\"$container\", image=~\"$containergroup\"}[$interval])) by (name)", 533 | "intervalFactor": 2, 534 | "legendFormat": "{{name}}", 535 | "refId": "A", 536 | "step": 2 537 | } 538 | ], 539 | "title": "Sent Network Traffic per Container", 540 | "type": "timeseries" 541 | }, 542 | { 543 | "datasource": { 544 | "uid": "$datasource" 545 | }, 546 | "fieldConfig": { 547 | "defaults": { 548 | "color": { 549 | "mode": "palette-classic" 550 | }, 551 | "custom": { 552 | "axisBorderShow": false, 553 | "axisCenteredZero": false, 554 | "axisColorMode": "text", 555 | "axisLabel": "", 556 | "axisPlacement": "auto", 557 | "barAlignment": 0, 558 | "barWidthFactor": 0.6, 559 | "drawStyle": "line", 560 | "fillOpacity": 10, 561 | "gradientMode": "none", 562 | "hideFrom": { 563 | "legend": false, 564 | "tooltip": false, 565 | "viz": false 566 | }, 567 | "insertNulls": false, 568 | "lineInterpolation": "linear", 569 | "lineWidth": 2, 570 | "pointSize": 5, 571 | "scaleDistribution": { 572 | "type": "linear" 573 | }, 574 | "showPoints": "never", 575 | "spanNulls": false, 576 | "stacking": { 577 | "group": "A", 578 | "mode": "none" 579 | }, 580 | "thresholdsStyle": { 581 | "mode": "off" 582 | } 583 | }, 584 | "mappings": [], 585 | "thresholds": { 586 | "mode": "absolute", 587 | "steps": [ 588 | { 589 | "color": "green", 590 | "value": 0 591 | }, 592 | { 593 | "color": "red", 594 | "value": 80 595 | } 596 | ] 597 | }, 598 | "unit": "Bps" 599 | }, 600 | "overrides": [] 601 | }, 602 | "gridPos": { 603 | "h": 6, 604 | "w": 12, 605 | "x": 12, 606 | "y": 12 607 | }, 608 | "id": 8, 609 | "options": { 610 | "legend": { 611 | "calcs": [], 612 | "displayMode": "list", 613 | "placement": "bottom", 614 | "showLegend": true 615 | }, 616 | "tooltip": { 617 | "hideZeros": false, 618 | "mode": "multi", 619 | "sort": "none" 620 | } 621 | }, 622 | "pluginVersion": "12.2.0-17027759091", 623 | "targets": [ 624 | { 625 | "datasource": { 626 | "uid": "$datasource" 627 | }, 628 | "expr": "sum(rate(container_network_receive_bytes_total{name=~\"$container\", image=~\"$containergroup\"}[$interval])) by (name)", 629 | "intervalFactor": 2, 630 | "legendFormat": "{{name}}", 631 | "refId": "A", 632 | "step": 2 633 | } 634 | ], 635 | "title": "Received Network Traffic per Container", 636 | "type": "timeseries" 637 | }, 638 | { 639 | "datasource": { 640 | "uid": "$datasource" 641 | }, 642 | "fieldConfig": { 643 | "defaults": { 644 | "custom": { 645 | "align": "auto", 646 | "cellOptions": { 647 | "type": "auto" 648 | }, 649 | "inspect": false 650 | }, 651 | "decimals": 2, 652 | "mappings": [], 653 | "thresholds": { 654 | "mode": "absolute", 655 | "steps": [ 656 | { 657 | "color": "green", 658 | "value": 0 659 | }, 660 | { 661 | "color": "red", 662 | "value": 80 663 | } 664 | ] 665 | }, 666 | "unit": "short" 667 | }, 668 | "overrides": [ 669 | { 670 | "matcher": { 671 | "id": "byName", 672 | "options": "Time" 673 | }, 674 | "properties": [ 675 | { 676 | "id": "unit", 677 | "value": "time: YYYY-MM-DD HH:mm:ss" 678 | }, 679 | { 680 | "id": "custom.align" 681 | } 682 | ] 683 | } 684 | ] 685 | }, 686 | "gridPos": { 687 | "h": 7, 688 | "w": 12, 689 | "x": 0, 690 | "y": 18 691 | }, 692 | "id": 18, 693 | "options": { 694 | "cellHeight": "sm", 695 | "footer": { 696 | "countRows": false, 697 | "fields": "", 698 | "reducer": [ 699 | "sum" 700 | ], 701 | "show": false 702 | }, 703 | "showHeader": true 704 | }, 705 | "pluginVersion": "12.2.0-17027759091", 706 | "targets": [ 707 | { 708 | "datasource": { 709 | "uid": "$datasource" 710 | }, 711 | "expr": "cadvisor_version_info", 712 | "intervalFactor": 2, 713 | "legendFormat": "cAdvisor Version: {{cadvisorVersion}}", 714 | "refId": "A", 715 | "step": 2 716 | }, 717 | { 718 | "datasource": { 719 | "uid": "$datasource" 720 | }, 721 | "expr": "prometheus_build_info", 722 | "intervalFactor": 2, 723 | "legendFormat": "Prometheus Version: {{version}}", 724 | "refId": "B", 725 | "step": 2 726 | }, 727 | { 728 | "datasource": { 729 | "uid": "$datasource" 730 | }, 731 | "expr": "cadvisor_version_info", 732 | "intervalFactor": 2, 733 | "legendFormat": "Docker Version: {{dockerVersion}}", 734 | "refId": "D", 735 | "step": 2 736 | }, 737 | { 738 | "datasource": { 739 | "uid": "$datasource" 740 | }, 741 | "expr": "cadvisor_version_info", 742 | "intervalFactor": 2, 743 | "legendFormat": "Host OS Version: {{osVersion}}", 744 | "refId": "E", 745 | "step": 2 746 | }, 747 | { 748 | "datasource": { 749 | "uid": "$datasource" 750 | }, 751 | "expr": "cadvisor_version_info", 752 | "intervalFactor": 2, 753 | "legendFormat": "Host Kernel Version: {{kernelVersion}}", 754 | "refId": "F", 755 | "step": 2 756 | } 757 | ], 758 | "title": "", 759 | "transformations": [ 760 | { 761 | "id": "reduce", 762 | "options": { 763 | "includeTimeField": false, 764 | "reducers": [ 765 | "mean" 766 | ] 767 | } 768 | } 769 | ], 770 | "type": "table" 771 | } 772 | ], 773 | "preload": false, 774 | "refresh": "auto", 775 | "schemaVersion": 41, 776 | "tags": [], 777 | "templating": { 778 | "list": [ 779 | { 780 | "current": { 781 | "text": "Prometheus", 782 | "value": "PBFA97CFB590B2093" 783 | }, 784 | "includeAll": false, 785 | "label": "Datasource", 786 | "name": "datasource", 787 | "options": [], 788 | "query": "prometheus", 789 | "refresh": 1, 790 | "regex": "", 791 | "type": "datasource" 792 | }, 793 | { 794 | "allValue": ".+", 795 | "current": { 796 | "text": [ 797 | "All" 798 | ], 799 | "value": [ 800 | "$__all" 801 | ] 802 | }, 803 | "datasource": "$datasource", 804 | "includeAll": true, 805 | "label": "Container Group (image)", 806 | "multi": true, 807 | "name": "containergroup", 808 | "options": [], 809 | "query": "label_values(container_memory_usage_bytes, image)", 810 | "refresh": 1, 811 | "regex": "", 812 | "type": "query" 813 | }, 814 | { 815 | "allValue": ".+", 816 | "current": { 817 | "text": [ 818 | "All" 819 | ], 820 | "value": [ 821 | "$__all" 822 | ] 823 | }, 824 | "datasource": "$datasource", 825 | "includeAll": true, 826 | "label": "Container", 827 | "multi": true, 828 | "name": "container", 829 | "options": [], 830 | "query": "label_values(container_memory_usage_bytes, name)", 831 | "refresh": 1, 832 | "regex": "", 833 | "type": "query" 834 | }, 835 | { 836 | "auto": true, 837 | "auto_count": 50, 838 | "auto_min": "50s", 839 | "current": { 840 | "text": "30s", 841 | "value": "30s" 842 | }, 843 | "label": "Interval", 844 | "name": "interval", 845 | "options": [ 846 | { 847 | "selected": true, 848 | "text": "30s", 849 | "value": "30s" 850 | }, 851 | { 852 | "selected": false, 853 | "text": "1m", 854 | "value": "1m" 855 | }, 856 | { 857 | "selected": false, 858 | "text": "2m", 859 | "value": "2m" 860 | }, 861 | { 862 | "selected": false, 863 | "text": "3m", 864 | "value": "3m" 865 | }, 866 | { 867 | "selected": false, 868 | "text": "5m", 869 | "value": "5m" 870 | }, 871 | { 872 | "selected": false, 873 | "text": "7m", 874 | "value": "7m" 875 | }, 876 | { 877 | "selected": false, 878 | "text": "10m", 879 | "value": "10m" 880 | }, 881 | { 882 | "selected": false, 883 | "text": "30m", 884 | "value": "30m" 885 | }, 886 | { 887 | "selected": false, 888 | "text": "1h", 889 | "value": "1h" 890 | }, 891 | { 892 | "selected": false, 893 | "text": "6h", 894 | "value": "6h" 895 | }, 896 | { 897 | "selected": false, 898 | "text": "12h", 899 | "value": "12h" 900 | }, 901 | { 902 | "selected": false, 903 | "text": "1d", 904 | "value": "1d" 905 | }, 906 | { 907 | "selected": false, 908 | "text": "7d", 909 | "value": "7d" 910 | }, 911 | { 912 | "selected": false, 913 | "text": "14d", 914 | "value": "14d" 915 | }, 916 | { 917 | "selected": false, 918 | "text": "30d", 919 | "value": "30d" 920 | } 921 | ], 922 | "query": "30s,1m,2m,3m,5m,7m,10m,30m,1h,6h,12h,1d,7d,14d,30d", 923 | "refresh": 0, 924 | "type": "interval" 925 | } 926 | ] 927 | }, 928 | "time": { 929 | "from": "now-15m", 930 | "to": "now" 931 | }, 932 | "timepicker": {}, 933 | "timezone": "browser", 934 | "title": "Container Dashboard", 935 | "uid": "f9cff7a9-ab66-4773-9166-853a8275a5ec", 936 | "version": 9 937 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/thermals.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "datasource", 8 | "uid": "grafana" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "target": { 15 | "limit": 100, 16 | "matchAny": false, 17 | "tags": [], 18 | "type": "dashboard" 19 | }, 20 | "type": "dashboard" 21 | } 22 | ] 23 | }, 24 | "description": "Node temps + per-component panels with dotted guide lines (no hardcoding).", 25 | "editable": true, 26 | "fiscalYearStartMonth": 0, 27 | "graphTooltip": 0, 28 | "id": 14, 29 | "links": [], 30 | "panels": [ 31 | { 32 | "datasource": { 33 | "uid": "$datasource" 34 | }, 35 | "fieldConfig": { 36 | "defaults": { 37 | "color": { 38 | "mode": "palette-classic" 39 | }, 40 | "custom": { 41 | "axisBorderShow": false, 42 | "axisCenteredZero": false, 43 | "axisColorMode": "text", 44 | "axisLabel": "", 45 | "axisPlacement": "auto", 46 | "barAlignment": 0, 47 | "barWidthFactor": 0.6, 48 | "drawStyle": "line", 49 | "fillOpacity": 0, 50 | "gradientMode": "none", 51 | "hideFrom": { 52 | "legend": false, 53 | "tooltip": false, 54 | "viz": false 55 | }, 56 | "insertNulls": false, 57 | "lineInterpolation": "linear", 58 | "lineWidth": 2, 59 | "pointSize": 4, 60 | "scaleDistribution": { 61 | "type": "linear" 62 | }, 63 | "showPoints": "never", 64 | "spanNulls": true, 65 | "stacking": { 66 | "group": "A", 67 | "mode": "none" 68 | }, 69 | "thresholdsStyle": { 70 | "mode": "line" 71 | } 72 | }, 73 | "mappings": [], 74 | "thresholds": { 75 | "mode": "absolute", 76 | "steps": [ 77 | { 78 | "color": "green", 79 | "value": 0 80 | }, 81 | { 82 | "color": "red", 83 | "value": 70 84 | } 85 | ] 86 | }, 87 | "unit": "celsius" 88 | }, 89 | "overrides": [] 90 | }, 91 | "gridPos": { 92 | "h": 12, 93 | "w": 24, 94 | "x": 0, 95 | "y": 0 96 | }, 97 | "id": 2, 98 | "options": { 99 | "legend": { 100 | "calcs": [], 101 | "displayMode": "list", 102 | "placement": "bottom", 103 | "showLegend": true 104 | }, 105 | "tooltip": { 106 | "hideZeros": false, 107 | "mode": "single", 108 | "sort": "none" 109 | } 110 | }, 111 | "pluginVersion": "12.2.0-17027759091", 112 | "targets": [ 113 | { 114 | "datasource": { 115 | "uid": "$datasource" 116 | }, 117 | "exemplar": true, 118 | "expr": "(node_hwmon_temp_celsius{instance=\"$instance\"}\n * on (chip, sensor, instance) group_left(label) node_hwmon_sensor_label{instance=\"$instance\"}\n * on (chip, instance) group_left(chip_name) node_hwmon_chip_names{instance=\"$instance\"}) > 0", 119 | "legendFormat": "{{chip_name}}-{{label}}", 120 | "refId": "A" 121 | }, 122 | { 123 | "datasource": { 124 | "uid": "$datasource" 125 | }, 126 | "exemplar": true, 127 | "expr": "((node_hwmon_temp_celsius{instance=\"$instance\"}\n unless on (chip, sensor, instance) node_hwmon_sensor_label{instance=\"$instance\"})\n * on (chip, instance) group_left(chip_name) node_hwmon_chip_names{instance=\"$instance\"}) > 0", 128 | "legendFormat": "{{chip_name}}-{{sensor}}", 129 | "refId": "B" 130 | }, 131 | { 132 | "datasource": { 133 | "uid": "$datasource" 134 | }, 135 | "editorMode": "code", 136 | "exemplar": true, 137 | "expr": "avg(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"} > 0)", 138 | "legendFormat": "nvidia-{{modelName}}-GPU{{gpu}}", 139 | "range": true, 140 | "refId": "C" 141 | } 142 | ], 143 | "title": "Temperature — Combined Sensors", 144 | "type": "timeseries" 145 | }, 146 | { 147 | "datasource": { 148 | "uid": "$datasource" 149 | }, 150 | "fieldConfig": { 151 | "defaults": { 152 | "color": { 153 | "mode": "palette-classic" 154 | }, 155 | "custom": { 156 | "axisBorderShow": false, 157 | "axisCenteredZero": false, 158 | "axisColorMode": "text", 159 | "axisLabel": "", 160 | "axisPlacement": "auto", 161 | "barAlignment": 0, 162 | "barWidthFactor": 0.6, 163 | "drawStyle": "line", 164 | "fillOpacity": 0, 165 | "gradientMode": "none", 166 | "hideFrom": { 167 | "legend": false, 168 | "tooltip": false, 169 | "viz": false 170 | }, 171 | "insertNulls": false, 172 | "lineInterpolation": "linear", 173 | "lineWidth": 2, 174 | "pointSize": 0, 175 | "scaleDistribution": { 176 | "type": "linear" 177 | }, 178 | "showPoints": "never", 179 | "spanNulls": true, 180 | "stacking": { 181 | "group": "A", 182 | "mode": "none" 183 | }, 184 | "thresholdsStyle": { 185 | "mode": "off" 186 | } 187 | }, 188 | "mappings": [], 189 | "thresholds": { 190 | "mode": "absolute", 191 | "steps": [ 192 | { 193 | "color": "green", 194 | "value": 0 195 | }, 196 | { 197 | "color": "red", 198 | "value": 80 199 | } 200 | ] 201 | }, 202 | "unit": "celsius" 203 | }, 204 | "overrides": [ 205 | { 206 | "matcher": { 207 | "id": "byName", 208 | "options": "NVMe normal" 209 | }, 210 | "properties": [ 211 | { 212 | "id": "custom.lineStyle", 213 | "value": { 214 | "dash": [ 215 | 4, 216 | 4 217 | ], 218 | "fill": "dash" 219 | } 220 | }, 221 | { 222 | "id": "color", 223 | "value": { 224 | "fixedColor": "green", 225 | "mode": "fixed" 226 | } 227 | }, 228 | { 229 | "id": "custom.lineWidth", 230 | "value": 1 231 | } 232 | ] 233 | }, 234 | { 235 | "matcher": { 236 | "id": "byName", 237 | "options": "NVMe warn" 238 | }, 239 | "properties": [ 240 | { 241 | "id": "custom.lineStyle", 242 | "value": { 243 | "dash": [ 244 | 4, 245 | 4 246 | ], 247 | "fill": "dash" 248 | } 249 | }, 250 | { 251 | "id": "color", 252 | "value": { 253 | "fixedColor": "yellow", 254 | "mode": "fixed" 255 | } 256 | }, 257 | { 258 | "id": "custom.lineWidth", 259 | "value": 1 260 | } 261 | ] 262 | }, 263 | { 264 | "matcher": { 265 | "id": "byName", 266 | "options": "NVMe red" 267 | }, 268 | "properties": [ 269 | { 270 | "id": "custom.lineStyle", 271 | "value": { 272 | "dash": [ 273 | 4, 274 | 4 275 | ], 276 | "fill": "dash" 277 | } 278 | }, 279 | { 280 | "id": "color", 281 | "value": { 282 | "fixedColor": "red", 283 | "mode": "fixed" 284 | } 285 | }, 286 | { 287 | "id": "custom.lineWidth", 288 | "value": 1 289 | } 290 | ] 291 | }, 292 | { 293 | "matcher": { 294 | "id": "byName", 295 | "options": "NVMe max" 296 | }, 297 | "properties": [ 298 | { 299 | "id": "custom.lineStyle", 300 | "value": { 301 | "dash": [ 302 | 2, 303 | 6 304 | ], 305 | "fill": "dot" 306 | } 307 | }, 308 | { 309 | "id": "color", 310 | "value": { 311 | "fixedColor": "dark-red", 312 | "mode": "fixed" 313 | } 314 | }, 315 | { 316 | "id": "custom.lineWidth", 317 | "value": 1 318 | } 319 | ] 320 | } 321 | ] 322 | }, 323 | "gridPos": { 324 | "h": 10, 325 | "w": 24, 326 | "x": 0, 327 | "y": 12 328 | }, 329 | "id": 10, 330 | "options": { 331 | "legend": { 332 | "calcs": [], 333 | "displayMode": "list", 334 | "placement": "bottom", 335 | "showLegend": true 336 | }, 337 | "tooltip": { 338 | "hideZeros": false, 339 | "mode": "single", 340 | "sort": "none" 341 | } 342 | }, 343 | "pluginVersion": "12.2.0-17027759091", 344 | "targets": [ 345 | { 346 | "datasource": { 347 | "uid": "$datasource" 348 | }, 349 | "expr": "(node_hwmon_temp_celsius{instance=\"$instance\", chip=~\"nvme_.*\"}\n * on (chip, sensor, instance) group_left(label) node_hwmon_sensor_label{instance=\"$instance\", label=\"Composite\"}\n * on (chip, instance) group_left(chip_name) node_hwmon_chip_names{instance=\"$instance\"})", 350 | "legendFormat": "{{chip_name}}-{{label}}", 351 | "refId": "A" 352 | }, 353 | { 354 | "datasource": { 355 | "uid": "$datasource" 356 | }, 357 | "expr": "(0 * node_time_seconds{instance=\"$instance\"}) + $nvme_normal_max", 358 | "legendFormat": "NVMe normal", 359 | "refId": "N" 360 | }, 361 | { 362 | "datasource": { 363 | "uid": "$datasource" 364 | }, 365 | "expr": "(node_hwmon_temp_max_celsius{instance=\"$instance\", chip=~\"nvme_.*\", sensor=\"temp1\"} - $nvme_warn_offset)", 366 | "legendFormat": "NVMe warn", 367 | "refId": "Y" 368 | }, 369 | { 370 | "datasource": { 371 | "uid": "$datasource" 372 | }, 373 | "expr": "node_hwmon_temp_max_celsius{instance=\"$instance\", chip=~\"nvme_.*\", sensor=\"temp1\"}", 374 | "legendFormat": "NVMe red", 375 | "refId": "R" 376 | }, 377 | { 378 | "datasource": { 379 | "uid": "$datasource" 380 | }, 381 | "expr": "node_hwmon_temp_crit_celsius{instance=\"$instance\", chip=~\"nvme_.*\", sensor=\"temp1\"}", 382 | "legendFormat": "NVMe max", 383 | "refId": "M" 384 | } 385 | ], 386 | "title": "NVMe — Controller (Composite) Temperature", 387 | "type": "timeseries" 388 | }, 389 | { 390 | "datasource": { 391 | "uid": "$datasource" 392 | }, 393 | "fieldConfig": { 394 | "defaults": { 395 | "color": { 396 | "mode": "palette-classic" 397 | }, 398 | "custom": { 399 | "axisBorderShow": false, 400 | "axisCenteredZero": false, 401 | "axisColorMode": "text", 402 | "axisLabel": "", 403 | "axisPlacement": "auto", 404 | "barAlignment": 0, 405 | "barWidthFactor": 0.6, 406 | "drawStyle": "line", 407 | "fillOpacity": 0, 408 | "gradientMode": "none", 409 | "hideFrom": { 410 | "legend": false, 411 | "tooltip": false, 412 | "viz": false 413 | }, 414 | "insertNulls": false, 415 | "lineInterpolation": "linear", 416 | "lineWidth": 2, 417 | "pointSize": 5, 418 | "scaleDistribution": { 419 | "type": "linear" 420 | }, 421 | "showPoints": "never", 422 | "spanNulls": true, 423 | "stacking": { 424 | "group": "A", 425 | "mode": "none" 426 | }, 427 | "thresholdsStyle": { 428 | "mode": "off" 429 | } 430 | }, 431 | "mappings": [], 432 | "thresholds": { 433 | "mode": "absolute", 434 | "steps": [ 435 | { 436 | "color": "green", 437 | "value": 0 438 | }, 439 | { 440 | "color": "red", 441 | "value": 80 442 | } 443 | ] 444 | }, 445 | "unit": "celsius" 446 | }, 447 | "overrides": [ 448 | { 449 | "matcher": { 450 | "id": "byName", 451 | "options": "CPU normal" 452 | }, 453 | "properties": [ 454 | { 455 | "id": "custom.lineStyle", 456 | "value": { 457 | "dash": [ 458 | 4, 459 | 4 460 | ], 461 | "fill": "dash" 462 | } 463 | }, 464 | { 465 | "id": "color", 466 | "value": { 467 | "fixedColor": "green", 468 | "mode": "fixed" 469 | } 470 | }, 471 | { 472 | "id": "custom.lineWidth", 473 | "value": 1 474 | } 475 | ] 476 | }, 477 | { 478 | "matcher": { 479 | "id": "byName", 480 | "options": "CPU warn" 481 | }, 482 | "properties": [ 483 | { 484 | "id": "custom.lineStyle", 485 | "value": { 486 | "dash": [ 487 | 4, 488 | 4 489 | ], 490 | "fill": "dash" 491 | } 492 | }, 493 | { 494 | "id": "color", 495 | "value": { 496 | "fixedColor": "yellow", 497 | "mode": "fixed" 498 | } 499 | }, 500 | { 501 | "id": "custom.lineWidth", 502 | "value": 1 503 | } 504 | ] 505 | }, 506 | { 507 | "matcher": { 508 | "id": "byName", 509 | "options": "CPU red" 510 | }, 511 | "properties": [ 512 | { 513 | "id": "custom.lineStyle", 514 | "value": { 515 | "dash": [ 516 | 4, 517 | 4 518 | ], 519 | "fill": "dash" 520 | } 521 | }, 522 | { 523 | "id": "color", 524 | "value": { 525 | "fixedColor": "red", 526 | "mode": "fixed" 527 | } 528 | }, 529 | { 530 | "id": "custom.lineWidth", 531 | "value": 1 532 | } 533 | ] 534 | }, 535 | { 536 | "matcher": { 537 | "id": "byName", 538 | "options": "CPU max" 539 | }, 540 | "properties": [ 541 | { 542 | "id": "custom.lineStyle", 543 | "value": { 544 | "dash": [ 545 | 2, 546 | 6 547 | ], 548 | "fill": "dot" 549 | } 550 | }, 551 | { 552 | "id": "color", 553 | "value": { 554 | "fixedColor": "dark-red", 555 | "mode": "fixed" 556 | } 557 | }, 558 | { 559 | "id": "custom.lineWidth", 560 | "value": 1 561 | } 562 | ] 563 | } 564 | ] 565 | }, 566 | "gridPos": { 567 | "h": 10, 568 | "w": 24, 569 | "x": 0, 570 | "y": 22 571 | }, 572 | "id": 11, 573 | "options": { 574 | "legend": { 575 | "calcs": [], 576 | "displayMode": "list", 577 | "placement": "bottom", 578 | "showLegend": true 579 | }, 580 | "tooltip": { 581 | "hideZeros": false, 582 | "mode": "single", 583 | "sort": "none" 584 | } 585 | }, 586 | "pluginVersion": "12.2.0-17027759091", 587 | "targets": [ 588 | { 589 | "datasource": { 590 | "uid": "$datasource" 591 | }, 592 | "expr": "(node_hwmon_temp_celsius{instance=\"$instance\"}\n * on (chip, sensor, instance) group_left(label) node_hwmon_sensor_label{instance=\"$instance\"}\n * on (chip, instance) group_left(chip_name) node_hwmon_chip_names{instance=\"$instance\", chip_name=~\"k10temp|coretemp\"})", 593 | "legendFormat": "{{chip_name}}-{{label}}", 594 | "refId": "A" 595 | }, 596 | { 597 | "datasource": { 598 | "uid": "$datasource" 599 | }, 600 | "expr": "(0 * node_time_seconds{instance=\"$instance\"}) + $cpu_normal_max", 601 | "legendFormat": "CPU normal", 602 | "refId": "N" 603 | }, 604 | { 605 | "datasource": { 606 | "uid": "$datasource" 607 | }, 608 | "expr": "(0 * node_time_seconds{instance=\"$instance\"}) + $cpu_warn", 609 | "legendFormat": "CPU warn", 610 | "refId": "W" 611 | }, 612 | { 613 | "datasource": { 614 | "uid": "$datasource" 615 | }, 616 | "expr": "(0 * node_time_seconds{instance=\"$instance\"}) + $cpu_red", 617 | "legendFormat": "CPU red", 618 | "refId": "R" 619 | }, 620 | { 621 | "datasource": { 622 | "uid": "$datasource" 623 | }, 624 | "expr": "(0 * node_time_seconds{instance=\"$instance\"}) + $cpu_max", 625 | "legendFormat": "CPU max", 626 | "refId": "M" 627 | } 628 | ], 629 | "title": "CPU — Package / Control Temperatures", 630 | "type": "timeseries" 631 | }, 632 | { 633 | "datasource": { 634 | "uid": "$datasource" 635 | }, 636 | "fieldConfig": { 637 | "defaults": { 638 | "color": { 639 | "mode": "palette-classic" 640 | }, 641 | "custom": { 642 | "axisBorderShow": false, 643 | "axisCenteredZero": false, 644 | "axisColorMode": "text", 645 | "axisLabel": "", 646 | "axisPlacement": "auto", 647 | "barAlignment": 0, 648 | "barWidthFactor": 0.6, 649 | "drawStyle": "line", 650 | "fillOpacity": 0, 651 | "gradientMode": "none", 652 | "hideFrom": { 653 | "legend": false, 654 | "tooltip": false, 655 | "viz": false 656 | }, 657 | "insertNulls": false, 658 | "lineInterpolation": "linear", 659 | "lineWidth": 2, 660 | "pointSize": 5, 661 | "scaleDistribution": { 662 | "type": "linear" 663 | }, 664 | "showPoints": "never", 665 | "spanNulls": true, 666 | "stacking": { 667 | "group": "A", 668 | "mode": "none" 669 | }, 670 | "thresholdsStyle": { 671 | "mode": "off" 672 | } 673 | }, 674 | "mappings": [], 675 | "thresholds": { 676 | "mode": "absolute", 677 | "steps": [ 678 | { 679 | "color": "green", 680 | "value": 0 681 | }, 682 | { 683 | "color": "red", 684 | "value": 80 685 | } 686 | ] 687 | }, 688 | "unit": "celsius" 689 | }, 690 | "overrides": [ 691 | { 692 | "matcher": { 693 | "id": "byName", 694 | "options": "GPU normal" 695 | }, 696 | "properties": [ 697 | { 698 | "id": "custom.lineStyle", 699 | "value": { 700 | "dash": [ 701 | 4, 702 | 4 703 | ], 704 | "fill": "dash" 705 | } 706 | }, 707 | { 708 | "id": "color", 709 | "value": { 710 | "fixedColor": "green", 711 | "mode": "fixed" 712 | } 713 | }, 714 | { 715 | "id": "custom.lineWidth", 716 | "value": 1 717 | } 718 | ] 719 | }, 720 | { 721 | "matcher": { 722 | "id": "byName", 723 | "options": "GPU warn" 724 | }, 725 | "properties": [ 726 | { 727 | "id": "custom.lineStyle", 728 | "value": { 729 | "dash": [ 730 | 4, 731 | 4 732 | ], 733 | "fill": "dash" 734 | } 735 | }, 736 | { 737 | "id": "color", 738 | "value": { 739 | "fixedColor": "yellow", 740 | "mode": "fixed" 741 | } 742 | }, 743 | { 744 | "id": "custom.lineWidth", 745 | "value": 1 746 | } 747 | ] 748 | }, 749 | { 750 | "matcher": { 751 | "id": "byName", 752 | "options": "GPU red" 753 | }, 754 | "properties": [ 755 | { 756 | "id": "custom.lineStyle", 757 | "value": { 758 | "dash": [ 759 | 4, 760 | 4 761 | ], 762 | "fill": "dash" 763 | } 764 | }, 765 | { 766 | "id": "color", 767 | "value": { 768 | "fixedColor": "red", 769 | "mode": "fixed" 770 | } 771 | }, 772 | { 773 | "id": "custom.lineWidth", 774 | "value": 1 775 | } 776 | ] 777 | }, 778 | { 779 | "matcher": { 780 | "id": "byName", 781 | "options": "GPU max" 782 | }, 783 | "properties": [ 784 | { 785 | "id": "custom.lineStyle", 786 | "value": { 787 | "dash": [ 788 | 2, 789 | 6 790 | ], 791 | "fill": "dot" 792 | } 793 | }, 794 | { 795 | "id": "color", 796 | "value": { 797 | "fixedColor": "dark-red", 798 | "mode": "fixed" 799 | } 800 | }, 801 | { 802 | "id": "custom.lineWidth", 803 | "value": 1 804 | } 805 | ] 806 | } 807 | ] 808 | }, 809 | "gridPos": { 810 | "h": 10, 811 | "w": 24, 812 | "x": 0, 813 | "y": 32 814 | }, 815 | "id": 12, 816 | "options": { 817 | "legend": { 818 | "calcs": [], 819 | "displayMode": "list", 820 | "placement": "bottom", 821 | "showLegend": true 822 | }, 823 | "tooltip": { 824 | "hideZeros": false, 825 | "mode": "single", 826 | "sort": "none" 827 | } 828 | }, 829 | "pluginVersion": "12.2.0-17027759091", 830 | "targets": [ 831 | { 832 | "datasource": { 833 | "uid": "$datasource" 834 | }, 835 | "editorMode": "code", 836 | "expr": "avg(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"})", 837 | "legendFormat": "nvidia-{{modelName}}-GPU{{gpu}}", 838 | "range": true, 839 | "refId": "A" 840 | }, 841 | { 842 | "datasource": { 843 | "uid": "$datasource" 844 | }, 845 | "expr": "(0 * max(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"})) + $gpu_normal_max", 846 | "legendFormat": "GPU normal", 847 | "refId": "N" 848 | }, 849 | { 850 | "datasource": { 851 | "uid": "$datasource" 852 | }, 853 | "expr": "(0 * max(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"})) + $gpu_warn", 854 | "legendFormat": "GPU warn", 855 | "refId": "W" 856 | }, 857 | { 858 | "datasource": { 859 | "uid": "$datasource" 860 | }, 861 | "expr": "(0 * max(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"})) + $gpu_red", 862 | "legendFormat": "GPU red", 863 | "refId": "R" 864 | }, 865 | { 866 | "datasource": { 867 | "uid": "$datasource" 868 | }, 869 | "expr": "(0 * max(DCGM_FI_DEV_GPU_TEMP{instance=~\"$gpu_instance\"})) + $gpu_max", 870 | "legendFormat": "GPU max", 871 | "refId": "M" 872 | } 873 | ], 874 | "title": "GPU — NVIDIA Core Temperature (DCGM)", 875 | "type": "timeseries" 876 | }, 877 | { 878 | "datasource": { 879 | "uid": "$datasource" 880 | }, 881 | "fieldConfig": { 882 | "defaults": { 883 | "color": { 884 | "mode": "palette-classic" 885 | }, 886 | "custom": { 887 | "axisBorderShow": false, 888 | "axisCenteredZero": false, 889 | "axisColorMode": "text", 890 | "axisLabel": "", 891 | "axisPlacement": "auto", 892 | "barAlignment": 0, 893 | "barWidthFactor": 0.6, 894 | "drawStyle": "line", 895 | "fillOpacity": 0, 896 | "gradientMode": "none", 897 | "hideFrom": { 898 | "legend": false, 899 | "tooltip": false, 900 | "viz": false 901 | }, 902 | "insertNulls": false, 903 | "lineInterpolation": "linear", 904 | "lineWidth": 2, 905 | "pointSize": 5, 906 | "scaleDistribution": { 907 | "type": "linear" 908 | }, 909 | "showPoints": "never", 910 | "spanNulls": true, 911 | "stacking": { 912 | "group": "A", 913 | "mode": "none" 914 | }, 915 | "thresholdsStyle": { 916 | "mode": "off" 917 | } 918 | }, 919 | "mappings": [], 920 | "thresholds": { 921 | "mode": "absolute", 922 | "steps": [ 923 | { 924 | "color": "green", 925 | "value": 0 926 | }, 927 | { 928 | "color": "red", 929 | "value": 80 930 | } 931 | ] 932 | }, 933 | "unit": "celsius" 934 | }, 935 | "overrides": [ 936 | { 937 | "matcher": { 938 | "id": "byName", 939 | "options": "Drive normal" 940 | }, 941 | "properties": [ 942 | { 943 | "id": "custom.lineStyle", 944 | "value": { 945 | "dash": [ 946 | 4, 947 | 4 948 | ], 949 | "fill": "dash" 950 | } 951 | }, 952 | { 953 | "id": "color", 954 | "value": { 955 | "fixedColor": "green", 956 | "mode": "fixed" 957 | } 958 | }, 959 | { 960 | "id": "custom.lineWidth", 961 | "value": 1 962 | } 963 | ] 964 | }, 965 | { 966 | "matcher": { 967 | "id": "byName", 968 | "options": "Drive warn" 969 | }, 970 | "properties": [ 971 | { 972 | "id": "custom.lineStyle", 973 | "value": { 974 | "dash": [ 975 | 4, 976 | 4 977 | ], 978 | "fill": "dash" 979 | } 980 | }, 981 | { 982 | "id": "color", 983 | "value": { 984 | "fixedColor": "yellow", 985 | "mode": "fixed" 986 | } 987 | }, 988 | { 989 | "id": "custom.lineWidth", 990 | "value": 1 991 | } 992 | ] 993 | }, 994 | { 995 | "matcher": { 996 | "id": "byName", 997 | "options": "Drive red" 998 | }, 999 | "properties": [ 1000 | { 1001 | "id": "custom.lineStyle", 1002 | "value": { 1003 | "dash": [ 1004 | 4, 1005 | 4 1006 | ], 1007 | "fill": "dash" 1008 | } 1009 | }, 1010 | { 1011 | "id": "color", 1012 | "value": { 1013 | "fixedColor": "red", 1014 | "mode": "fixed" 1015 | } 1016 | }, 1017 | { 1018 | "id": "custom.lineWidth", 1019 | "value": 1 1020 | } 1021 | ] 1022 | }, 1023 | { 1024 | "matcher": { 1025 | "id": "byName", 1026 | "options": "Drive max" 1027 | }, 1028 | "properties": [ 1029 | { 1030 | "id": "custom.lineStyle", 1031 | "value": { 1032 | "dash": [ 1033 | 2, 1034 | 6 1035 | ], 1036 | "fill": "dot" 1037 | } 1038 | }, 1039 | { 1040 | "id": "color", 1041 | "value": { 1042 | "fixedColor": "dark-red", 1043 | "mode": "fixed" 1044 | } 1045 | }, 1046 | { 1047 | "id": "custom.lineWidth", 1048 | "value": 1 1049 | } 1050 | ] 1051 | } 1052 | ] 1053 | }, 1054 | "gridPos": { 1055 | "h": 10, 1056 | "w": 24, 1057 | "x": 0, 1058 | "y": 42 1059 | }, 1060 | "id": 13, 1061 | "options": { 1062 | "legend": { 1063 | "calcs": [], 1064 | "displayMode": "list", 1065 | "placement": "bottom", 1066 | "showLegend": true 1067 | }, 1068 | "tooltip": { 1069 | "hideZeros": false, 1070 | "mode": "single", 1071 | "sort": "none" 1072 | } 1073 | }, 1074 | "pluginVersion": "12.2.0-17027759091", 1075 | "targets": [ 1076 | { 1077 | "datasource": { 1078 | "uid": "$datasource" 1079 | }, 1080 | "expr": "smartctl_device_temperature{temperature_type=\"current\", device=~\"$smart_device\"}\n* on (device) group_left(model_name,interface) smartctl_device", 1081 | "legendFormat": "{{interface}}-{{model_name}} ({{device}})", 1082 | "refId": "A" 1083 | }, 1084 | { 1085 | "datasource": { 1086 | "uid": "$datasource" 1087 | }, 1088 | "expr": "(0 * max(smartctl_device_temperature{temperature_type=\"current\", device=~\"$smart_device\"})) + $hdd_normal_max", 1089 | "legendFormat": "Drive normal", 1090 | "refId": "N" 1091 | }, 1092 | { 1093 | "datasource": { 1094 | "uid": "$datasource" 1095 | }, 1096 | "expr": "(0 * max(smartctl_device_temperature{temperature_type=\"current\", device=~\"$smart_device\"})) + $hdd_warn", 1097 | "legendFormat": "Drive warn", 1098 | "refId": "W" 1099 | }, 1100 | { 1101 | "datasource": { 1102 | "uid": "$datasource" 1103 | }, 1104 | "expr": "(0 * max(smartctl_device_temperature{temperature_type=\"current\", device=~\"$smart_device\"})) + $hdd_red", 1105 | "legendFormat": "Drive red", 1106 | "refId": "R" 1107 | }, 1108 | { 1109 | "datasource": { 1110 | "uid": "$datasource" 1111 | }, 1112 | "expr": "(0 * max(smartctl_device_temperature{temperature_type=\"current\", device=~\"$smart_device\"})) + $hdd_max", 1113 | "legendFormat": "Drive max", 1114 | "refId": "M" 1115 | } 1116 | ], 1117 | "title": "Drives — smartctl Temperature (SATA & NVMe)", 1118 | "type": "timeseries" 1119 | } 1120 | ], 1121 | "preload": false, 1122 | "refresh": "auto", 1123 | "schemaVersion": 41, 1124 | "tags": [], 1125 | "templating": { 1126 | "list": [ 1127 | { 1128 | "current": { 1129 | "text": "Prometheus", 1130 | "value": "PBFA97CFB590B2093" 1131 | }, 1132 | "includeAll": false, 1133 | "label": "Datasource", 1134 | "name": "datasource", 1135 | "options": [], 1136 | "query": "prometheus", 1137 | "refresh": 1, 1138 | "type": "datasource" 1139 | }, 1140 | { 1141 | "current": { 1142 | "text": "node_exporter:9100", 1143 | "value": "node_exporter:9100" 1144 | }, 1145 | "datasource": "$datasource", 1146 | "definition": "label_values(node_hwmon_temp_celsius, instance)", 1147 | "includeAll": false, 1148 | "label": "Node instance", 1149 | "name": "instance", 1150 | "options": [], 1151 | "query": { 1152 | "query": "label_values(node_hwmon_temp_celsius, instance)", 1153 | "refId": "StandardVariableQuery" 1154 | }, 1155 | "refresh": 2, 1156 | "type": "query" 1157 | }, 1158 | { 1159 | "current": { 1160 | "text": [ 1161 | "All" 1162 | ], 1163 | "value": [ 1164 | "$__all" 1165 | ] 1166 | }, 1167 | "datasource": "$datasource", 1168 | "definition": "label_values(DCGM_FI_DEV_GPU_TEMP, instance)", 1169 | "includeAll": true, 1170 | "label": "DCGM instance", 1171 | "multi": true, 1172 | "name": "gpu_instance", 1173 | "options": [], 1174 | "query": { 1175 | "query": "label_values(DCGM_FI_DEV_GPU_TEMP, instance)", 1176 | "refId": "StandardVariableQuery" 1177 | }, 1178 | "refresh": 2, 1179 | "type": "query" 1180 | }, 1181 | { 1182 | "current": { 1183 | "text": [ 1184 | "All" 1185 | ], 1186 | "value": [ 1187 | "$__all" 1188 | ] 1189 | }, 1190 | "datasource": "$datasource", 1191 | "definition": "label_values(smartctl_device_temperature, device)", 1192 | "includeAll": true, 1193 | "label": "SMART devices", 1194 | "multi": true, 1195 | "name": "smart_device", 1196 | "options": [], 1197 | "query": { 1198 | "query": "label_values(smartctl_device_temperature, device)", 1199 | "refId": "StandardVariableQuery" 1200 | }, 1201 | "refresh": 2, 1202 | "type": "query" 1203 | }, 1204 | { 1205 | "current": { 1206 | "text": "60", 1207 | "value": "60" 1208 | }, 1209 | "label": "NVMe normal max (°C)", 1210 | "name": "nvme_normal_max", 1211 | "options": [ 1212 | { 1213 | "selected": true, 1214 | "text": "60", 1215 | "value": "60" 1216 | } 1217 | ], 1218 | "query": "60", 1219 | "type": "textbox" 1220 | }, 1221 | { 1222 | "current": { 1223 | "text": "5", 1224 | "value": "5" 1225 | }, 1226 | "label": "NVMe warn offset (max-Δ°C)", 1227 | "name": "nvme_warn_offset", 1228 | "options": [ 1229 | { 1230 | "selected": true, 1231 | "text": "5", 1232 | "value": "5" 1233 | } 1234 | ], 1235 | "query": "5", 1236 | "type": "textbox" 1237 | }, 1238 | { 1239 | "current": { 1240 | "text": "80", 1241 | "value": "80" 1242 | }, 1243 | "label": "CPU normal max (°C)", 1244 | "name": "cpu_normal_max", 1245 | "options": [ 1246 | { 1247 | "selected": true, 1248 | "text": "80", 1249 | "value": "80" 1250 | } 1251 | ], 1252 | "query": "80", 1253 | "type": "textbox" 1254 | }, 1255 | { 1256 | "current": { 1257 | "text": "85", 1258 | "value": "85" 1259 | }, 1260 | "label": "CPU warn (°C)", 1261 | "name": "cpu_warn", 1262 | "options": [ 1263 | { 1264 | "selected": true, 1265 | "text": "85", 1266 | "value": "85" 1267 | } 1268 | ], 1269 | "query": "85", 1270 | "type": "textbox" 1271 | }, 1272 | { 1273 | "current": { 1274 | "text": "90", 1275 | "value": "90" 1276 | }, 1277 | "label": "CPU red (°C)", 1278 | "name": "cpu_red", 1279 | "options": [ 1280 | { 1281 | "selected": true, 1282 | "text": "90", 1283 | "value": "90" 1284 | } 1285 | ], 1286 | "query": "90", 1287 | "type": "textbox" 1288 | }, 1289 | { 1290 | "current": { 1291 | "text": "95", 1292 | "value": "95" 1293 | }, 1294 | "label": "CPU max (°C)", 1295 | "name": "cpu_max", 1296 | "options": [ 1297 | { 1298 | "selected": true, 1299 | "text": "95", 1300 | "value": "95" 1301 | } 1302 | ], 1303 | "query": "95", 1304 | "type": "textbox" 1305 | }, 1306 | { 1307 | "current": { 1308 | "text": "80", 1309 | "value": "80" 1310 | }, 1311 | "label": "GPU normal max (°C)", 1312 | "name": "gpu_normal_max", 1313 | "options": [ 1314 | { 1315 | "selected": true, 1316 | "text": "80", 1317 | "value": "80" 1318 | } 1319 | ], 1320 | "query": "80", 1321 | "type": "textbox" 1322 | }, 1323 | { 1324 | "current": { 1325 | "text": "85", 1326 | "value": "85" 1327 | }, 1328 | "label": "GPU warn (°C)", 1329 | "name": "gpu_warn", 1330 | "options": [ 1331 | { 1332 | "selected": true, 1333 | "text": "85", 1334 | "value": "85" 1335 | } 1336 | ], 1337 | "query": "85", 1338 | "type": "textbox" 1339 | }, 1340 | { 1341 | "current": { 1342 | "text": "90", 1343 | "value": "90" 1344 | }, 1345 | "label": "GPU red (°C)", 1346 | "name": "gpu_red", 1347 | "options": [ 1348 | { 1349 | "selected": true, 1350 | "text": "90", 1351 | "value": "90" 1352 | } 1353 | ], 1354 | "query": "90", 1355 | "type": "textbox" 1356 | }, 1357 | { 1358 | "current": { 1359 | "text": "95", 1360 | "value": "95" 1361 | }, 1362 | "label": "GPU max (°C)", 1363 | "name": "gpu_max", 1364 | "options": [ 1365 | { 1366 | "selected": true, 1367 | "text": "95", 1368 | "value": "95" 1369 | } 1370 | ], 1371 | "query": "95", 1372 | "type": "textbox" 1373 | }, 1374 | { 1375 | "current": { 1376 | "text": "45", 1377 | "value": "45" 1378 | }, 1379 | "label": "Drive normal max (°C)", 1380 | "name": "hdd_normal_max", 1381 | "options": [ 1382 | { 1383 | "selected": true, 1384 | "text": "45", 1385 | "value": "45" 1386 | } 1387 | ], 1388 | "query": "45", 1389 | "type": "textbox" 1390 | }, 1391 | { 1392 | "current": { 1393 | "text": "50", 1394 | "value": "50" 1395 | }, 1396 | "label": "Drive warn (°C)", 1397 | "name": "hdd_warn", 1398 | "options": [ 1399 | { 1400 | "selected": true, 1401 | "text": "50", 1402 | "value": "50" 1403 | } 1404 | ], 1405 | "query": "50", 1406 | "type": "textbox" 1407 | }, 1408 | { 1409 | "current": { 1410 | "text": "55", 1411 | "value": "55" 1412 | }, 1413 | "label": "Drive red (°C)", 1414 | "name": "hdd_red", 1415 | "options": [ 1416 | { 1417 | "selected": true, 1418 | "text": "55", 1419 | "value": "55" 1420 | } 1421 | ], 1422 | "query": "55", 1423 | "type": "textbox" 1424 | }, 1425 | { 1426 | "current": { 1427 | "text": "60", 1428 | "value": "60" 1429 | }, 1430 | "label": "Drive max (°C)", 1431 | "name": "hdd_max", 1432 | "options": [ 1433 | { 1434 | "selected": true, 1435 | "text": "60", 1436 | "value": "60" 1437 | } 1438 | ], 1439 | "query": "60", 1440 | "type": "textbox" 1441 | } 1442 | ] 1443 | }, 1444 | "time": { 1445 | "from": "now-6h", 1446 | "to": "now" 1447 | }, 1448 | "timepicker": {}, 1449 | "timezone": "", 1450 | "title": "Thermals Dashboard", 1451 | "uid": "QIA3UR57z", 1452 | "version": 11 1453 | } -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/plex.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": { 7 | "type": "grafana", 8 | "uid": "-- Grafana --" 9 | }, 10 | "enable": true, 11 | "hide": true, 12 | "iconColor": "rgba(0, 211, 255, 1)", 13 | "name": "Annotations & Alerts", 14 | "type": "dashboard" 15 | } 16 | ] 17 | }, 18 | "editable": false, 19 | "fiscalYearStartMonth": 0, 20 | "graphTooltip": 0, 21 | "id": 2, 22 | "links": [], 23 | "panels": [ 24 | { 25 | "collapsed": false, 26 | "gridPos": { 27 | "h": 1, 28 | "w": 24, 29 | "x": 0, 30 | "y": 0 31 | }, 32 | "id": 2, 33 | "panels": [], 34 | "repeat": "server", 35 | "title": "$server", 36 | "type": "row" 37 | }, 38 | { 39 | "datasource": { 40 | "uid": "$datasource" 41 | }, 42 | "fieldConfig": { 43 | "defaults": { 44 | "links": [], 45 | "mappings": [], 46 | "thresholds": { 47 | "mode": "absolute", 48 | "steps": [] 49 | }, 50 | "unit": "none" 51 | }, 52 | "overrides": [] 53 | }, 54 | "gridPos": { 55 | "h": 4, 56 | "w": 6, 57 | "x": 0, 58 | "y": 1 59 | }, 60 | "id": 3, 61 | "options": { 62 | "colorMode": "background", 63 | "graphMode": "none", 64 | "justifyMode": "auto", 65 | "orientation": "auto", 66 | "percentChangeColorMode": "standard", 67 | "reduceOptions": { 68 | "calcs": [ 69 | "mean" 70 | ], 71 | "fields": "", 72 | "values": false 73 | }, 74 | "showPercentChange": false, 75 | "textMode": "name", 76 | "wideLayout": true 77 | }, 78 | "pluginVersion": "12.2.0-17027759091", 79 | "targets": [ 80 | { 81 | "datasource": { 82 | "uid": "$datasource" 83 | }, 84 | "expr": "server_info{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}", 85 | "format": "time_series", 86 | "intervalFactor": 2, 87 | "legendFormat": "{{platform}} - {{platform_version}}", 88 | "refId": "A" 89 | } 90 | ], 91 | "title": "Platform Version", 92 | "type": "stat" 93 | }, 94 | { 95 | "datasource": { 96 | "uid": "$datasource" 97 | }, 98 | "description": "Only available on Plex servers with PlexPass", 99 | "fieldConfig": { 100 | "defaults": { 101 | "links": [], 102 | "mappings": [], 103 | "max": 100, 104 | "min": 0, 105 | "thresholds": { 106 | "mode": "absolute", 107 | "steps": [ 108 | { 109 | "color": "green", 110 | "value": 0 111 | }, 112 | { 113 | "color": "yellow", 114 | "value": 70 115 | }, 116 | { 117 | "color": "red", 118 | "value": 90 119 | } 120 | ] 121 | }, 122 | "unit": "percent" 123 | }, 124 | "overrides": [] 125 | }, 126 | "gridPos": { 127 | "h": 4, 128 | "w": 3, 129 | "x": 6, 130 | "y": 1 131 | }, 132 | "id": 4, 133 | "options": { 134 | "colorMode": "value", 135 | "graphMode": "none", 136 | "justifyMode": "auto", 137 | "orientation": "auto", 138 | "percentChangeColorMode": "standard", 139 | "reduceOptions": { 140 | "calcs": [ 141 | "last" 142 | ], 143 | "fields": "", 144 | "values": false 145 | }, 146 | "showPercentChange": false, 147 | "textMode": "auto", 148 | "wideLayout": true 149 | }, 150 | "pluginVersion": "12.2.0-17027759091", 151 | "targets": [ 152 | { 153 | "datasource": { 154 | "uid": "$datasource" 155 | }, 156 | "expr": "host_cpu_util{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}", 157 | "format": "time_series", 158 | "intervalFactor": 2, 159 | "legendFormat": "{{server}}", 160 | "refId": "A" 161 | } 162 | ], 163 | "title": "Host CPU Utilization by Server", 164 | "type": "stat" 165 | }, 166 | { 167 | "datasource": { 168 | "uid": "$datasource" 169 | }, 170 | "fieldConfig": { 171 | "defaults": { 172 | "color": { 173 | "fixedColor": "light-blue", 174 | "mode": "fixed" 175 | }, 176 | "links": [], 177 | "mappings": [], 178 | "thresholds": { 179 | "mode": "absolute", 180 | "steps": [] 181 | }, 182 | "unit": "ms" 183 | }, 184 | "overrides": [] 185 | }, 186 | "gridPos": { 187 | "h": 4, 188 | "w": 15, 189 | "x": 9, 190 | "y": 1 191 | }, 192 | "id": 5, 193 | "options": { 194 | "colorMode": "background", 195 | "graphMode": "none", 196 | "justifyMode": "auto", 197 | "orientation": "auto", 198 | "percentChangeColorMode": "standard", 199 | "reduceOptions": { 200 | "calcs": [ 201 | "max" 202 | ], 203 | "fields": "", 204 | "values": false 205 | }, 206 | "showPercentChange": false, 207 | "textMode": "auto", 208 | "wideLayout": true 209 | }, 210 | "pluginVersion": "12.2.0-17027759091", 211 | "targets": [ 212 | { 213 | "datasource": { 214 | "uid": "$datasource" 215 | }, 216 | "expr": "sum(library_duration_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}) by (library)", 217 | "format": "time_series", 218 | "intervalFactor": 2, 219 | "legendFormat": "{{library}}", 220 | "refId": "A" 221 | } 222 | ], 223 | "title": "Library Duration", 224 | "type": "stat" 225 | }, 226 | { 227 | "datasource": { 228 | "uid": "$datasource" 229 | }, 230 | "fieldConfig": { 231 | "defaults": { 232 | "links": [], 233 | "mappings": [], 234 | "thresholds": { 235 | "mode": "absolute", 236 | "steps": [] 237 | }, 238 | "unit": "none" 239 | }, 240 | "overrides": [] 241 | }, 242 | "gridPos": { 243 | "h": 4, 244 | "w": 6, 245 | "x": 0, 246 | "y": 5 247 | }, 248 | "id": 6, 249 | "options": { 250 | "colorMode": "background", 251 | "graphMode": "none", 252 | "justifyMode": "auto", 253 | "orientation": "auto", 254 | "percentChangeColorMode": "standard", 255 | "reduceOptions": { 256 | "calcs": [ 257 | "mean" 258 | ], 259 | "fields": "", 260 | "values": false 261 | }, 262 | "showPercentChange": false, 263 | "textMode": "name", 264 | "wideLayout": true 265 | }, 266 | "pluginVersion": "12.2.0-17027759091", 267 | "targets": [ 268 | { 269 | "datasource": { 270 | "uid": "$datasource" 271 | }, 272 | "expr": "server_info{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}", 273 | "format": "time_series", 274 | "intervalFactor": 2, 275 | "legendFormat": "{{version}}", 276 | "refId": "A" 277 | } 278 | ], 279 | "title": "Plex Version", 280 | "type": "stat" 281 | }, 282 | { 283 | "datasource": { 284 | "uid": "$datasource" 285 | }, 286 | "description": "Only available on Plex servers with PlexPass", 287 | "fieldConfig": { 288 | "defaults": { 289 | "links": [], 290 | "mappings": [], 291 | "max": 100, 292 | "min": 0, 293 | "thresholds": { 294 | "mode": "absolute", 295 | "steps": [ 296 | { 297 | "color": "green", 298 | "value": 0 299 | }, 300 | { 301 | "color": "yellow", 302 | "value": 70 303 | }, 304 | { 305 | "color": "red", 306 | "value": 90 307 | } 308 | ] 309 | }, 310 | "unit": "percent" 311 | }, 312 | "overrides": [] 313 | }, 314 | "gridPos": { 315 | "h": 4, 316 | "w": 3, 317 | "x": 6, 318 | "y": 5 319 | }, 320 | "id": 7, 321 | "options": { 322 | "colorMode": "value", 323 | "graphMode": "none", 324 | "justifyMode": "auto", 325 | "orientation": "auto", 326 | "percentChangeColorMode": "standard", 327 | "reduceOptions": { 328 | "calcs": [ 329 | "last" 330 | ], 331 | "fields": "", 332 | "values": false 333 | }, 334 | "showPercentChange": false, 335 | "textMode": "auto", 336 | "wideLayout": true 337 | }, 338 | "pluginVersion": "12.2.0-17027759091", 339 | "targets": [ 340 | { 341 | "datasource": { 342 | "uid": "$datasource" 343 | }, 344 | "expr": "host_mem_util{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}", 345 | "format": "time_series", 346 | "intervalFactor": 2, 347 | "legendFormat": "{{server}}", 348 | "refId": "A" 349 | } 350 | ], 351 | "title": "Host Memory Utilization by Server", 352 | "type": "stat" 353 | }, 354 | { 355 | "datasource": { 356 | "uid": "$datasource" 357 | }, 358 | "fieldConfig": { 359 | "defaults": { 360 | "color": { 361 | "fixedColor": "light-purple", 362 | "mode": "fixed" 363 | }, 364 | "links": [], 365 | "mappings": [], 366 | "thresholds": { 367 | "mode": "absolute", 368 | "steps": [] 369 | }, 370 | "unit": "bytes" 371 | }, 372 | "overrides": [] 373 | }, 374 | "gridPos": { 375 | "h": 4, 376 | "w": 15, 377 | "x": 9, 378 | "y": 5 379 | }, 380 | "id": 8, 381 | "options": { 382 | "colorMode": "background", 383 | "graphMode": "none", 384 | "justifyMode": "auto", 385 | "orientation": "auto", 386 | "percentChangeColorMode": "standard", 387 | "reduceOptions": { 388 | "calcs": [ 389 | "max" 390 | ], 391 | "fields": "", 392 | "values": false 393 | }, 394 | "showPercentChange": false, 395 | "textMode": "auto", 396 | "wideLayout": true 397 | }, 398 | "pluginVersion": "12.2.0-17027759091", 399 | "targets": [ 400 | { 401 | "datasource": { 402 | "uid": "$datasource" 403 | }, 404 | "expr": "sum(library_storage_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}) by (library)", 405 | "format": "time_series", 406 | "intervalFactor": 2, 407 | "legendFormat": "{{library}}", 408 | "refId": "A" 409 | } 410 | ], 411 | "title": "Library Storage", 412 | "type": "stat" 413 | }, 414 | { 415 | "datasource": { 416 | "uid": "$datasource" 417 | }, 418 | "fieldConfig": { 419 | "defaults": { 420 | "color": { 421 | "mode": "palette-classic" 422 | }, 423 | "custom": { 424 | "axisBorderShow": false, 425 | "axisCenteredZero": false, 426 | "axisColorMode": "text", 427 | "axisLabel": "", 428 | "axisPlacement": "auto", 429 | "barAlignment": 0, 430 | "barWidthFactor": 0.6, 431 | "drawStyle": "line", 432 | "fillOpacity": 10, 433 | "gradientMode": "none", 434 | "hideFrom": { 435 | "legend": false, 436 | "tooltip": false, 437 | "viz": false 438 | }, 439 | "insertNulls": false, 440 | "lineInterpolation": "linear", 441 | "lineWidth": 1, 442 | "pointSize": 5, 443 | "scaleDistribution": { 444 | "type": "linear" 445 | }, 446 | "showPoints": "auto", 447 | "spanNulls": false, 448 | "stacking": { 449 | "group": "A", 450 | "mode": "none" 451 | }, 452 | "thresholdsStyle": { 453 | "mode": "off" 454 | } 455 | }, 456 | "mappings": [], 457 | "thresholds": { 458 | "mode": "absolute", 459 | "steps": [ 460 | { 461 | "color": "green", 462 | "value": 0 463 | }, 464 | { 465 | "color": "red", 466 | "value": 80 467 | } 468 | ] 469 | }, 470 | "unit": "bps" 471 | }, 472 | "overrides": [] 473 | }, 474 | "gridPos": { 475 | "h": 7, 476 | "w": 24, 477 | "x": 0, 478 | "y": 9 479 | }, 480 | "id": 9, 481 | "options": { 482 | "legend": { 483 | "calcs": [], 484 | "displayMode": "list", 485 | "placement": "bottom", 486 | "showLegend": true 487 | }, 488 | "tooltip": { 489 | "hideZeros": false, 490 | "mode": "single", 491 | "sort": "none" 492 | } 493 | }, 494 | "pluginVersion": "12.2.0-17027759091", 495 | "targets": [ 496 | { 497 | "datasource": { 498 | "uid": "$datasource" 499 | }, 500 | "expr": "rate(transmit_bytes_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__rate_interval])", 501 | "format": "time_series", 502 | "intervalFactor": 2, 503 | "legendFormat": "Network", 504 | "refId": "A" 505 | }, 506 | { 507 | "datasource": { 508 | "uid": "$datasource" 509 | }, 510 | "expr": "rate(estimated_transmit_bytes_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__rate_interval])", 511 | "format": "time_series", 512 | "intervalFactor": 2, 513 | "legendFormat": "Network Est.", 514 | "refId": "B" 515 | } 516 | ], 517 | "title": "Network Utilization", 518 | "type": "timeseries" 519 | }, 520 | { 521 | "collapsed": false, 522 | "gridPos": { 523 | "h": 1, 524 | "w": 24, 525 | "x": 0, 526 | "y": 16 527 | }, 528 | "id": 10, 529 | "panels": [], 530 | "title": "Duration", 531 | "type": "row" 532 | }, 533 | { 534 | "datasource": { 535 | "uid": "$datasource" 536 | }, 537 | "fieldConfig": { 538 | "defaults": { 539 | "color": { 540 | "mode": "palette-classic" 541 | }, 542 | "custom": { 543 | "axisBorderShow": false, 544 | "axisCenteredZero": false, 545 | "axisColorMode": "text", 546 | "axisLabel": "", 547 | "axisPlacement": "auto", 548 | "barAlignment": 0, 549 | "barWidthFactor": 0.6, 550 | "drawStyle": "line", 551 | "fillOpacity": 10, 552 | "gradientMode": "none", 553 | "hideFrom": { 554 | "legend": false, 555 | "tooltip": false, 556 | "viz": false 557 | }, 558 | "insertNulls": false, 559 | "lineInterpolation": "linear", 560 | "lineWidth": 1, 561 | "pointSize": 5, 562 | "scaleDistribution": { 563 | "type": "linear" 564 | }, 565 | "showPoints": "never", 566 | "spanNulls": false, 567 | "stacking": { 568 | "group": "A", 569 | "mode": "none" 570 | }, 571 | "thresholdsStyle": { 572 | "mode": "off" 573 | } 574 | }, 575 | "mappings": [], 576 | "thresholds": { 577 | "mode": "absolute", 578 | "steps": [ 579 | { 580 | "color": "green", 581 | "value": 0 582 | }, 583 | { 584 | "color": "red", 585 | "value": 80 586 | } 587 | ] 588 | }, 589 | "unit": "s" 590 | }, 591 | "overrides": [] 592 | }, 593 | "gridPos": { 594 | "h": 7, 595 | "w": 24, 596 | "x": 0, 597 | "y": 17 598 | }, 599 | "id": 11, 600 | "options": { 601 | "legend": { 602 | "calcs": [], 603 | "displayMode": "list", 604 | "placement": "bottom", 605 | "showLegend": true 606 | }, 607 | "tooltip": { 608 | "hideZeros": false, 609 | "mode": "single", 610 | "sort": "none" 611 | } 612 | }, 613 | "pluginVersion": "12.2.0-17027759091", 614 | "targets": [ 615 | { 616 | "datasource": { 617 | "uid": "$datasource" 618 | }, 619 | "expr": "sum(max_over_time(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[24h])) by (library_type)", 620 | "format": "time_series", 621 | "interval": "1d", 622 | "intervalFactor": 1, 623 | "legendFormat": "{{library_type}}", 624 | "refId": "A" 625 | } 626 | ], 627 | "title": "Duration", 628 | "type": "timeseries" 629 | }, 630 | { 631 | "datasource": { 632 | "uid": "$datasource" 633 | }, 634 | "fieldConfig": { 635 | "defaults": { 636 | "color": { 637 | "mode": "palette-classic" 638 | }, 639 | "custom": { 640 | "axisBorderShow": false, 641 | "axisCenteredZero": false, 642 | "axisColorMode": "text", 643 | "axisLabel": "", 644 | "axisPlacement": "auto", 645 | "fillOpacity": 80, 646 | "gradientMode": "none", 647 | "hideFrom": { 648 | "legend": false, 649 | "tooltip": false, 650 | "viz": false 651 | }, 652 | "lineWidth": 1, 653 | "scaleDistribution": { 654 | "type": "linear" 655 | }, 656 | "thresholdsStyle": { 657 | "mode": "off" 658 | } 659 | }, 660 | "mappings": [], 661 | "thresholds": { 662 | "mode": "absolute", 663 | "steps": [] 664 | }, 665 | "unit": "s" 666 | }, 667 | "overrides": [] 668 | }, 669 | "gridPos": { 670 | "h": 7, 671 | "w": 12, 672 | "x": 0, 673 | "y": 24 674 | }, 675 | "id": 12, 676 | "options": { 677 | "barRadius": 0, 678 | "barWidth": 0.97, 679 | "fullHighlight": false, 680 | "groupWidth": 0.7, 681 | "legend": { 682 | "calcs": [], 683 | "displayMode": "list", 684 | "placement": "bottom", 685 | "showLegend": true 686 | }, 687 | "orientation": "auto", 688 | "reduceOptions": { 689 | "calcs": [ 690 | "max" 691 | ] 692 | }, 693 | "showValue": "never", 694 | "stacking": "normal", 695 | "tooltip": { 696 | "hideZeros": false, 697 | "mode": "single", 698 | "sort": "none" 699 | }, 700 | "xField": "dow\\media_type", 701 | "xTickLabelRotation": 0, 702 | "xTickLabelSpacing": 0 703 | }, 704 | "pluginVersion": "12.2.0-17027759091", 705 | "targets": [ 706 | { 707 | "datasource": { 708 | "uid": "$datasource" 709 | }, 710 | "expr": "sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type) * ignoring(day,dow) group_right\n\n label_replace( \n label_replace( \n label_replace( \n label_replace( \n label_replace( \n label_replace( \n label_replace( \n count_values without() (\"day\", day_of_week(timestamp(\n sum(increase( \n play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"} \n [$__interval])) by (media_type)\n )\n ))\n ,\"dow\",\"Sunday\",\"day\",\"0\")\n ,\"dow\",\"Monday\",\"day\",\"1\")\n ,\"dow\",\"Tuesday\",\"day\",\"2\")\n ,\"dow\",\"Wednesday\",\"day\",\"3\")\n ,\"dow\",\"Thursday\",\"day\",\"4\")\n ,\"dow\",\"Friday\",\"day\",\"5\")\n ,\"dow\",\"Saturday\",\"day\",\"6\")\n", 711 | "format": "time_series", 712 | "interval": "5m", 713 | "intervalFactor": 2, 714 | "legendFormat": "", 715 | "refId": "A" 716 | } 717 | ], 718 | "title": "Duration by day of week", 719 | "transformations": [ 720 | { 721 | "id": "reduce", 722 | "options": { 723 | "labelsToFields": true, 724 | "reducers": [ 725 | "sum" 726 | ] 727 | } 728 | }, 729 | { 730 | "id": "groupingToMatrix", 731 | "options": { 732 | "columnField": "media_type", 733 | "rowField": "dow", 734 | "valueField": "Total" 735 | } 736 | } 737 | ], 738 | "type": "barchart" 739 | }, 740 | { 741 | "datasource": { 742 | "uid": "$datasource" 743 | }, 744 | "fieldConfig": { 745 | "defaults": { 746 | "color": { 747 | "mode": "palette-classic" 748 | }, 749 | "custom": { 750 | "axisBorderShow": false, 751 | "axisCenteredZero": false, 752 | "axisColorMode": "text", 753 | "axisLabel": "", 754 | "axisPlacement": "auto", 755 | "fillOpacity": 80, 756 | "gradientMode": "none", 757 | "hideFrom": { 758 | "legend": false, 759 | "tooltip": false, 760 | "viz": false 761 | }, 762 | "lineWidth": 1, 763 | "scaleDistribution": { 764 | "type": "linear" 765 | }, 766 | "thresholdsStyle": { 767 | "mode": "off" 768 | } 769 | }, 770 | "mappings": [], 771 | "thresholds": { 772 | "mode": "absolute", 773 | "steps": [] 774 | }, 775 | "unit": "s" 776 | }, 777 | "overrides": [] 778 | }, 779 | "gridPos": { 780 | "h": 7, 781 | "w": 12, 782 | "x": 12, 783 | "y": 24 784 | }, 785 | "id": 13, 786 | "options": { 787 | "barRadius": 0, 788 | "barWidth": 0.97, 789 | "fullHighlight": false, 790 | "groupWidth": 0.7, 791 | "legend": { 792 | "calcs": [], 793 | "displayMode": "list", 794 | "placement": "bottom", 795 | "showLegend": true 796 | }, 797 | "orientation": "auto", 798 | "reduceOptions": { 799 | "calcs": [ 800 | "max" 801 | ] 802 | }, 803 | "showValue": "auto", 804 | "stacking": "normal", 805 | "tooltip": { 806 | "hideZeros": false, 807 | "mode": "single", 808 | "sort": "none" 809 | }, 810 | "xField": "hour\\media_type", 811 | "xTickLabelRotation": 0, 812 | "xTickLabelSpacing": 0 813 | }, 814 | "pluginVersion": "12.2.0-17027759091", 815 | "targets": [ 816 | { 817 | "datasource": { 818 | "uid": "$datasource" 819 | }, 820 | "expr": "sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type) * ignoring(hour) group_right\n count_values without() (\"hour\", hour(timestamp(\n sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type)\n )\n )\n)\n", 821 | "format": "time_series", 822 | "interval": "5m", 823 | "intervalFactor": 2, 824 | "legendFormat": "", 825 | "refId": "A" 826 | } 827 | ], 828 | "title": "Duration by hour of day", 829 | "transformations": [ 830 | { 831 | "id": "labelsToFields", 832 | "options": { 833 | "mode": "columns" 834 | } 835 | }, 836 | { 837 | "id": "merge", 838 | "options": {} 839 | }, 840 | { 841 | "id": "merge", 842 | "options": {} 843 | }, 844 | { 845 | "id": "groupBy", 846 | "options": { 847 | "fields": { 848 | "Value": { 849 | "aggregations": [ 850 | "sum" 851 | ], 852 | "operation": "aggregate" 853 | }, 854 | "day": { 855 | "aggregations": [], 856 | "operation": "groupby" 857 | }, 858 | "hour": { 859 | "aggregations": [], 860 | "operation": "groupby" 861 | }, 862 | "media_type": { 863 | "aggregations": [], 864 | "operation": "groupby" 865 | } 866 | } 867 | } 868 | }, 869 | { 870 | "id": "groupingToMatrix", 871 | "options": { 872 | "columnField": "media_type", 873 | "rowField": "hour", 874 | "valueField": "Value (sum)" 875 | } 876 | }, 877 | { 878 | "id": "convertFieldType", 879 | "options": { 880 | "conversions": [ 881 | { 882 | "dateFormat": "hh", 883 | "destinationType": "time", 884 | "targetField": "hour\\media_type" 885 | } 886 | ], 887 | "fields": {} 888 | } 889 | } 890 | ], 891 | "type": "barchart" 892 | }, 893 | { 894 | "datasource": { 895 | "uid": "$datasource" 896 | }, 897 | "fieldConfig": { 898 | "defaults": { 899 | "color": { 900 | "mode": "palette-classic" 901 | }, 902 | "custom": { 903 | "axisBorderShow": false, 904 | "axisCenteredZero": false, 905 | "axisColorMode": "text", 906 | "axisLabel": "", 907 | "axisPlacement": "auto", 908 | "fillOpacity": 80, 909 | "gradientMode": "none", 910 | "hideFrom": { 911 | "legend": false, 912 | "tooltip": false, 913 | "viz": false 914 | }, 915 | "lineWidth": 1, 916 | "scaleDistribution": { 917 | "type": "linear" 918 | }, 919 | "thresholdsStyle": { 920 | "mode": "off" 921 | } 922 | }, 923 | "mappings": [], 924 | "thresholds": { 925 | "mode": "absolute", 926 | "steps": [] 927 | }, 928 | "unit": "s" 929 | }, 930 | "overrides": [] 931 | }, 932 | "gridPos": { 933 | "h": 7, 934 | "w": 8, 935 | "x": 0, 936 | "y": 31 937 | }, 938 | "id": 14, 939 | "options": { 940 | "barRadius": 0, 941 | "barWidth": 0.97, 942 | "fullHighlight": false, 943 | "groupWidth": 0.7, 944 | "legend": { 945 | "calcs": [], 946 | "displayMode": "list", 947 | "placement": "bottom", 948 | "showLegend": true 949 | }, 950 | "orientation": "horizontal", 951 | "reduceOptions": { 952 | "calcs": [ 953 | "max" 954 | ] 955 | }, 956 | "showValue": "never", 957 | "stacking": "normal", 958 | "tooltip": { 959 | "hideZeros": false, 960 | "mode": "single", 961 | "sort": "none" 962 | }, 963 | "xField": "title\\media_type", 964 | "xTickLabelRotation": 0, 965 | "xTickLabelSpacing": 0 966 | }, 967 | "pluginVersion": "12.2.0-17027759091", 968 | "targets": [ 969 | { 970 | "datasource": { 971 | "uid": "$datasource" 972 | }, 973 | "expr": "sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type, title)", 974 | "format": "time_series", 975 | "interval": "5m", 976 | "intervalFactor": 2, 977 | "legendFormat": "{{title}}", 978 | "refId": "A" 979 | } 980 | ], 981 | "title": "Top 10 Titles by duration", 982 | "transformations": [ 983 | { 984 | "id": "reduce", 985 | "options": { 986 | "labelsToFields": true, 987 | "reducers": [ 988 | "sum" 989 | ] 990 | } 991 | }, 992 | { 993 | "id": "sortBy", 994 | "options": { 995 | "fields": {}, 996 | "sort": [ 997 | { 998 | "desc": true, 999 | "field": "Total" 1000 | } 1001 | ] 1002 | } 1003 | }, 1004 | { 1005 | "id": "limit", 1006 | "options": {} 1007 | }, 1008 | { 1009 | "id": "groupingToMatrix", 1010 | "options": { 1011 | "columnField": "media_type", 1012 | "rowField": "title", 1013 | "valueField": "Total" 1014 | } 1015 | } 1016 | ], 1017 | "type": "barchart" 1018 | }, 1019 | { 1020 | "datasource": { 1021 | "uid": "$datasource" 1022 | }, 1023 | "fieldConfig": { 1024 | "defaults": { 1025 | "color": { 1026 | "mode": "palette-classic" 1027 | }, 1028 | "custom": { 1029 | "axisBorderShow": false, 1030 | "axisCenteredZero": false, 1031 | "axisColorMode": "text", 1032 | "axisLabel": "", 1033 | "axisPlacement": "auto", 1034 | "fillOpacity": 80, 1035 | "gradientMode": "none", 1036 | "hideFrom": { 1037 | "legend": false, 1038 | "tooltip": false, 1039 | "viz": false 1040 | }, 1041 | "lineWidth": 1, 1042 | "scaleDistribution": { 1043 | "type": "linear" 1044 | }, 1045 | "thresholdsStyle": { 1046 | "mode": "off" 1047 | } 1048 | }, 1049 | "mappings": [], 1050 | "thresholds": { 1051 | "mode": "absolute", 1052 | "steps": [] 1053 | }, 1054 | "unit": "s" 1055 | }, 1056 | "overrides": [] 1057 | }, 1058 | "gridPos": { 1059 | "h": 7, 1060 | "w": 8, 1061 | "x": 8, 1062 | "y": 31 1063 | }, 1064 | "id": 15, 1065 | "options": { 1066 | "barRadius": 0, 1067 | "barWidth": 0.97, 1068 | "fullHighlight": false, 1069 | "groupWidth": 0.7, 1070 | "legend": { 1071 | "calcs": [], 1072 | "displayMode": "list", 1073 | "placement": "bottom", 1074 | "showLegend": true 1075 | }, 1076 | "orientation": "horizontal", 1077 | "reduceOptions": { 1078 | "calcs": [ 1079 | "max" 1080 | ] 1081 | }, 1082 | "showValue": "never", 1083 | "stacking": "normal", 1084 | "tooltip": { 1085 | "hideZeros": false, 1086 | "mode": "single", 1087 | "sort": "none" 1088 | }, 1089 | "xField": "user\\media_type", 1090 | "xTickLabelRotation": 0, 1091 | "xTickLabelSpacing": 0 1092 | }, 1093 | "pluginVersion": "12.2.0-17027759091", 1094 | "targets": [ 1095 | { 1096 | "datasource": { 1097 | "uid": "$datasource" 1098 | }, 1099 | "expr": "sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type, user)", 1100 | "format": "time_series", 1101 | "interval": "5m", 1102 | "intervalFactor": 2, 1103 | "legendFormat": "{{user}}", 1104 | "refId": "A" 1105 | } 1106 | ], 1107 | "title": "Top 10 Users by duration", 1108 | "transformations": [ 1109 | { 1110 | "id": "reduce", 1111 | "options": { 1112 | "labelsToFields": true, 1113 | "reducers": [ 1114 | "sum" 1115 | ] 1116 | } 1117 | }, 1118 | { 1119 | "id": "sortBy", 1120 | "options": { 1121 | "fields": {}, 1122 | "sort": [ 1123 | { 1124 | "desc": true, 1125 | "field": "Total" 1126 | } 1127 | ] 1128 | } 1129 | }, 1130 | { 1131 | "id": "limit", 1132 | "options": {} 1133 | }, 1134 | { 1135 | "id": "groupingToMatrix", 1136 | "options": { 1137 | "columnField": "media_type", 1138 | "rowField": "user", 1139 | "valueField": "Total" 1140 | } 1141 | } 1142 | ], 1143 | "type": "barchart" 1144 | }, 1145 | { 1146 | "datasource": { 1147 | "uid": "$datasource" 1148 | }, 1149 | "fieldConfig": { 1150 | "defaults": { 1151 | "color": { 1152 | "mode": "palette-classic" 1153 | }, 1154 | "custom": { 1155 | "axisBorderShow": false, 1156 | "axisCenteredZero": false, 1157 | "axisColorMode": "text", 1158 | "axisLabel": "", 1159 | "axisPlacement": "auto", 1160 | "fillOpacity": 80, 1161 | "gradientMode": "none", 1162 | "hideFrom": { 1163 | "legend": false, 1164 | "tooltip": false, 1165 | "viz": false 1166 | }, 1167 | "lineWidth": 1, 1168 | "scaleDistribution": { 1169 | "type": "linear" 1170 | }, 1171 | "thresholdsStyle": { 1172 | "mode": "off" 1173 | } 1174 | }, 1175 | "mappings": [], 1176 | "thresholds": { 1177 | "mode": "absolute", 1178 | "steps": [] 1179 | }, 1180 | "unit": "s" 1181 | }, 1182 | "overrides": [] 1183 | }, 1184 | "gridPos": { 1185 | "h": 7, 1186 | "w": 8, 1187 | "x": 16, 1188 | "y": 31 1189 | }, 1190 | "id": 16, 1191 | "options": { 1192 | "barRadius": 0, 1193 | "barWidth": 0.97, 1194 | "fullHighlight": false, 1195 | "groupWidth": 0.7, 1196 | "legend": { 1197 | "calcs": [], 1198 | "displayMode": "list", 1199 | "placement": "bottom", 1200 | "showLegend": true 1201 | }, 1202 | "orientation": "horizontal", 1203 | "reduceOptions": { 1204 | "calcs": [ 1205 | "max" 1206 | ] 1207 | }, 1208 | "showValue": "never", 1209 | "stacking": "normal", 1210 | "tooltip": { 1211 | "hideZeros": false, 1212 | "mode": "single", 1213 | "sort": "none" 1214 | }, 1215 | "xField": "device_type\\media_type", 1216 | "xTickLabelRotation": 0, 1217 | "xTickLabelSpacing": 0 1218 | }, 1219 | "pluginVersion": "12.2.0-17027759091", 1220 | "targets": [ 1221 | { 1222 | "datasource": { 1223 | "uid": "$datasource" 1224 | }, 1225 | "expr": "sum(increase(play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\"}[$__interval])) by (media_type, device_type)", 1226 | "format": "time_series", 1227 | "interval": "5m", 1228 | "intervalFactor": 2, 1229 | "legendFormat": "{{device_type}}", 1230 | "refId": "A" 1231 | } 1232 | ], 1233 | "title": "Top 10 Platforms by duration", 1234 | "transformations": [ 1235 | { 1236 | "id": "reduce", 1237 | "options": { 1238 | "labelsToFields": true, 1239 | "reducers": [ 1240 | "sum" 1241 | ] 1242 | } 1243 | }, 1244 | { 1245 | "id": "sortBy", 1246 | "options": { 1247 | "fields": {}, 1248 | "sort": [ 1249 | { 1250 | "desc": true, 1251 | "field": "Total" 1252 | } 1253 | ] 1254 | } 1255 | }, 1256 | { 1257 | "id": "limit", 1258 | "options": {} 1259 | }, 1260 | { 1261 | "id": "groupingToMatrix", 1262 | "options": { 1263 | "columnField": "media_type", 1264 | "rowField": "device_type", 1265 | "valueField": "Total" 1266 | } 1267 | } 1268 | ], 1269 | "type": "barchart" 1270 | }, 1271 | { 1272 | "collapsed": false, 1273 | "gridPos": { 1274 | "h": 1, 1275 | "w": 24, 1276 | "x": 0, 1277 | "y": 38 1278 | }, 1279 | "id": 17, 1280 | "panels": [], 1281 | "title": "Streaming", 1282 | "type": "row" 1283 | }, 1284 | { 1285 | "datasource": { 1286 | "uid": "$datasource" 1287 | }, 1288 | "fieldConfig": { 1289 | "defaults": { 1290 | "color": { 1291 | "mode": "palette-classic" 1292 | }, 1293 | "custom": { 1294 | "axisBorderShow": false, 1295 | "axisCenteredZero": false, 1296 | "axisColorMode": "text", 1297 | "axisLabel": "", 1298 | "axisPlacement": "auto", 1299 | "fillOpacity": 80, 1300 | "gradientMode": "none", 1301 | "hideFrom": { 1302 | "legend": false, 1303 | "tooltip": false, 1304 | "viz": false 1305 | }, 1306 | "lineWidth": 1, 1307 | "scaleDistribution": { 1308 | "type": "linear" 1309 | }, 1310 | "thresholdsStyle": { 1311 | "mode": "off" 1312 | } 1313 | }, 1314 | "mappings": [], 1315 | "thresholds": { 1316 | "mode": "absolute", 1317 | "steps": [] 1318 | }, 1319 | "unit": "s" 1320 | }, 1321 | "overrides": [] 1322 | }, 1323 | "gridPos": { 1324 | "h": 7, 1325 | "w": 12, 1326 | "x": 0, 1327 | "y": 39 1328 | }, 1329 | "id": 18, 1330 | "options": { 1331 | "barRadius": 0, 1332 | "barWidth": 0.97, 1333 | "fullHighlight": false, 1334 | "groupWidth": 0.7, 1335 | "legend": { 1336 | "calcs": [], 1337 | "displayMode": "list", 1338 | "placement": "bottom", 1339 | "showLegend": true 1340 | }, 1341 | "orientation": "auto", 1342 | "reduceOptions": { 1343 | "calcs": [ 1344 | "max" 1345 | ] 1346 | }, 1347 | "showValue": "never", 1348 | "stacking": "normal", 1349 | "tooltip": { 1350 | "hideZeros": false, 1351 | "mode": "single", 1352 | "sort": "none" 1353 | }, 1354 | "xTickLabelRotation": 0, 1355 | "xTickLabelSpacing": 0 1356 | }, 1357 | "pluginVersion": "12.2.0-17027759091", 1358 | "targets": [ 1359 | { 1360 | "datasource": { 1361 | "uid": "$datasource" 1362 | }, 1363 | "expr": "sum(increase(\n label_replace(\n label_replace(\n play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\",stream_type!=\"\"}\n , \"res\", \"$1\", \"stream_file_resolution\", \"(.*)\")\n , \"res\", \"${1}p\", \"stream_file_resolution\", \"^([0-9]+)$\")\n \n[$__interval:])) by (stream_type, res)\n", 1364 | "format": "time_series", 1365 | "interval": "5m", 1366 | "intervalFactor": 2, 1367 | "legendFormat": "{{res}}", 1368 | "refId": "A" 1369 | } 1370 | ], 1371 | "title": "Duration by source resolution", 1372 | "transformations": [ 1373 | { 1374 | "id": "reduce", 1375 | "options": { 1376 | "labelsToFields": true, 1377 | "reducers": [ 1378 | "sum" 1379 | ] 1380 | } 1381 | }, 1382 | { 1383 | "id": "sortBy", 1384 | "options": { 1385 | "fields": {}, 1386 | "sort": [ 1387 | { 1388 | "desc": true, 1389 | "field": "Total" 1390 | } 1391 | ] 1392 | } 1393 | }, 1394 | { 1395 | "id": "groupingToMatrix", 1396 | "options": { 1397 | "columnField": "stream_type", 1398 | "rowField": "res", 1399 | "valueField": "Total" 1400 | } 1401 | } 1402 | ], 1403 | "type": "barchart" 1404 | }, 1405 | { 1406 | "datasource": { 1407 | "uid": "$datasource" 1408 | }, 1409 | "fieldConfig": { 1410 | "defaults": { 1411 | "color": { 1412 | "mode": "palette-classic" 1413 | }, 1414 | "custom": { 1415 | "axisBorderShow": false, 1416 | "axisCenteredZero": false, 1417 | "axisColorMode": "text", 1418 | "axisLabel": "", 1419 | "axisPlacement": "auto", 1420 | "fillOpacity": 80, 1421 | "gradientMode": "none", 1422 | "hideFrom": { 1423 | "legend": false, 1424 | "tooltip": false, 1425 | "viz": false 1426 | }, 1427 | "lineWidth": 1, 1428 | "scaleDistribution": { 1429 | "type": "linear" 1430 | }, 1431 | "thresholdsStyle": { 1432 | "mode": "off" 1433 | } 1434 | }, 1435 | "mappings": [], 1436 | "thresholds": { 1437 | "mode": "absolute", 1438 | "steps": [] 1439 | }, 1440 | "unit": "s" 1441 | }, 1442 | "overrides": [] 1443 | }, 1444 | "gridPos": { 1445 | "h": 7, 1446 | "w": 12, 1447 | "x": 12, 1448 | "y": 39 1449 | }, 1450 | "id": 19, 1451 | "options": { 1452 | "barRadius": 0, 1453 | "barWidth": 0.97, 1454 | "fullHighlight": false, 1455 | "groupWidth": 0.7, 1456 | "legend": { 1457 | "calcs": [], 1458 | "displayMode": "list", 1459 | "placement": "bottom", 1460 | "showLegend": true 1461 | }, 1462 | "orientation": "auto", 1463 | "reduceOptions": { 1464 | "calcs": [ 1465 | "max" 1466 | ] 1467 | }, 1468 | "showValue": "never", 1469 | "stacking": "normal", 1470 | "tooltip": { 1471 | "hideZeros": false, 1472 | "mode": "single", 1473 | "sort": "none" 1474 | }, 1475 | "xTickLabelRotation": 0, 1476 | "xTickLabelSpacing": 0 1477 | }, 1478 | "pluginVersion": "12.2.0-17027759091", 1479 | "targets": [ 1480 | { 1481 | "datasource": { 1482 | "uid": "$datasource" 1483 | }, 1484 | "expr": "sum(increase(\n label_replace(\n label_replace(\n play_seconds_total{job=~\"$job\", instance=~\"$instance\", server=~\"$server\",stream_type!=\"\"}\n , \"res\", \"$1\", \"stream_resolution\", \"(.*)\")\n , \"res\", \"${1}p\", \"stream_resolution\", \"^([0-9]+)$\")\n \n[$__interval:])) by (stream_type, res)\n", 1485 | "format": "time_series", 1486 | "interval": "5m", 1487 | "intervalFactor": 2, 1488 | "legendFormat": "{{res}}", 1489 | "refId": "A" 1490 | } 1491 | ], 1492 | "title": "Duration by streamed resolution", 1493 | "transformations": [ 1494 | { 1495 | "id": "reduce", 1496 | "options": { 1497 | "labelsToFields": true, 1498 | "reducers": [ 1499 | "sum" 1500 | ] 1501 | } 1502 | }, 1503 | { 1504 | "id": "sortBy", 1505 | "options": { 1506 | "fields": {}, 1507 | "sort": [ 1508 | { 1509 | "desc": true, 1510 | "field": "Total" 1511 | } 1512 | ] 1513 | } 1514 | }, 1515 | { 1516 | "id": "groupingToMatrix", 1517 | "options": { 1518 | "columnField": "stream_type", 1519 | "rowField": "res", 1520 | "valueField": "Total" 1521 | } 1522 | } 1523 | ], 1524 | "type": "barchart" 1525 | } 1526 | ], 1527 | "preload": false, 1528 | "refresh": "auto", 1529 | "schemaVersion": 41, 1530 | "tags": [], 1531 | "templating": { 1532 | "list": [ 1533 | { 1534 | "current": { 1535 | "text": "default", 1536 | "value": "default" 1537 | }, 1538 | "includeAll": false, 1539 | "label": "Data Source", 1540 | "name": "datasource", 1541 | "options": [], 1542 | "query": "prometheus", 1543 | "refresh": 1, 1544 | "regex": "", 1545 | "type": "datasource" 1546 | }, 1547 | { 1548 | "allValue": ".+", 1549 | "current": { 1550 | "text": [ 1551 | "All" 1552 | ], 1553 | "value": [ 1554 | "$__all" 1555 | ] 1556 | }, 1557 | "datasource": { 1558 | "type": "prometheus", 1559 | "uid": "$datasource" 1560 | }, 1561 | "definition": "", 1562 | "includeAll": true, 1563 | "label": "job", 1564 | "multi": true, 1565 | "name": "job", 1566 | "options": [], 1567 | "query": "label_values(plays_total, job)", 1568 | "refresh": 1, 1569 | "regex": "", 1570 | "sort": 1, 1571 | "type": "query" 1572 | }, 1573 | { 1574 | "allValue": ".+", 1575 | "current": { 1576 | "text": [ 1577 | "All" 1578 | ], 1579 | "value": [ 1580 | "$__all" 1581 | ] 1582 | }, 1583 | "datasource": { 1584 | "type": "prometheus", 1585 | "uid": "$datasource" 1586 | }, 1587 | "definition": "", 1588 | "includeAll": true, 1589 | "label": "instance", 1590 | "multi": true, 1591 | "name": "instance", 1592 | "options": [], 1593 | "query": "label_values(plays_total{job=~\"$job\"}, instance)", 1594 | "refresh": 1, 1595 | "regex": "", 1596 | "sort": 1, 1597 | "type": "query" 1598 | }, 1599 | { 1600 | "allValue": ".+", 1601 | "current": { 1602 | "text": [ 1603 | "All" 1604 | ], 1605 | "value": [ 1606 | "$__all" 1607 | ] 1608 | }, 1609 | "datasource": { 1610 | "type": "prometheus", 1611 | "uid": "$datasource" 1612 | }, 1613 | "definition": "", 1614 | "includeAll": true, 1615 | "label": "server", 1616 | "multi": true, 1617 | "name": "server", 1618 | "options": [], 1619 | "query": "label_values(plays_total{job=~\"$job\", instance=~\"$instance\"}, server)", 1620 | "refresh": 1, 1621 | "regex": "", 1622 | "type": "query" 1623 | } 1624 | ] 1625 | }, 1626 | "time": { 1627 | "from": "now-7d", 1628 | "to": "now" 1629 | }, 1630 | "timepicker": {}, 1631 | "timezone": "browser", 1632 | "title": "Plex Dashboard", 1633 | "uid": "426b8c74a8a8d5403b4b3a29656c8342", 1634 | "version": 3 1635 | } --------------------------------------------------------------------------------