Grafana + Prometheus 监控PostgreSQL

 效果图

部署环境

服务器名称

IP地址

监控指标

部署agent

备注

sht-sgmhadoopcm-01

172.16.101.54

OS

node_exporter

监控服务器、被监控服务器

sht-sgmhadoopnn-01

172.16.101.55

OS

node_exporter

 被监控服务器

sht-sgmhadoopnn-02

172.16.101.56

OS

node_exporter

 被监控服务器

sht-sgmhadoopdn-01

172.16.101.58

OS

node_exporter

 被监控服务器

sht-sgmhadoopdn-02

172.16.101.59

OS

node_exporter

 被监控服务器

sht-sgmhadoopdn-03

172.16.101.60

OS

PostgreSQL

node_exporter

postgres_exporter

 被监控服务器

sht-sgmhadoopdn-04

172.16.101.66

OS

PostgreSQL

node_exporter

postgres_exporter

 被监控服务器

安装目录

grafana   /usr/local/grafana

prometheus /usr/local/prometheus

node_exporter /usr/local/prometheus/plugin

postgres_exporter /usr/local/prometheus/plugin/postgres_exporter

软件准备

  • grafana

          https://dl.grafana.com/oss/release/grafana-6.0.1.linux-amd64.tar.gz 

  • Prometheus

          https://github.com/prometheus/prometheus/releases/download/v2.8.0/prometheus-2.8.0.linux-amd64.tar.gz

  • Prometheus agent

  node_exporter

          https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz

          postgres_exporter

          https://github.com/wrouesnel/postgres_exporter

          https://github.com/wrouesnel/postgres_exporter/releases

一 安装步骤

1.监控服务器安装Grafana

1# tar -zxf grafana-6.0.1.linux-amd64.tar.gz 2# mv grafana-6.0.1/* . 3# rm -rf grafana-6.0.1*

 修改conf/defaults.ini文件部分参数如下

1data = /usr/local/grafana/data 2logs = /usr/local/grafana/data/log 3plugins = /usr/local/grafana/data/plugins 4provisioning = /usr/local/grafana/conf/provisioning

启动grafana

# bin/grafana-server &

 登录查看

默认账号密码admin/admin

2.监控服务器安装prometheus

1--web.enable-lifecycle 2 3作用:后期修改参数文件时不需要重启服务,可以通过api重新读取参数文件。 4 5# tar -zxf prometheus-2.8.0.linux-amd64.tar.gz 6# mv prometheus-2.8.0.linux-amd64/* . 7# rm -rf prometheus-2.8.0.linux-amd64* 8# ./prometheus --web.enable-lifecycle --web.enable-admin-api &

 登录查看

 

3. 各节点安装agent

   node_exporter

1# tar -zxf node_exporter-0.17.0.linux-amd64.tar.gz 2# mv node_exporter-0.17.0.linux-amd64 node_exporter 3# rm -rf node_exporter-0.17.0.linux-amd64.tar.gz 4# node_exporter/node_exporter &

postgres_exporter

该插件还未集成prometheus官网,需要从github下载.,分别下载源码文件,注意postgres_exporter二进制执行文件并不在该源码包里,需要单独下载。

源码 https://github.com/wrouesnel/postgres_exporter

二进制执行文件https://github.com/wrouesnel/postgres_exporter/releases

加入我自己定义的部分sql到custom.yaml文件

1# cp queries.yaml custom.yaml 2 3pg_stat_connetion: 4 query: "select state,count(*) from pg_stat_activity group by state" 5 metrics: 6 - state: 7 usage: "LABEL" 8 description: "type of session state" 9 - num: 10 usage: "GAUGE" 11 description: "type of session state" 12 13pg_stat_long: 14 query: "SELECT pid, runtime from (select usename, pid, EXTRACT(EPOCH FROM (now() - query_start))::INT as runtime FROM pg_stat_activity) as ss where runtime > 180 order by runtime desc limit 5" 15 metrics: 16 - pid: 17 usage: "LABEL" 18 description: "Pid of the client" 19 - runtime: 20 usage: "GAUGE" 21 description: "current transactrion start time"

 启动postgres_exporter

1# export DATA_SOURCE_NAME="postgresql://dbadmin:1qax2wse@172.16.101.54:5432/postgres?sslmode=disable" 2# export PG_EXPORTER_EXTEND_QUERY_PATH="/usr/local/prometheus/plugin/postgres_exporter/custom.yaml" 3# ./postgres_exporter &

 查看postgre_exporter

 4. prometheus添加agent节点

prometheus.yml

1# my global config 2global: 3 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. 4 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. 5 # scrape_timeout is set to the global default (10s). 6 7# Alertmanager configuration 8alerting: 9 alertmanagers: 10 - static_configs: 11 - targets: 12 # - alertmanager:9093 13 14# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. 15rule_files: 16 # - "first_rules.yml" 17 # - "second_rules.yml" 18 19# A scrape configuration containing exactly one endpoint to scrape: 20# Here it's Prometheus itself. 21scrape_configs: 22 # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. 23 24 25- job_name: 'promethus' 26 static_configs: 27 - targets: ['172.16.101.54:9090'] 28 labels: 29 instance: 'sht-sgmhadoopcm-01' 30 platform: 'sh' 31 32- job_name: 'system' 33 static_configs: 34 - targets: ['172.16.101.54:9100'] 35 labels: 36 instance: 'sht-sgmhadoopcm-01' 37 platform: 'ec2' 38 - targets: ['172.16.101.55:9100'] 39 labels: 40 instance: 'sht-sgmhadoopnn-01' 41 platform: 'ec2' 42 - targets: ['172.16.101.56:9100'] 43 labels: 44 instance: 'sht-sgmhadoopnn-02' 45 platform: 'ec2' 46 - targets: ['172.16.101.58:9100'] 47 labels: 48 instance: 'sht-sgmhadoopdn-01' 49 platform: 'ec2' 50 - targets: ['172.16.101.59:9100'] 51 labels: 52 instance: 'sht-sgmhadoopdn-02' 53 platform: 'ec2' 54 - targets: ['172.16.101.60:9100'] 55 labels: 56 instance: 'sht-sgmhadoopdn-03' 57 platform: 'ec2' 58 - targets: ['172.16.101.66:9100'] 59 labels: 60 instance: 'sht-sgmhadoopdn-04' 61 platform: 'ec2' 62 63- job_name: 'postgres' 64 static_configs: 65 - targets: ['172.16.101.66:9187'] 66 labels: 67 instance: 'sht-sgmhadoopdn-04' 68 platform: 'ec2' 69 - targets: ['172.16.101.60:9187'] 70 labels: 71 instance: 'sht-sgmhadoopdn-03' 72 platform: 'ec2'

View Code

 重新载入配置文件

1# curl -X POST http://172.16.101.54:9090/-/reload 2level=info ts=2019-03-16T15:18:16.149076153Z caller=main.go:724 msg="Loading configuration file" filename=prometheus.yml 3level=info ts=2019-03-16T15:18:16.152481657Z caller=main.go:751 msg="Completed loading of configuration file" filename=prometheus.yml

登录prometheus验证

二. 部署grafana

1. 添加prometheus数据源

2.建立dashboard

 dashbord名称

 

添加变量,把改dashborad作为模板使用

变量instance,获得server的node_exporter

变量database,获得server的postgres_exporter

 3.添加查询

系统监控

添加row

1)system start time

2)CPU Cores

3)Memory Size 

4) CPU Usage (5m)

5) CPU IO Wait (5m)

 

6) Memory Used

 

7) Memory Cached

 

8)System Average Load (1,5,15) 

9) DIsk Usage

10) Disk Read/Write IOPS (1m)

数据库监控

添加row

 

 1) PostgreSQL Start Time

2) PostgreSQL Version

 

3) PostgreSQL Shared_buffers

 

4) PostgreSQL Effective_cache_size

 

5) PostgreSQL Work Memory

 

6) PostgreSQL Max Connections

 

7) Logging Collector

8) PostgreSQL Fsync

 

9) PostgreSQL Database Size

 

10) PostgreSQL Current Sessions

 

11) PostgreSQL Table Locks

 

12) PostgreSQL Deadlocks

 

13) PostgreSQL Longest Transactions

 

14) Tuple Updated

15) Tuple Deleted

 

16) Tuple Inserted

 

17) Cache Hit Rate

18) Checkpoint Stats

 

1{ 2 "__inputs": [ 3 { 4 "name": "DS_DEV_PROMETHEUS", 5 "label": "DEV_Prometheus", 6 "description": "", 7 "type": "datasource", 8 "pluginId": "prometheus", 9 "pluginName": "Prometheus" 10 } 11 ], 12 "__requires": [ 13 { 14 "type": "panel", 15 "id": "gauge", 16 "name": "Gauge", 17 "version": "" 18 }, 19 { 20 "type": "grafana", 21 "id": "grafana", 22 "name": "Grafana", 23 "version": "6.0.1" 24 }, 25 { 26 "type": "panel", 27 "id": "graph", 28 "name": "Graph", 29 "version": "5.0.0" 30 }, 31 { 32 "type": "datasource", 33 "id": "prometheus", 34 "name": "Prometheus", 35 "version": "5.0.0" 36 }, 37 { 38 "type": "panel", 39 "id": "singlestat", 40 "name": "Singlestat", 41 "version": "5.0.0" 42 }, 43 { 44 "type": "panel", 45 "id": "table", 46 "name": "Table", 47 "version": "5.0.0" 48 } 49 ], 50 "annotations": { 51 "list": [ 52 { 53 "builtIn": 1, 54 "datasource": "-- Grafana --", 55 "enable": true, 56 "hide": true, 57 "iconColor": "rgba(0, 211, 255, 1)", 58 "name": "Annotations & Alerts", 59 "type": "dashboard" 60 } 61 ] 62 }, 63 "editable": true, 64 "gnetId": null, 65 "graphTooltip": 0, 66 "id": null, 67 "iteration": 1552826976555, 68 "links": [], 69 "panels": [ 70 { 71 "collapsed": false, 72 "gridPos": { 73 "h": 1, 74 "w": 24, 75 "x": 0, 76 "y": 0 77 }, 78 "id": 21, 79 "panels": [], 80 "title": "==============================System Summary==============================", 81 "type": "row" 82 }, 83 { 84 "cacheTimeout": null, 85 "colorBackground": false, 86 "colorValue": false, 87 "colors": [ 88 "#299c46", 89 "rgba(237, 129, 40, 0.89)", 90 "#d44a3a" 91 ], 92 "datasource": "${DS_DEV_PROMETHEUS}", 93 "format": "dateTimeAsIso", 94 "gauge": { 95 "maxValue": 100, 96 "minValue": 0, 97 "show": false, 98 "thresholdLabels": false, 99 "thresholdMarkers": true 100 }, 101 "gridPos": { 102 "h": 6, 103 "w": 3, 104 "x": 0, 105 "y": 1 106 }, 107 "id": 2, 108 "interval": null, 109 "links": [], 110 "mappingType": 1, 111 "mappingTypes": [ 112 { 113 "name": "value to text", 114 "value": 1 115 }, 116 { 117 "name": "range to text", 118 "value": 2 119 } 120 ], 121 "maxDataPoints": 100, 122 "nullPointMode": "connected", 123 "nullText": null, 124 "postfix": "", 125 "postfixFontSize": "50%", 126 "prefix": "", 127 "prefixFontSize": "50%", 128 "rangeMaps": [ 129 { 130 "from": "null", 131 "text": "N/A", 132 "to": "null" 133 } 134 ], 135 "sparkline": { 136 "fillColor": "rgba(31, 118, 189, 0.18)", 137 "full": false, 138 "lineColor": "rgb(31, 120, 193)", 139 "show": false 140 }, 141 "tableColumn": "", 142 "targets": [ 143 { 144 "expr": "node_boot_time_seconds{instance=\"$server\"} * 1000", 145 "format": "time_series", 146 "intervalFactor": 1, 147 "legendFormat": "System Uptime(days)", 148 "refId": "A" 149 } 150 ], 151 "thresholds": "", 152 "timeFrom": null, 153 "timeShift": null, 154 "title": "System Start Time", 155 "type": "singlestat", 156 "valueFontSize": "80%", 157 "valueMaps": [ 158 { 159 "op": "=", 160 "text": "N/A", 161 "value": "null" 162 } 163 ], 164 "valueName": "current" 165 }, 166 { 167 "cacheTimeout": null, 168 "colorBackground": false, 169 "colorValue": false, 170 "colors": [ 171 "#299c46", 172 "rgba(237, 129, 40, 0.89)", 173 "#d44a3a" 174 ], 175 "datasource": "${DS_DEV_PROMETHEUS}", 176 "format": "none", 177 "gauge": { 178 "maxValue": 100, 179 "minValue": 0, 180 "show": false, 181 "thresholdLabels": false, 182 "thresholdMarkers": true 183 }, 184 "gridPos": { 185 "h": 3, 186 "w": 2, 187 "x": 3, 188 "y": 1 189 }, 190 "id": 4, 191 "interval": null, 192 "links": [], 193 "mappingType": 1, 194 "mappingTypes": [ 195 { 196 "name": "value to text", 197 "value": 1 198 }, 199 { 200 "name": "range to text", 201 "value": 2 202 } 203 ], 204 "maxDataPoints": 100, 205 "nullPointMode": "connected", 206 "nullText": null, 207 "postfix": "", 208 "postfixFontSize": "50%", 209 "prefix": "", 210 "prefixFontSize": "50%", 211 "rangeMaps": [ 212 { 213 "from": "null", 214 "text": "N/A", 215 "to": "null" 216 } 217 ], 218 "sparkline": { 219 "fillColor": "rgba(31, 118, 189, 0.18)", 220 "full": false, 221 "lineColor": "rgb(31, 120, 193)", 222 "show": false 223 }, 224 "tableColumn": "", 225 "targets": [ 226 { 227 "expr": "count(count(node_cpu_seconds_total{instance=\"$server\", mode='system'}) by (cpu))", 228 "format": "time_series", 229 "intervalFactor": 1, 230 "refId": "A" 231 } 232 ], 233 "thresholds": "", 234 "timeFrom": null, 235 "timeShift": null, 236 "title": "CPU Cores", 237 "type": "singlestat", 238 "valueFontSize": "120%", 239 "valueMaps": [ 240 { 241 "op": "=", 242 "text": "N/A", 243 "value": "null" 244 } 245 ], 246 "valueName": "current" 247 }, 248 { 249 "datasource": "${DS_DEV_PROMETHEUS}", 250 "gridPos": { 251 "h": 6, 252 "w": 3, 253 "x": 5, 254 "y": 1 255 }, 256 "id": 8, 257 "links": [], 258 "options": { 259 "maxValue": 100, 260 "minValue": 0, 261 "showThresholdLabels": true, 262 "showThresholdMarkers": true, 263 "thresholds": [ 264 { 265 "color": "#7EB26D", 266 "index": 0, 267 "value": null 268 }, 269 { 270 "color": "#FA6400", 271 "index": 1, 272 "value": 30 273 }, 274 { 275 "color": "#C4162A", 276 "index": 2, 277 "value": 70 278 } 279 ], 280 "valueMappings": [], 281 "valueOptions": { 282 "decimals": 2, 283 "prefix": "", 284 "stat": "current", 285 "suffix": "", 286 "unit": "percent" 287 } 288 }, 289 "targets": [ 290 { 291 "expr": "100 - (avg(irate(node_cpu_seconds_total{instance=\"$server\",mode=\"idle\"}[5m])) * 100)", 292 "format": "time_series", 293 "intervalFactor": 1, 294 "refId": "A" 295 } 296 ], 297 "timeFrom": null, 298 "timeShift": null, 299 "title": "CPU Usage (5m)", 300 "type": "gauge" 301 }, 302 { 303 "datasource": "${DS_DEV_PROMETHEUS}", 304 "gridPos": { 305 "h": 6, 306 "w": 3, 307 "x": 8, 308 "y": 1 309 }, 310 "id": 10, 311 "links": [], 312 "options": { 313 "maxValue": 100, 314 "minValue": 0, 315 "showThresholdLabels": true, 316 "showThresholdMarkers": true, 317 "thresholds": [ 318 { 319 "color": "#7EB26D", 320 "index": 0, 321 "value": null 322 }, 323 { 324 "color": "#FA6400", 325 "index": 1, 326 "value": 30 327 }, 328 { 329 "color": "#C4162A", 330 "index": 2, 331 "value": 50 332 } 333 ], 334 "valueMappings": [], 335 "valueOptions": { 336 "decimals": 2, 337 "prefix": "", 338 "stat": "current", 339 "suffix": "", 340 "unit": "percent" 341 } 342 }, 343 "targets": [ 344 { 345 "expr": "avg(irate(node_cpu_seconds_total{instance=\"$server\",mode=\"iowait\"}[5m])) * 100", 346 "format": "time_series", 347 "intervalFactor": 1, 348 "refId": "A" 349 } 350 ], 351 "timeFrom": null, 352 "timeShift": null, 353 "title": "CPU IO Wait (5m)", 354 "type": "gauge" 355 }, 356 { 357 "datasource": "${DS_DEV_PROMETHEUS}", 358 "gridPos": { 359 "h": 6, 360 "w": 3, 361 "x": 11, 362 "y": 1 363 }, 364 "id": 12, 365 "links": [], 366 "options": { 367 "maxValue": 100, 368 "minValue": 0, 369 "showThresholdLabels": false, 370 "showThresholdMarkers": true, 371 "thresholds": [ 372 { 373 "color": "#7EB26D", 374 "index": 0, 375 "value": null 376 }, 377 { 378 "color": "#FA6400", 379 "index": 1, 380 "value": 80 381 }, 382 { 383 "color": "#C4162A", 384 "index": 2, 385 "value": 90 386 } 387 ], 388 "valueMappings": [], 389 "valueOptions": { 390 "decimals": null, 391 "prefix": "", 392 "stat": "current", 393 "suffix": "", 394 "unit": "percent" 395 } 396 }, 397 "targets": [ 398 { 399 "expr": "(node_memory_MemTotal_bytes{instance=\"$server\"} - (node_memory_MemFree_bytes{instance=\"$server\"} + node_memory_Buffers_bytes{instance=\"$server\"} + node_memory_Cached_bytes{instance=\"$server\"})) / node_memory_MemTotal_bytes{instance=\"$server\"} * 100", 400 "format": "time_series", 401 "intervalFactor": 1, 402 "refId": "A" 403 } 404 ], 405 "timeFrom": null, 406 "timeShift": null, 407 "title": "Memory Used", 408 "type": "gauge" 409 }, 410 { 411 "datasource": "${DS_DEV_PROMETHEUS}", 412 "gridPos": { 413 "h": 6, 414 "w": 3, 415 "x": 14, 416 "y": 1 417 }, 418 "id": 13, 419 "links": [], 420 "options": { 421 "maxValue": 100, 422 "minValue": 0, 423 "showThresholdLabels": false, 424 "showThresholdMarkers": true, 425 "thresholds": [ 426 { 427 "color": "#C4162A", 428 "index": 0, 429 "value": null 430 }, 431 { 432 "color": "#FA6400", 433 "index": 1, 434 "value": 20 435 }, 436 { 437 "color": "#37872D", 438 "index": 2, 439 "value": 50 440 } 441 ], 442 "valueMappings": [], 443 "valueOptions": { 444 "decimals": 2, 445 "prefix": "", 446 "stat": "current", 447 "suffix": "", 448 "unit": "percent" 449 } 450 }, 451 "targets": [ 452 { 453 "expr": "(node_memory_Cached_bytes{instance=\"$server\"} * 100) / node_memory_MemTotal_bytes{instance=\"$server\"}", 454 "format": "time_series", 455 "intervalFactor": 1, 456 "refId": "A" 457 } 458 ], 459 "timeFrom": null, 460 "timeShift": null, 461 "title": "Memory Cached", 462 "type": "gauge" 463 }, 464 { 465 "aliasColors": {}, 466 "bars": false, 467 "dashLength": 10, 468 "dashes": false, 469 "datasource": "${DS_DEV_PROMETHEUS}", 470 "fill": 1, 471 "gridPos": { 472 "h": 6, 473 "w": 7, 474 "x": 17, 475 "y": 1 476 }, 477 "id": 15, 478 "legend": { 479 "alignAsTable": true, 480 "avg": false, 481 "current": true, 482 "max": true, 483 "min": false, 484 "rightSide": true, 485 "show": true, 486 "total": false, 487 "values": true 488 }, 489 "lines": true, 490 "linewidth": 1, 491 "links": [], 492 "nullPointMode": "null", 493 "paceLength": 10, 494 "percentage": false, 495 "pointradius": 2, 496 "points": false, 497 "renderer": "flot", 498 "seriesOverrides": [], 499 "stack": false, 500 "steppedLine": false, 501 "targets": [ 502 { 503 "expr": "node_load1{instance=\"$server\"}", 504 "format": "time_series", 505 "intervalFactor": 1, 506 "legendFormat": "1m", 507 "refId": "A" 508 }, 509 { 510 "expr": "node_load5{instance=\"$server\"}", 511 "format": "time_series", 512 "intervalFactor": 1, 513 "legendFormat": "5m", 514 "refId": "B" 515 }, 516 { 517 "expr": "node_load15{instance=\"$server\"}", 518 "format": "time_series", 519 "intervalFactor": 1, 520 "legendFormat": "15m", 521 "refId": "C" 522 } 523 ], 524 "thresholds": [], 525 "timeFrom": null, 526 "timeRegions": [], 527 "timeShift": null, 528 "title": "System Average Load (1,5,15) ", 529 "tooltip": { 530 "shared": true, 531 "sort": 0, 532 "value_type": "individual" 533 }, 534 "type": "graph", 535 "xaxis": { 536 "buckets": null, 537 "mode": "time", 538 "name": null, 539 "show": true, 540 "values": [] 541 }, 542 "yaxes": [ 543 { 544 "format": "short", 545 "label": null, 546 "logBase": 1, 547 "max": null, 548 "min": null, 549 "show": true 550 }, 551 { 552 "format": "short", 553 "label": null, 554 "logBase": 1, 555 "max": null, 556 "min": null, 557 "show": true 558 } 559 ], 560 "yaxis": { 561 "align": false, 562 "alignLevel": null 563 } 564 }, 565 { 566 "cacheTimeout": null, 567 "colorBackground": false, 568 "colorValue": false, 569 "colors": [ 570 "#299c46", 571 "rgba(237, 129, 40, 0.89)", 572 "#d44a3a" 573 ], 574 "datasource": "${DS_DEV_PROMETHEUS}", 575 "format": "bytes", 576 "gauge": { 577 "maxValue": 100, 578 "minValue": 0, 579 "show": false, 580 "thresholdLabels": false, 581 "thresholdMarkers": true 582 }, 583 "gridPos": { 584 "h": 3, 585 "w": 2, 586 "x": 3, 587 "y": 4 588 }, 589 "id": 6, 590 "interval": null, 591 "links": [], 592 "mappingType": 1, 593 "mappingTypes": [ 594 { 595 "name": "value to text", 596 "value": 1 597 }, 598 { 599 "name": "range to text", 600 "value": 2 601 } 602 ], 603 "maxDataPoints": 100, 604 "nullPointMode": "connected", 605 "nullText": null, 606 "postfix": "", 607 "postfixFontSize": "50%", 608 "prefix": "", 609 "prefixFontSize": "50%", 610 "rangeMaps": [ 611 { 612 "from": "null", 613 "text": "N/A", 614 "to": "null" 615 } 616 ], 617 "sparkline": { 618 "fillColor": "rgba(31, 118, 189, 0.18)", 619 "full": false, 620 "lineColor": "rgb(31, 120, 193)", 621 "show": false 622 }, 623 "tableColumn": "", 624 "targets": [ 625 { 626 "expr": "node_memory_MemTotal_bytes{instance=\"$server\"}", 627 "format": "time_series", 628 "intervalFactor": 1, 629 "refId": "A" 630 } 631 ], 632 "thresholds": "", 633 "timeFrom": null, 634 "timeShift": null, 635 "title": "Memory Size", 636 "type": "singlestat", 637 "valueFontSize": "80%", 638 "valueMaps": [ 639 { 640 "op": "=", 641 "text": "N/A", 642 "value": "null" 643 } 644 ], 645 "valueName": "current" 646 }, 647 { 648 "columns": [], 649 "datasource": "${DS_DEV_PROMETHEUS}", 650 "fontSize": "100%", 651 "gridPos": { 652 "h": 6, 653 "w": 11, 654 "x": 0, 655 "y": 7 656 }, 657 "id": 17, 658 "links": [], 659 "pageSize": null, 660 "scroll": true, 661 "showHeader": true, 662 "sort": { 663 "col": 9, 664 "desc": false 665 }, 666 "styles": [ 667 { 668 "alias": "Available Size", 669 "colorMode": "cell", 670 "colors": [ 671 "rgba(245, 54, 54, 0.9)", 672 "rgba(237, 129, 40, 0.89)", 673 "rgba(50, 172, 45, 0.97)" 674 ], 675 "decimals": 1, 676 "link": false, 677 "pattern": "Value #A", 678 "thresholds": [ 679 "1000000000", 680 "5000000000" 681 ], 682 "type": "number", 683 "unit": "bytes" 684 }, 685 { 686 "alias": "Size Used Percent ", 687 "colorMode": "cell", 688 "colors": [ 689 "rgba(50, 172, 45, 0.97)", 690 "rgba(237, 129, 40, 0.89)", 691 "rgba(245, 54, 54, 0.9)" 692 ], 693 "dateFormat": "YYYY-MM-DD HH:mm:ss", 694 "decimals": 1, 695 "mappingType": 1, 696 "pattern": "Value #B", 697 "thresholds": [ 698 "0.8", 699 "0.9" 700 ], 701 "type": "number", 702 "unit": "percentunit" 703 }, 704 { 705 "alias": "Total Size", 706 "colorMode": null, 707 "colors": [ 708 "rgba(245, 54, 54, 0.9)", 709 "rgba(237, 129, 40, 0.89)", 710 "rgba(50, 172, 45, 0.97)" 711 ], 712 "dateFormat": "YYYY-MM-DD HH:mm:ss", 713 "decimals": 0, 714 "mappingType": 1, 715 "pattern": "Value #C", 716 "thresholds": [], 717 "type": "number", 718 "unit": "bytes" 719 }, 720 { 721 "alias": "FIle System", 722 "colorMode": null, 723 "colors": [ 724 "rgba(245, 54, 54, 0.9)", 725 "rgba(237, 129, 40, 0.89)", 726 "rgba(50, 172, 45, 0.97)" 727 ], 728 "dateFormat": "YYYY-MM-DD HH:mm:ss", 729 "decimals": 2, 730 "mappingType": 1, 731 "pattern": "fstype", 732 "thresholds": [], 733 "type": "number", 734 "unit": "short" 735 }, 736 { 737 "alias": "Disk", 738 "colorMode": null, 739 "colors": [ 740 "#37872D", 741 "rgba(237, 129, 40, 0.89)", 742 "rgba(50, 172, 45, 0.97)" 743 ], 744 "dateFormat": "YYYY-MM-DD HH:mm:ss", 745 "decimals": 2, 746 "mappingType": 1, 747 "pattern": "device", 748 "thresholds": [], 749 "type": "number", 750 "unit": "short" 751 }, 752 { 753 "alias": "Mount Point", 754 "colorMode": null, 755 "colors": [ 756 "rgba(245, 54, 54, 0.9)", 757 "rgba(237, 129, 40, 0.89)", 758 "rgba(50, 172, 45, 0.97)" 759 ], 760 "dateFormat": "YYYY-MM-DD HH:mm:ss", 761 "decimals": 2, 762 "mappingType": 1, 763 "pattern": "mountpoint", 764 "thresholds": [], 765 "type": "number", 766 "unit": "short" 767 }, 768 { 769 "alias": "", 770 "colorMode": null, 771 "colors": [ 772 "rgba(245, 54, 54, 0.9)", 773 "rgba(237, 129, 40, 0.89)", 774 "rgba(50, 172, 45, 0.97)" 775 ], 776 "dateFormat": "YYYY-MM-DD HH:mm:ss", 777 "decimals": 2, 778 "mappingType": 1, 779 "pattern": "/.*/", 780 "thresholds": [], 781 "type": "hidden", 782 "unit": "short" 783 } 784 ], 785 "targets": [ 786 { 787 "expr": "(node_filesystem_size_bytes{instance='$server',fstype=~\"ext3|ext4|xfs|nfs\"})/100 *100", 788 "format": "table", 789 "instant": true, 790 "intervalFactor": 1, 791 "refId": "C" 792 }, 793 { 794 "expr": "node_filesystem_avail_bytes {instance='$server',fstype=~\"ext3|ext4|xfs|nfs\"}", 795 "format": "table", 796 "instant": true, 797 "intervalFactor": 1, 798 "refId": "A" 799 }, 800 { 801 "expr": "1-(node_filesystem_free_bytes{instance='$server',fstype=~\"ext3|ext4|xfs|nfs\"} / node_filesystem_size_bytes{instance='$server',fstype=~\"ext3|ext4|xfs|nfs\"})", 802 "format": "table", 803 "instant": true, 804 "intervalFactor": 1, 805 "refId": "B" 806 } 807 ], 808 "timeFrom": null, 809 "timeShift": null, 810 "title": "Disk Usage", 811 "transform": "table", 812 "type": "table" 813 }, 814 { 815 "aliasColors": {}, 816 "bars": false, 817 "dashLength": 10, 818 "dashes": false, 819 "datasource": "${DS_DEV_PROMETHEUS}", 820 "fill": 1, 821 "gridPos": { 822 "h": 6, 823 "w": 13, 824 "x": 11, 825 "y": 7 826 }, 827 "id": 19, 828 "legend": { 829 "avg": false, 830 "current": true, 831 "max": false, 832 "min": false, 833 "show": true, 834 "total": false, 835 "values": true 836 }, 837 "lines": true, 838 "linewidth": 1, 839 "links": [], 840 "nullPointMode": "null", 841 "paceLength": 10, 842 "percentage": false, 843 "pointradius": 2, 844 "points": false, 845 "renderer": "flot", 846 "seriesOverrides": [ 847 { 848 "alias": "/.*writes$/", 849 "transform": "negative-Y" 850 } 851 ], 852 "stack": false, 853 "steppedLine": false, 854 "targets": [ 855 { 856 "expr": "irate(node_disk_reads_completed_total{instance=~\"$server\"}[1m])", 857 "format": "time_series", 858 "intervalFactor": 1, 859 "legendFormat": "{{device}}_reads", 860 "refId": "A" 861 }, 862 { 863 "expr": "irate(node_disk_writes_completed_total{instance=~\"$server\"}[1m])", 864 "format": "time_series", 865 "intervalFactor": 1, 866 "legendFormat": "{{device}}_writes", 867 "refId": "B" 868 }, 869 { 870 "expr": "node_disk_io_now{instance=~\"$server\"}", 871 "format": "time_series", 872 "intervalFactor": 1, 873 "legendFormat": "{{device}}", 874 "refId": "C" 875 } 876 ], 877 "thresholds": [], 878 "timeFrom": null, 879 "timeRegions": [], 880 "timeShift": null, 881 "title": "Disk Read/Write IOPS (1m)", 882 "tooltip": { 883 "shared": true, 884 "sort": 0, 885 "value_type": "individual" 886 }, 887 "type": "graph", 888 "xaxis": { 889 "buckets": null, 890 "mode": "time", 891 "name": null, 892 "show": true, 893 "values": [] 894 }, 895 "yaxes": [ 896 { 897 "format": "ops", 898 "label": "reads(+)/ writes(-) ", 899 "logBase": 1, 900 "max": null, 901 "min": null, 902 "show": true 903 }, 904 { 905 "format": "short", 906 "label": "I/O ops/sec", 907 "logBase": 1, 908 "max": null, 909 "min": null, 910 "show": true 911 } 912 ], 913 "yaxis": { 914 "align": false, 915 "alignLevel": null 916 } 917 }, 918 { 919 "collapsed": true, 920 "gridPos": { 921 "h": 1, 922 "w": 24, 923 "x": 0, 924 "y": 13 925 }, 926 "id": 23, 927 "panels": [], 928 "title": "==============================Databsase Summary==============================", 929 "type": "row" 930 }, 931 { 932 "cacheTimeout": null, 933 "colorBackground": false, 934 "colorValue": false, 935 "colors": [ 936 "#299c46", 937 "rgba(237, 129, 40, 0.89)", 938 "#d44a3a" 939 ], 940 "datasource": "${DS_DEV_PROMETHEUS}", 941 "format": "dateTimeAsIso", 942 "gauge": { 943 "maxValue": 100, 944 "minValue": 0, 945 "show": false, 946 "thresholdLabels": false, 947 "thresholdMarkers": true 948 }, 949 "gridPos": { 950 "h": 4, 951 "w": 4, 952 "x": 0, 953 "y": 14 954 }, 955 "id": 25, 956 "interval": null, 957 "links": [], 958 "mappingType": 1, 959 "mappingTypes": [ 960 { 961 "name": "value to text", 962 "value": 1 963 }, 964 { 965 "name": "range to text", 966 "value": 2 967 } 968 ], 969 "maxDataPoints": 100, 970 "nullPointMode": "connected", 971 "nullText": null, 972 "postfix": "", 973 "postfixFontSize": "50%", 974 "prefix": "", 975 "prefixFontSize": "50%", 976 "rangeMaps": [ 977 { 978 "from": "null", 979 "text": "N/A", 980 "to": "null" 981 } 982 ], 983 "sparkline": { 984 "fillColor": "rgba(31, 118, 189, 0.18)", 985 "full": false, 986 "lineColor": "rgb(31, 120, 193)", 987 "show": false 988 }, 989 "tableColumn": "", 990 "targets": [ 991 { 992 "expr": "pg_postmaster_start_time_seconds{instance=\"$database\"} * 1000", 993 "format": "time_series", 994 "intervalFactor": 1, 995 "refId": "A" 996 } 997 ], 998 "thresholds": "", 999 "timeFrom": null, 1000 "timeShift": null, 1001 "title": "PostgreSQL Start Time", 1002 "type": "singlestat", 1003 "valueFontSize": "80%", 1004 "valueMaps": [ 1005 { 1006 "op": "=", 1007 "text": "N/A", 1008 "value": "null" 1009 } 1010 ], 1011 "valueName": "current" 1012 }, 1013 { 1014 "cacheTimeout": null, 1015 "colorBackground": false, 1016 "colorValue": false, 1017 "colors": [ 1018 "#299c46", 1019 "rgba(237, 129, 40, 0.89)", 1020 "#d44a3a" 1021 ], 1022 "datasource": "${DS_DEV_PROMETHEUS}", 1023 "format": "none", 1024 "gauge": { 1025 "maxValue": 100, 1026 "minValue": 0, 1027 "show": false, 1028 "thresholdLabels": false, 1029 "thresholdMarkers": true 1030 }, 1031 "gridPos": { 1032 "h": 4, 1033 "w": 3, 1034 "x": 4, 1035 "y": 14 1036 }, 1037 "id": 26, 1038 "interval": null, 1039 "links": [], 1040 "mappingType": 1, 1041 "mappingTypes": [ 1042 { 1043 "name": "value to text", 1044 "value": 1 1045 }, 1046 { 1047 "name": "range to text", 1048 "value": 2 1049 } 1050 ], 1051 "maxDataPoints": 100, 1052 "nullPointMode": "connected", 1053 "nullText": null, 1054 "postfix": "", 1055 "postfixFontSize": "50%", 1056 "prefix": "", 1057 "prefixFontSize": "50%", 1058 "rangeMaps": [ 1059 { 1060 "from": "null", 1061 "text": "N/A", 1062 "to": "null" 1063 } 1064 ], 1065 "sparkline": { 1066 "fillColor": "rgba(31, 118, 189, 0.18)", 1067 "full": false, 1068 "lineColor": "rgb(31, 120, 193)", 1069 "show": false 1070 }, 1071 "tableColumn": "", 1072 "targets": [ 1073 { 1074 "expr": "pg_static{instance=\"$database\"}", 1075 "format": "time_series", 1076 "intervalFactor": 1, 1077 "legendFormat": "{{short_version}}", 1078 "refId": "A" 1079 } 1080 ], 1081 "thresholds": "", 1082 "timeFrom": null, 1083 "timeShift": null, 1084 "title": "PostgreSQL Version", 1085 "type": "singlestat", 1086 "valueFontSize": "80%", 1087 "valueMaps": [ 1088 { 1089 "op": "=", 1090 "text": "N/A", 1091 "value": "null" 1092 } 1093 ], 1094 "valueName": "name" 1095 }, 1096 { 1097 "cacheTimeout": null, 1098 "colorBackground": false, 1099 "colorValue": false, 1100 "colors": [ 1101 "#299c46", 1102 "rgba(237, 129, 40, 0.89)", 1103 "#d44a3a" 1104 ], 1105 "datasource": "${DS_DEV_PROMETHEUS}", 1106 "format": "bytes", 1107 "gauge": { 1108 "maxValue": 100, 1109 "minValue": 0, 1110 "show": false, 1111 "thresholdLabels": false, 1112 "thresholdMarkers": true 1113 }, 1114 "gridPos": { 1115 "h": 4, 1116 "w": 3, 1117 "x": 7, 1118 "y": 14 1119 }, 1120 "id": 27, 1121 "interval": null, 1122 "links": [], 1123 "mappingType": 1, 1124 "mappingTypes": [ 1125 { 1126 "name": "value to text", 1127 "value": 1 1128 }, 1129 { 1130 "name": "range to text", 1131 "value": 2 1132 } 1133 ], 1134 "maxDataPoints": 100, 1135 "nullPointMode": "connected", 1136 "nullText": null, 1137 "postfix": "", 1138 "postfixFontSize": "50%", 1139 "prefix": "", 1140 "prefixFontSize": "50%", 1141 "rangeMaps": [ 1142 { 1143 "from": "null", 1144 "text": "N/A", 1145 "to": "null" 1146 } 1147 ], 1148 "sparkline": { 1149 "fillColor": "rgba(31, 118, 189, 0.18)", 1150 "full": false, 1151 "lineColor": "rgb(31, 120, 193)", 1152 "show": false 1153 }, 1154 "tableColumn": "", 1155 "targets": [ 1156 { 1157 "expr": "pg_settings_shared_buffers_bytes{instance=\"$database\"}", 1158 "format": "time_series", 1159 "intervalFactor": 1, 1160 "legendFormat": "", 1161 "refId": "A" 1162 } 1163 ], 1164 "thresholds": "", 1165 "timeFrom": null, 1166 "timeShift": null, 1167 "title": "PostgreSQL Shared_buffers", 1168 "type": "singlestat", 1169 "valueFontSize": "80%", 1170 "valueMaps": [ 1171 { 1172 "op": "=", 1173 "text": "N/A", 1174 "value": "null" 1175 } 1176 ], 1177 "valueName": "current" 1178 }, 1179 { 1180 "cacheTimeout": null, 1181 "colorBackground": false, 1182 "colorValue": false, 1183 "colors": [ 1184 "#299c46", 1185 "rgba(237, 129, 40, 0.89)", 1186 "#d44a3a" 1187 ], 1188 "datasource": "${DS_DEV_PROMETHEUS}", 1189 "format": "bytes", 1190 "gauge": { 1191 "maxValue": 100, 1192 "minValue": 0, 1193 "show": false, 1194 "thresholdLabels": false, 1195 "thresholdMarkers": true 1196 }, 1197 "gridPos": { 1198 "h": 4, 1199 "w": 3, 1200 "x": 10, 1201 "y": 14 1202 }, 1203 "id": 28, 1204 "interval": null, 1205 "links": [], 1206 "mappingType": 1, 1207 "mappingTypes": [ 1208 { 1209 "name": "value to text", 1210 "value": 1 1211 }, 1212 { 1213 "name": "range to text", 1214 "value": 2 1215 } 1216 ], 1217 "maxDataPoints": 100, 1218 "nullPointMode": "connected", 1219 "nullText": null, 1220 "postfix": "", 1221 "postfixFontSize": "50%", 1222 "prefix": "", 1223 "prefixFontSize": "50%", 1224 "rangeMaps": [ 1225 { 1226 "from": "null", 1227 "text": "N/A", 1228 "to": "null" 1229 } 1230 ], 1231 "sparkline": { 1232 "fillColor": "rgba(31, 118, 189, 0.18)", 1233 "full": false, 1234 "lineColor": "rgb(31, 120, 193)", 1235 "show": false 1236 }, 1237 "tableColumn": "", 1238 "targets": [ 1239 { 1240 "expr": "pg_settings_effective_cache_size_bytes{instance=\"$database\"}", 1241 "format": "time_series", 1242 "intervalFactor": 1, 1243 "legendFormat": "", 1244 "refId": "A" 1245 } 1246 ], 1247 "thresholds": "", 1248 "timeFrom": null, 1249 "timeShift": null, 1250 "title": "PostgreSQL Effective_cache_size", 1251 "type": "singlestat", 1252 "valueFontSize": "80%", 1253 "valueMaps": [ 1254 { 1255 "op": "=", 1256 "text": "N/A", 1257 "value": "null" 1258 } 1259 ], 1260 "valueName": "current" 1261 }, 1262 { 1263 "cacheTimeout": null, 1264 "colorBackground": false, 1265 "colorValue": false, 1266 "colors": [ 1267 "#299c46", 1268 "rgba(237, 129, 40, 0.89)", 1269 "#d44a3a" 1270 ], 1271 "datasource": "${DS_DEV_PROMETHEUS}", 1272 "format": "bytes", 1273 "gauge": { 1274 "maxValue": 100, 1275 "minValue": 0, 1276 "show": false, 1277 "thresholdLabels": false, 1278 "thresholdMarkers": true 1279 }, 1280 "gridPos": { 1281 "h": 4, 1282 "w": 3, 1283 "x": 13, 1284 "y": 14 1285 }, 1286 "id": 29, 1287 "interval": null, 1288 "links": [], 1289 "mappingType": 1, 1290 "mappingTypes": [ 1291 { 1292 "name": "value to text", 1293 "value": 1 1294 }, 1295 { 1296 "name": "range to text", 1297 "value": 2 1298 } 1299 ], 1300 "maxDataPoints": 100, 1301 "nullPointMode": "connected", 1302 "nullText": null, 1303 "postfix": "", 1304 "postfixFontSize": "50%", 1305 "prefix": "", 1306 "prefixFontSize": "50%", 1307 "rangeMaps": [ 1308 { 1309 "from": "null", 1310 "text": "N/A", 1311 "to": "null" 1312 } 1313 ], 1314 "sparkline": { 1315 "fillColor": "rgba(31, 118, 189, 0.18)", 1316 "full": false, 1317 "lineColor": "rgb(31, 120, 193)", 1318 "show": false 1319 }, 1320 "tableColumn": "", 1321 "targets": [ 1322 { 1323 "expr": "pg_settings_work_mem_bytes{instance=\"$database\"}", 1324 "format": "time_series", 1325 "intervalFactor": 1, 1326 "legendFormat": "", 1327 "refId": "A" 1328 } 1329 ], 1330 "thresholds": "", 1331 "timeFrom": null, 1332 "timeShift": null, 1333 "title": "PostgreSQL Work Memory", 1334 "type": "singlestat", 1335 "valueFontSize": "80%", 1336 "valueMaps": [ 1337 { 1338 "op": "=", 1339 "text": "N/A", 1340 "value": "null" 1341 } 1342 ], 1343 "valueName": "current" 1344 }, 1345 { 1346 "cacheTimeout": null, 1347 "colorBackground": false, 1348 "colorValue": false, 1349 "colors": [ 1350 "#299c46", 1351 "rgba(237, 129, 40, 0.89)", 1352 "#d44a3a" 1353 ], 1354 "datasource": "${DS_DEV_PROMETHEUS}", 1355 "format": "none", 1356 "gauge": { 1357 "maxValue": 100, 1358 "minValue": 0, 1359 "show": false, 1360 "thresholdLabels": false, 1361 "thresholdMarkers": true 1362 }, 1363 "gridPos": { 1364 "h": 4, 1365 "w": 3, 1366 "x": 16, 1367 "y": 14 1368 }, 1369 "id": 30, 1370 "interval": null, 1371 "links": [], 1372 "mappingType": 1, 1373 "mappingTypes": [ 1374 { 1375 "name": "value to text", 1376 "value": 1 1377 }, 1378 { 1379 "name": "range to text", 1380 "value": 2 1381 } 1382 ], 1383 "maxDataPoints": 100, 1384 "nullPointMode": "connected", 1385 "nullText": null, 1386 "postfix": "", 1387 "postfixFontSize": "50%", 1388 "prefix": "", 1389 "prefixFontSize": "50%", 1390 "rangeMaps": [ 1391 { 1392 "from": "null", 1393 "text": "N/A", 1394 "to": "null" 1395 } 1396 ], 1397 "sparkline": { 1398 "fillColor": "rgba(31, 118, 189, 0.18)", 1399 "full": false, 1400 "lineColor": "rgb(31, 120, 193)", 1401 "show": false 1402 }, 1403 "tableColumn": "", 1404 "targets": [ 1405 { 1406 "expr": "pg_settings_max_connections{instance=\"$database\"}", 1407 "format": "time_series", 1408 "intervalFactor": 1, 1409 "legendFormat": "", 1410 "refId": "A" 1411 } 1412 ], 1413 "thresholds": "", 1414 "timeFrom": null, 1415 "timeShift": null, 1416 "title": "PostgreSQL Max Connections", 1417 "type": "singlestat", 1418 "valueFontSize": "80%", 1419 "valueMaps": [ 1420 { 1421 "op": "=", 1422 "text": "N/A", 1423 "value": "null" 1424 } 1425 ], 1426 "valueName": "current" 1427 }, 1428 { 1429 "cacheTimeout": null, 1430 "colorBackground": false, 1431 "colorValue": false, 1432 "colors": [ 1433 "#299c46", 1434 "rgba(237, 129, 40, 0.89)", 1435 "#d44a3a" 1436 ], 1437 "datasource": "${DS_DEV_PROMETHEUS}", 1438 "format": "none", 1439 "gauge": { 1440 "maxValue": 100, 1441 "minValue": 0, 1442 "show": false, 1443 "thresholdLabels": false, 1444 "thresholdMarkers": true 1445 }, 1446 "gridPos": { 1447 "h": 4, 1448 "w": 3, 1449 "x": 19, 1450 "y": 14 1451 }, 1452 "id": 31, 1453 "interval": null, 1454 "links": [], 1455 "mappingType": 1, 1456 "mappingTypes": [ 1457 { 1458 "name": "value to text", 1459 "value": 1 1460 }, 1461 { 1462 "name": "range to text", 1463 "value": 2 1464 } 1465 ], 1466 "maxDataPoints": 100, 1467 "nullPointMode": "connected", 1468 "nullText": null, 1469 "postfix": "", 1470 "postfixFontSize": "50%", 1471 "prefix": "", 1472 "prefixFontSize": "50%", 1473 "rangeMaps": [ 1474 { 1475 "from": "null", 1476 "text": "N/A", 1477 "to": "null" 1478 } 1479 ], 1480 "sparkline": { 1481 "fillColor": "rgba(31, 118, 189, 0.18)", 1482 "full": false, 1483 "lineColor": "rgb(31, 120, 193)", 1484 "show": false 1485 }, 1486 "tableColumn": "", 1487 "targets": [ 1488 { 1489 "expr": "pg_settings_logging_collector{instance=\"$database\"}", 1490 "format": "time_series", 1491 "intervalFactor": 1, 1492 "legendFormat": "", 1493 "refId": "A" 1494 } 1495 ], 1496 "thresholds": "", 1497 "timeFrom": null, 1498 "timeShift": null, 1499 "title": "Logging Collector", 1500 "type": "singlestat", 1501 "valueFontSize": "80%", 1502 "valueMaps": [ 1503 { 1504 "op": "=", 1505 "text": "off", 1506 "value": "0" 1507 }, 1508 { 1509 "op": "=", 1510 "text": "on", 1511 "value": "1" 1512 } 1513 ], 1514 "valueName": "current" 1515 }, 1516 { 1517 "cacheTimeout": null, 1518 "colorBackground": false, 1519 "colorValue": false, 1520 "colors": [ 1521 "#299c46", 1522 "rgba(237, 129, 40, 0.89)", 1523 "#d44a3a" 1524 ], 1525 "datasource": "${DS_DEV_PROMETHEUS}", 1526 "format": "none", 1527 "gauge": { 1528 "maxValue": 100, 1529 "minValue": 0, 1530 "show": false, 1531 "thresholdLabels": false, 1532 "thresholdMarkers": true 1533 }, 1534 "gridPos": { 1535 "h": 4, 1536 "w": 2, 1537 "x": 22, 1538 "y": 14 1539 }, 1540 "id": 32, 1541 "interval": null, 1542 "links": [], 1543 "mappingType": 1, 1544 "mappingTypes": [ 1545 { 1546 "name": "value to text", 1547 "value": 1 1548 }, 1549 { 1550 "name": "range to text", 1551 "value": 2 1552 } 1553 ], 1554 "maxDataPoints": 100, 1555 "nullPointMode": "connected", 1556 "nullText": null, 1557 "postfix": "", 1558 "postfixFontSize": "50%", 1559 "prefix": "", 1560 "prefixFontSize": "50%", 1561 "rangeMaps": [ 1562 { 1563 "from": "null", 1564 "text": "N/A", 1565 "to": "null" 1566 } 1567 ], 1568 "sparkline": { 1569 "fillColor": "rgba(31, 118, 189, 0.18)", 1570 "full": false, 1571 "lineColor": "rgb(31, 120, 193)", 1572 "show": false 1573 }, 1574 "tableColumn": "", 1575 "targets": [ 1576 { 1577 "expr": "pg_settings_fsync{instance=\"$database\"}", 1578 "format": "time_series", 1579 "intervalFactor": 1, 1580 "legendFormat": "", 1581 "refId": "A" 1582 } 1583 ], 1584 "thresholds": "", 1585 "timeFrom": null, 1586 "timeShift": null, 1587 "title": "PostgreSQL Fsync", 1588 "type": "singlestat", 1589 "valueFontSize": "80%", 1590 "valueMaps": [ 1591 { 1592 "op": "=", 1593 "text": "off", 1594 "value": "0" 1595 }, 1596 { 1597 "op": "=", 1598 "text": "on", 1599 "value": "1" 1600 } 1601 ], 1602 "valueName": "current" 1603 }, 1604 { 1605 "aliasColors": {}, 1606 "bars": false, 1607 "dashLength": 10, 1608 "dashes": false, 1609 "datasource": "${DS_DEV_PROMETHEUS}", 1610 "fill": 1, 1611 "gridPos": { 1612 "h": 7, 1613 "w": 5, 1614 "x": 0, 1615 "y": 18 1616 }, 1617 "id": 34, 1618 "legend": { 1619 "alignAsTable": false, 1620 "avg": false, 1621 "current": false, 1622 "max": false, 1623 "min": false, 1624 "rightSide": false, 1625 "show": true, 1626 "total": false, 1627 "values": false 1628 }, 1629 "lines": true, 1630 "linewidth": 1, 1631 "links": [], 1632 "nullPointMode": "null", 1633 "paceLength": 10, 1634 "percentage": false, 1635 "pointradius": 2, 1636 "points": false, 1637 "renderer": "flot", 1638 "seriesOverrides": [], 1639 "stack": false, 1640 "steppedLine": false, 1641 "targets": [ 1642 { 1643 "expr": "pg_database_size{instance=\"$database\",datname!~\"postgres|template0|template1\"}", 1644 "format": "time_series", 1645 "intervalFactor": 1, 1646 "legendFormat": "{{datname}}", 1647 "refId": "A" 1648 } 1649 ], 1650 "thresholds": [], 1651 "timeFrom": null, 1652 "timeRegions": [], 1653 "timeShift": null, 1654 "title": "PostgreSQL Database Size", 1655 "tooltip": { 1656 "shared": true, 1657 "sort": 0, 1658 "value_type": "individual" 1659 }, 1660 "type": "graph", 1661 "xaxis": { 1662 "buckets": null, 1663 "mode": "time", 1664 "name": null, 1665 "show": true, 1666 "values": [] 1667 }, 1668 "yaxes": [ 1669 { 1670 "format": "bytes", 1671 "label": null, 1672 "logBase": 1, 1673 "max": null, 1674 "min": null, 1675 "show": true 1676 }, 1677 { 1678 "format": "short", 1679 "label": null, 1680 "logBase": 1, 1681 "max": null, 1682 "min": null, 1683 "show": true 1684 } 1685 ], 1686 "yaxis": { 1687 "align": false, 1688 "alignLevel": null 1689 } 1690 }, 1691 { 1692 "aliasColors": {}, 1693 "bars": false, 1694 "dashLength": 10, 1695 "dashes": false, 1696 "datasource": "${DS_DEV_PROMETHEUS}", 1697 "decimals": null, 1698 "fill": 1, 1699 "gridPos": { 1700 "h": 7, 1701 "w": 7, 1702 "x": 5, 1703 "y": 18 1704 }, 1705 "id": 36, 1706 "legend": { 1707 "alignAsTable": false, 1708 "avg": false, 1709 "current": true, 1710 "hideEmpty": false, 1711 "max": true, 1712 "min": false, 1713 "rightSide": false, 1714 "show": true, 1715 "total": false, 1716 "values": true 1717 }, 1718 "lines": true, 1719 "linewidth": 1, 1720 "links": [], 1721 "nullPointMode": "null", 1722 "paceLength": 10, 1723 "percentage": false, 1724 "pointradius": 2, 1725 "points": false, 1726 "renderer": "flot", 1727 "seriesOverrides": [], 1728 "stack": false, 1729 "steppedLine": false, 1730 "targets": [ 1731 { 1732 "expr": "pg_stat_connetion_count", 1733 "format": "time_series", 1734 "intervalFactor": 1, 1735 "legendFormat": "{{state}}", 1736 "refId": "A" 1737 } 1738 ], 1739 "thresholds": [], 1740 "timeFrom": null, 1741 "timeRegions": [], 1742 "timeShift": null, 1743 "title": "PostgreSQL Current Sessions", 1744 "tooltip": { 1745 "shared": true, 1746 "sort": 0, 1747 "value_type": "individual" 1748 }, 1749 "type": "graph", 1750 "xaxis": { 1751 "buckets": null, 1752 "mode": "time", 1753 "name": null, 1754 "show": true, 1755 "values": [] 1756 }, 1757 "yaxes": [ 1758 { 1759 "decimals": 0, 1760 "format": "none", 1761 "label": null, 1762 "logBase": 1, 1763 "max": null, 1764 "min": null, 1765 "show": true 1766 }, 1767 { 1768 "format": "short", 1769 "label": null, 1770 "logBase": 1, 1771 "max": null, 1772 "min": null, 1773 "show": true 1774 } 1775 ], 1776 "yaxis": { 1777 "align": false, 1778 "alignLevel": null 1779 } 1780 }, 1781 { 1782 "aliasColors": {}, 1783 "bars": false, 1784 "dashLength": 10, 1785 "dashes": false, 1786 "datasource": "${DS_DEV_PROMETHEUS}", 1787 "decimals": null, 1788 "fill": 1, 1789 "gridPos": { 1790 "h": 7, 1791 "w": 6, 1792 "x": 12, 1793 "y": 18 1794 }, 1795 "id": 37, 1796 "legend": { 1797 "alignAsTable": false, 1798 "avg": false, 1799 "current": true, 1800 "hideEmpty": false, 1801 "max": true, 1802 "min": false, 1803 "rightSide": false, 1804 "show": true, 1805 "total": false, 1806 "values": true 1807 }, 1808 "lines": true, 1809 "linewidth": 1, 1810 "links": [], 1811 "nullPointMode": "null", 1812 "paceLength": 10, 1813 "percentage": false, 1814 "pointradius": 2, 1815 "points": false, 1816 "renderer": "flot", 1817 "seriesOverrides": [], 1818 "stack": false, 1819 "steppedLine": false, 1820 "targets": [ 1821 { 1822 "expr": "pg_locks_count{instance=\"$database\",datname!~\"template0|template1|\"} !=0", 1823 "format": "time_series", 1824 "intervalFactor": 1, 1825 "legendFormat": "{{datname}}/{{mode}}", 1826 "refId": "A" 1827 } 1828 ], 1829 "thresholds": [], 1830 "timeFrom": null, 1831 "timeRegions": [], 1832 "timeShift": null, 1833 "title": "PostgreSQL Table Locks", 1834 "tooltip": { 1835 "shared": true, 1836 "sort": 0, 1837 "value_type": "individual" 1838 }, 1839 "type": "graph", 1840 "xaxis": { 1841 "buckets": null, 1842 "mode": "time", 1843 "name": null, 1844 "show": true, 1845 "values": [] 1846 }, 1847 "yaxes": [ 1848 { 1849 "decimals": 0, 1850 "format": "none", 1851 "label": null, 1852 "logBase": 1, 1853 "max": null, 1854 "min": null, 1855 "show": true 1856 }, 1857 { 1858 "format": "short", 1859 "label": null, 1860 "logBase": 1, 1861 "max": null, 1862 "min": null, 1863 "show": true 1864 } 1865 ], 1866 "yaxis": { 1867 "align": false, 1868 "alignLevel": null 1869 } 1870 }, 1871 { 1872 "aliasColors": {}, 1873 "bars": false, 1874 "dashLength": 10, 1875 "dashes": false, 1876 "datasource": "${DS_DEV_PROMETHEUS}", 1877 "decimals": null, 1878 "fill": 1, 1879 "gridPos": { 1880 "h": 7, 1881 "w": 6, 1882 "x": 18, 1883 "y": 18 1884 }, 1885 "id": 38, 1886 "legend": { 1887 "alignAsTable": false, 1888 "avg": false, 1889 "current": true, 1890 "hideEmpty": false, 1891 "max": true, 1892 "min": false, 1893 "rightSide": false, 1894 "show": true, 1895 "total": false, 1896 "values": true 1897 }, 1898 "lines": true, 1899 "linewidth": 1, 1900 "links": [], 1901 "nullPointMode": "null", 1902 "paceLength": 10, 1903 "percentage": false, 1904 "pointradius": 2, 1905 "points": false, 1906 "renderer": "flot", 1907 "seriesOverrides": [], 1908 "stack": false, 1909 "steppedLine": false, 1910 "targets": [ 1911 { 1912 "expr": "irate(pg_stat_database_deadlocks{instance=\"$database\",datname!~\"postgres|template0|template1\"}[5m])", 1913 "format": "time_series", 1914 "intervalFactor": 1, 1915 "legendFormat": "{{datname}}.deadlocks", 1916 "refId": "A" 1917 } 1918 ], 1919 "thresholds": [], 1920 "timeFrom": null, 1921 "timeRegions": [], 1922 "timeShift": null, 1923 "title": "PostgreSQL Deadlocks", 1924 "tooltip": { 1925 "shared": true, 1926 "sort": 0, 1927 "value_type": "individual" 1928 }, 1929 "type": "graph", 1930 "xaxis": { 1931 "buckets": null, 1932 "mode": "time", 1933 "name": null, 1934 "show": true, 1935 "values": [] 1936 }, 1937 "yaxes": [ 1938 { 1939 "decimals": 0, 1940 "format": "none", 1941 "label": null, 1942 "logBase": 1, 1943 "max": null, 1944 "min": null, 1945 "show": true 1946 }, 1947 { 1948 "format": "short", 1949 "label": null, 1950 "logBase": 1, 1951 "max": null, 1952 "min": null, 1953 "show": true 1954 } 1955 ], 1956 "yaxis": { 1957 "align": false, 1958 "alignLevel": null 1959 } 1960 }, 1961 { 1962 "aliasColors": {}, 1963 "bars": false, 1964 "dashLength": 10, 1965 "dashes": false, 1966 "datasource": "${DS_DEV_PROMETHEUS}", 1967 "decimals": null, 1968 "fill": 1, 1969 "gridPos": { 1970 "h": 7, 1971 "w": 6, 1972 "x": 0, 1973 "y": 25 1974 }, 1975 "id": 39, 1976 "legend": { 1977 "alignAsTable": false, 1978 "avg": false, 1979 "current": true, 1980 "hideEmpty": false, 1981 "max": false, 1982 "min": false, 1983 "rightSide": false, 1984 "show": true, 1985 "total": false, 1986 "values": true 1987 }, 1988 "lines": true, 1989 "linewidth": 1, 1990 "links": [], 1991 "nullPointMode": "null", 1992 "paceLength": 10, 1993 "percentage": false, 1994 "pointradius": 2, 1995 "points": false, 1996 "renderer": "flot", 1997 "seriesOverrides": [], 1998 "stack": false, 1999 "steppedLine": false, 2000 "targets": [ 2001 { 2002 "expr": "pg_stat_long_runtime{instance=\"$database\"}", 2003 "format": "time_series", 2004 "intervalFactor": 1, 2005 "legendFormat": "PID: {{pid}}", 2006 "refId": "A" 2007 } 2008 ], 2009 "thresholds": [], 2010 "timeFrom": null, 2011 "timeRegions": [], 2012 "timeShift": null, 2013 "title": "PostgreSQL Deadlocks", 2014 "tooltip": { 2015 "shared": true, 2016 "sort": 0, 2017 "value_type": "individual" 2018 }, 2019 "type": "graph", 2020 "xaxis": { 2021 "buckets": null, 2022 "mode": "time", 2023 "name": null, 2024 "show": true, 2025 "values": [] 2026 }, 2027 "yaxes": [ 2028 { 2029 "decimals": 0, 2030 "format": "dtdurations", 2031 "label": null, 2032 "logBase": 1, 2033 "max": null, 2034 "min": null, 2035 "show": true 2036 }, 2037 { 2038 "format": "short", 2039 "label": null, 2040 "logBase": 1, 2041 "max": null, 2042 "min": null, 2043 "show": true 2044 } 2045 ], 2046 "yaxis": { 2047 "align": false, 2048 "alignLevel": null 2049 } 2050 }, 2051 { 2052 "aliasColors": {}, 2053 "bars": false, 2054 "dashLength": 10, 2055 "dashes": false, 2056 "datasource": "${DS_DEV_PROMETHEUS}", 2057 "decimals": null, 2058 "fill": 1, 2059 "gridPos": { 2060 "h": 7, 2061 "w": 6, 2062 "x": 6, 2063 "y": 25 2064 }, 2065 "id": 40, 2066 "legend": { 2067 "alignAsTable": false, 2068 "avg": false, 2069 "current": true, 2070 "hideEmpty": false, 2071 "max": false, 2072 "min": false, 2073 "rightSide": false, 2074 "show": true, 2075 "total": false, 2076 "values": true 2077 }, 2078 "lines": true, 2079 "linewidth": 1, 2080 "links": [], 2081 "nullPointMode": "null", 2082 "paceLength": 10, 2083 "percentage": false, 2084 "pointradius": 2, 2085 "points": false, 2086 "renderer": "flot", 2087 "seriesOverrides": [], 2088 "stack": false, 2089 "steppedLine": false, 2090 "targets": [ 2091 { 2092 "expr": "pg_stat_database_tup_updated{instance=\"$database\",datname!~\"postgres|template0|template1\"}", 2093 "format": "time_series", 2094 "intervalFactor": 1, 2095 "legendFormat": "{{datname}}", 2096 "refId": "A" 2097 } 2098 ], 2099 "thresholds": [], 2100 "timeFrom": null, 2101 "timeRegions": [], 2102 "timeShift": null, 2103 "title": "Tuple Updated", 2104 "tooltip": { 2105 "shared": true, 2106 "sort": 0, 2107 "value_type": "individual" 2108 }, 2109 "type": "graph", 2110 "xaxis": { 2111 "buckets": null, 2112 "mode": "time", 2113 "name": null, 2114 "show": true, 2115 "values": [] 2116 }, 2117 "yaxes": [ 2118 { 2119 "decimals": 0, 2120 "format": "bytes", 2121 "label": null, 2122 "logBase": 1, 2123 "max": null, 2124 "min": null, 2125 "show": true 2126 }, 2127 { 2128 "format": "short", 2129 "label": null, 2130 "logBase": 1, 2131 "max": null, 2132 "min": null, 2133 "show": true 2134 } 2135 ], 2136 "yaxis": { 2137 "align": false, 2138 "alignLevel": null 2139 } 2140 }, 2141 { 2142 "aliasColors": {}, 2143 "bars": false, 2144 "dashLength": 10, 2145 "dashes": false, 2146 "datasource": "${DS_DEV_PROMETHEUS}", 2147 "decimals": null, 2148 "fill": 1, 2149 "gridPos": { 2150 "h": 7, 2151 "w": 6, 2152 "x": 12, 2153 "y": 25 2154 }, 2155 "id": 41, 2156 "legend": { 2157 "alignAsTable": false, 2158 "avg": false, 2159 "current": true, 2160 "hideEmpty": false, 2161 "max": false, 2162 "min": false, 2163 "rightSide": false, 2164 "show": true, 2165 "total": false, 2166 "values": true 2167 }, 2168 "lines": true, 2169 "linewidth": 1, 2170 "links": [], 2171 "nullPointMode": "null", 2172 "paceLength": 10, 2173 "percentage": false, 2174 "pointradius": 2, 2175 "points": false, 2176 "renderer": "flot", 2177 "seriesOverrides": [], 2178 "stack": false, 2179 "steppedLine": false, 2180 "targets": [ 2181 { 2182 "expr": "pg_stat_database_tup_deleted{instance=\"$database\",datname!~\"postgres|template0|template1\"}", 2183 "format": "time_series", 2184 "intervalFactor": 1, 2185 "legendFormat": "{{datname}}", 2186 "refId": "A" 2187 } 2188 ], 2189 "thresholds": [], 2190 "timeFrom": null, 2191 "timeRegions": [], 2192 "timeShift": null, 2193 "title": "Tuple Deleted", 2194 "tooltip": { 2195 "shared": true, 2196 "sort": 0, 2197 "value_type": "individual" 2198 }, 2199 "type": "graph", 2200 "xaxis": { 2201 "buckets": null, 2202 "mode": "time", 2203 "name": null, 2204 "show": true, 2205 "values": [] 2206 }, 2207 "yaxes": [ 2208 { 2209 "decimals": 0, 2210 "format": "bytes", 2211 "label": null, 2212 "logBase": 1, 2213 "max": null, 2214 "min": null, 2215 "show": true 2216 }, 2217 { 2218 "format": "short", 2219 "label": null, 2220 "logBase": 1, 2221 "max": null, 2222 "min": null, 2223 "show": true 2224 } 2225 ], 2226 "yaxis": { 2227 "align": false, 2228 "alignLevel": null 2229 } 2230 }, 2231 { 2232 "aliasColors": {}, 2233 "bars": false, 2234 "dashLength": 10, 2235 "dashes": false, 2236 "datasource": "${DS_DEV_PROMETHEUS}", 2237 "decimals": null, 2238 "fill": 1, 2239 "gridPos": { 2240 "h": 7, 2241 "w": 6, 2242 "x": 18, 2243 "y": 25 2244 }, 2245 "id": 42, 2246 "legend": { 2247 "alignAsTable": false, 2248 "avg": false, 2249 "current": true, 2250 "hideEmpty": false, 2251 "max": false, 2252 "min": false, 2253 "rightSide": false, 2254 "show": true, 2255 "total": false, 2256 "values": true 2257 }, 2258 "lines": true, 2259 "linewidth": 1, 2260 "links": [], 2261 "nullPointMode": "null", 2262 "paceLength": 10, 2263 "percentage": false, 2264 "pointradius": 2, 2265 "points": false, 2266 "renderer": "flot", 2267 "seriesOverrides": [], 2268 "stack": false, 2269 "steppedLine": false, 2270 "targets": [ 2271 { 2272 "expr": "pg_stat_database_tup_inserted{instance=\"$database\",datname!~\"postgres|template0|template1\"}", 2273 "format": "time_series", 2274 "intervalFactor": 1, 2275 "legendFormat": "{{datname}}", 2276 "refId": "A" 2277 } 2278 ], 2279 "thresholds": [], 2280 "timeFrom": null, 2281 "timeRegions": [], 2282 "timeShift": null, 2283 "title": "Tuple Inserted", 2284 "tooltip": { 2285 "shared": true, 2286 "sort": 0, 2287 "value_type": "individual" 2288 }, 2289 "type": "graph", 2290 "xaxis": { 2291 "buckets": null, 2292 "mode": "time", 2293 "name": null, 2294 "show": true, 2295 "values": [] 2296 }, 2297 "yaxes": [ 2298 { 2299 "decimals": 0, 2300 "format": "bytes", 2301 "label": null, 2302 "logBase": 1, 2303 "max": null, 2304 "min": null, 2305 "show": true 2306 }, 2307 { 2308 "format": "short", 2309 "label": null, 2310 "logBase": 1, 2311 "max": null, 2312 "min": null, 2313 "show": true 2314 } 2315 ], 2316 "yaxis": { 2317 "align": false, 2318 "alignLevel": null 2319 } 2320 }, 2321 { 2322 "aliasColors": {}, 2323 "bars": false, 2324 "dashLength": 10, 2325 "dashes": false, 2326 "datasource": "${DS_DEV_PROMETHEUS}", 2327 "decimals": null, 2328 "fill": 1, 2329 "gridPos": { 2330 "h": 8, 2331 "w": 12, 2332 "x": 0, 2333 "y": 32 2334 }, 2335 "id": 43, 2336 "legend": { 2337 "alignAsTable": false, 2338 "avg": false, 2339 "current": true, 2340 "hideEmpty": false, 2341 "max": false, 2342 "min": false, 2343 "rightSide": false, 2344 "show": true, 2345 "total": false, 2346 "values": true 2347 }, 2348 "lines": true, 2349 "linewidth": 1, 2350 "links": [], 2351 "nullPointMode": "null", 2352 "paceLength": 10, 2353 "percentage": false, 2354 "pointradius": 2, 2355 "points": false, 2356 "renderer": "flot", 2357 "seriesOverrides": [], 2358 "stack": false, 2359 "steppedLine": false, 2360 "targets": [ 2361 { 2362 "expr": "pg_stat_database_blks_hit{instance=\"$database\",datname!~\"postgres|template0|template1\"}/(pg_stat_database_blks_read{instance=\"$database\",datname!~\"postgres|template0|template1\"}+pg_stat_database_blks_hit{instance=\"$database\",datname!~\"postgres|template0|template1\"})", 2363 "format": "time_series", 2364 "intervalFactor": 1, 2365 "legendFormat": "{{datname}}", 2366 "refId": "A" 2367 } 2368 ], 2369 "thresholds": [], 2370 "timeFrom": null, 2371 "timeRegions": [], 2372 "timeShift": null, 2373 "title": "Cache Hit Rate", 2374 "tooltip": { 2375 "shared": true, 2376 "sort": 0, 2377 "value_type": "individual" 2378 }, 2379 "type": "graph", 2380 "xaxis": { 2381 "buckets": null, 2382 "mode": "time", 2383 "name": null, 2384 "show": true, 2385 "values": [] 2386 }, 2387 "yaxes": [ 2388 { 2389 "decimals": 0, 2390 "format": "percentunit", 2391 "label": null, 2392 "logBase": 1, 2393 "max": null, 2394 "min": null, 2395 "show": true 2396 }, 2397 { 2398 "format": "short", 2399 "label": null, 2400 "logBase": 1, 2401 "max": null, 2402 "min": null, 2403 "show": true 2404 } 2405 ], 2406 "yaxis": { 2407 "align": false, 2408 "alignLevel": null 2409 } 2410 }, 2411 { 2412 "aliasColors": {}, 2413 "bars": false, 2414 "dashLength": 10, 2415 "dashes": false, 2416 "datasource": "${DS_DEV_PROMETHEUS}", 2417 "decimals": null, 2418 "fill": 1, 2419 "gridPos": { 2420 "h": 8, 2421 "w": 12, 2422 "x": 12, 2423 "y": 32 2424 }, 2425 "id": 44, 2426 "legend": { 2427 "alignAsTable": false, 2428 "avg": true, 2429 "current": true, 2430 "hideEmpty": false, 2431 "max": false, 2432 "min": false, 2433 "rightSide": false, 2434 "show": true, 2435 "total": false, 2436 "values": true 2437 }, 2438 "lines": true, 2439 "linewidth": 1, 2440 "links": [], 2441 "nullPointMode": "null", 2442 "paceLength": 10, 2443 "percentage": false, 2444 "pointradius": 2, 2445 "points": false, 2446 "renderer": "flot", 2447 "seriesOverrides": [], 2448 "stack": false, 2449 "steppedLine": false, 2450 "targets": [ 2451 { 2452 "expr": "irate(pg_stat_bgwriter_checkpoint_sync_time{instance=\"$database\"}[5m])", 2453 "format": "time_series", 2454 "intervalFactor": 1, 2455 "legendFormat": "checkpoint_sync_time", 2456 "refId": "A" 2457 }, 2458 { 2459 "expr": "irate(pg_stat_bgwriter_checkpoint_write_time{instance=\"$database\"}[5m])", 2460 "format": "time_series", 2461 "intervalFactor": 1, 2462 "legendFormat": "checkpoint_write_time", 2463 "refId": "B" 2464 } 2465 ], 2466 "thresholds": [], 2467 "timeFrom": null, 2468 "timeRegions": [], 2469 "timeShift": null, 2470 "title": "Checkpoint Stats", 2471 "tooltip": { 2472 "shared": true, 2473 "sort": 0, 2474 "value_type": "individual" 2475 }, 2476 "type": "graph", 2477 "xaxis": { 2478 "buckets": null, 2479 "mode": "time", 2480 "name": null, 2481 "show": true, 2482 "values": [] 2483 }, 2484 "yaxes": [ 2485 { 2486 "decimals": 0, 2487 "format": "ms", 2488 "label": null, 2489 "logBase": 1, 2490 "max": null, 2491 "min": null, 2492 "show": true 2493 }, 2494 { 2495 "format": "short", 2496 "label": null, 2497 "logBase": 1, 2498 "max": null, 2499 "min": null, 2500 "show": true 2501 } 2502 ], 2503 "yaxis": { 2504 "align": false, 2505 "alignLevel": null 2506 } 2507 } 2508 ], 2509 "schemaVersion": 18, 2510 "style": "dark", 2511 "tags": [], 2512 "templating": { 2513 "list": [ 2514 { 2515 "allValue": null, 2516 "current": {}, 2517 "datasource": "${DS_DEV_PROMETHEUS}", 2518 "definition": "node_boot_time_seconds", 2519 "hide": 0, 2520 "includeAll": false, 2521 "label": "Server", 2522 "multi": false, 2523 "name": "server", 2524 "options": [], 2525 "query": "node_boot_time_seconds", 2526 "refresh": 1, 2527 "regex": "/.*instance=\"([^\"]*).*/", 2528 "skipUrlSync": false, 2529 "sort": 0, 2530 "tagValuesQuery": "", 2531 "tags": [], 2532 "tagsQuery": "", 2533 "type": "query", 2534 "useTags": false 2535 }, 2536 { 2537 "allValue": null, 2538 "current": {}, 2539 "datasource": "${DS_DEV_PROMETHEUS}", 2540 "definition": "pg_static", 2541 "hide": 0, 2542 "includeAll": false, 2543 "label": "Database", 2544 "multi": false, 2545 "name": "database", 2546 "options": [], 2547 "query": "pg_static", 2548 "refresh": 1, 2549 "regex": "/.*instance=\"([^\"]*).*/", 2550 "skipUrlSync": false, 2551 "sort": 0, 2552 "tagValuesQuery": "", 2553 "tags": [], 2554 "tagsQuery": "", 2555 "type": "query", 2556 "useTags": false 2557 } 2558 ] 2559 }, 2560 "time": { 2561 "from": "now-6h", 2562 "to": "now" 2563 }, 2564 "timepicker": { 2565 "refresh_intervals": [ 2566 "5s", 2567 "10s", 2568 "30s", 2569 "1m", 2570 "5m", 2571 "15m", 2572 "30m", 2573 "1h", 2574 "2h", 2575 "1d" 2576 ], 2577 "time_options": [ 2578 "5m", 2579 "15m", 2580 "1h", 2581 "6h", 2582 "12h", 2583 "24h", 2584 "2d", 2585 "7d", 2586 "30d" 2587 ] 2588 }, 2589 "timezone": "", 2590 "title": "PostgreSQL Database", 2591 "uid": "XfxdINqiz", 2592 "version": 56 2593}

View Code

点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

2020年前端实用代码段,为你的工作保驾护航

有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )

Grafana + Prometheus 监控PostgreSQL - HelloWorld