github.com/netdata/go.d.plugin@v0.58.1/modules/postgres/metadata.yaml (about) 1 plugin_name: go.d.plugin 2 modules: 3 - meta: 4 id: collector-go.d.plugin-postgres 5 plugin_name: go.d.plugin 6 module_name: postgres 7 monitored_instance: 8 name: PostgreSQL 9 link: https://www.postgresql.org/ 10 categories: 11 - data-collection.database-servers 12 icon_filename: postgres.svg 13 related_resources: 14 integrations: 15 list: 16 - plugin_name: apps.plugin 17 module_name: apps 18 - plugin_name: cgroups.plugin 19 module_name: cgroups 20 alternative_monitored_instances: [] 21 info_provided_to_referring_integrations: 22 description: "" 23 keywords: 24 - db 25 - database 26 - postgres 27 - postgresql 28 - sql 29 most_popular: true 30 overview: 31 multi_instance: true 32 data_collection: 33 metrics_description: | 34 This collector monitors the activity and performance of Postgres servers, collects replication statistics, metrics for each database, table and index, and more. 35 method_description: | 36 It establishes a connection to the Postgres instance via a TCP or UNIX socket. 37 To collect metrics for database tables and indexes, it establishes an additional connection for each discovered database. 38 default_behavior: 39 auto_detection: 40 description: | 41 By default, it detects instances running on localhost by trying to connect as root and netdata using known PostgreSQL TCP and UNIX sockets: 42 43 - 127.0.0.1:5432 44 - /var/run/postgresql/ 45 limits: 46 description: | 47 Table and index metrics are not collected for databases with more than 50 tables or 250 indexes. 48 These limits can be changed in the configuration file. 49 performance_impact: 50 description: "" 51 additional_permissions: 52 description: "" 53 supported_platforms: 54 include: [] 55 exclude: [] 56 setup: 57 prerequisites: 58 list: 59 - title: Create netdata user 60 description: | 61 Create a user with granted `pg_monitor` 62 or `pg_read_all_stat` [built-in role](https://www.postgresql.org/docs/current/predefined-roles.html). 63 64 To create the `netdata` user with these permissions, execute the following in the psql session, as a user with CREATEROLE privileges: 65 66 ```postgresql 67 CREATE USER netdata; 68 GRANT pg_monitor TO netdata; 69 ``` 70 71 After creating the new user, restart the Netdata agent with `sudo systemctl restart netdata`, or 72 the [appropriate method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your 73 system. 74 configuration: 75 file: 76 name: go.d/postgres.conf 77 options: 78 description: | 79 The following options can be defined globally: update_every, autodetection_retry. 80 folding: 81 title: Config options 82 enabled: true 83 list: 84 - name: update_every 85 description: Data collection frequency. 86 default_value: 5 87 required: false 88 - name: autodetection_retry 89 description: Recheck interval in seconds. Zero means no recheck will be scheduled. 90 default_value: 0 91 required: false 92 - name: dsn 93 description: Postgres server DSN (Data Source Name). See [DSN syntax](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING). 94 default_value: postgres://postgres:postgres@127.0.0.1:5432/postgres 95 required: true 96 - name: timeout 97 description: Query timeout in seconds. 98 default_value: 2 99 required: false 100 - name: collect_databases_matching 101 description: Databases selector. Determines which database metrics will be collected. Syntax is [simple patterns](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#simple-patterns-matcher). 102 default_value: "" 103 required: false 104 - name: max_db_tables 105 description: Maximum number of tables in the database. Table metrics will not be collected for databases that have more tables than max_db_tables. 0 means no limit. 106 default_value: 50 107 required: false 108 - name: max_db_indexes 109 description: Maximum number of indexes in the database. Index metrics will not be collected for databases that have more indexes than max_db_indexes. 0 means no limit. 110 default_value: 250 111 required: false 112 examples: 113 folding: 114 title: Config 115 enabled: true 116 list: 117 - name: TCP socket 118 description: An example configuration. 119 folding: 120 enabled: false 121 config: | 122 jobs: 123 - name: local 124 dsn: 'postgresql://netdata@127.0.0.1:5432/postgres' 125 - name: Unix socket 126 description: An example configuration. 127 config: | 128 jobs: 129 - name: local 130 dsn: 'host=/var/run/postgresql dbname=postgres user=netdata' 131 - name: Multi-instance 132 description: | 133 > **Note**: When you define multiple jobs, their names must be unique. 134 135 Local and remote instances. 136 config: | 137 jobs: 138 - name: local 139 dsn: 'postgresql://netdata@127.0.0.1:5432/postgres' 140 141 - name: remote 142 dsn: 'postgresql://netdata@203.0.113.0:5432/postgres' 143 troubleshooting: 144 problems: 145 list: [] 146 alerts: 147 - name: postgres_total_connection_utilization 148 metric: postgres.connections_utilization 149 info: average total connection utilization over the last minute 150 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 151 - name: postgres_acquired_locks_utilization 152 metric: postgres.locks_utilization 153 info: average acquired locks utilization over the last minute 154 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 155 - name: postgres_txid_exhaustion_perc 156 metric: postgres.txid_exhaustion_perc 157 info: percent towards TXID wraparound 158 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 159 - name: postgres_db_cache_io_ratio 160 metric: postgres.db_cache_io_ratio 161 info: average cache hit ratio in db ${label:database} over the last minute 162 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 163 - name: postgres_db_transactions_rollback_ratio 164 metric: postgres.db_cache_io_ratio 165 info: average aborted transactions percentage in db ${label:database} over the last five minutes 166 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 167 - name: postgres_db_deadlocks_rate 168 metric: postgres.db_deadlocks_rate 169 info: number of deadlocks detected in db ${label:database} in the last minute 170 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 171 - name: postgres_table_cache_io_ratio 172 metric: postgres.table_cache_io_ratio 173 info: average cache hit ratio in db ${label:database} table ${label:table} over the last minute 174 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 175 - name: postgres_table_index_cache_io_ratio 176 metric: postgres.table_index_cache_io_ratio 177 info: average index cache hit ratio in db ${label:database} table ${label:table} over the last minute 178 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 179 - name: postgres_table_toast_cache_io_ratio 180 metric: postgres.table_toast_cache_io_ratio 181 info: average TOAST hit ratio in db ${label:database} table ${label:table} over the last minute 182 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 183 - name: postgres_table_toast_index_cache_io_ratio 184 metric: postgres.table_toast_index_cache_io_ratio 185 info: average index TOAST hit ratio in db ${label:database} table ${label:table} over the last minute 186 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 187 - name: postgres_table_bloat_size_perc 188 metric: postgres.table_bloat_size_perc 189 info: bloat size percentage in db ${label:database} table ${label:table} 190 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 191 - name: postgres_table_last_autovacuum_time 192 metric: postgres.table_autovacuum_since_time 193 info: time elapsed since db ${label:database} table ${label:table} was vacuumed by the autovacuum daemon 194 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 195 - name: postgres_table_last_autoanalyze_time 196 metric: postgres.table_autoanalyze_since_time 197 info: time elapsed since db ${label:database} table ${label:table} was analyzed by the autovacuum daemon 198 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 199 - name: postgres_index_bloat_size_perc 200 metric: postgres.index_bloat_size_perc 201 info: bloat size percentage in db ${label:database} table ${label:table} index ${label:index} 202 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/postgres.conf 203 metrics: 204 folding: 205 title: Metrics 206 enabled: false 207 description: "" 208 availability: [] 209 scopes: 210 - name: global 211 description: These metrics refer to the entire monitored application. 212 labels: [] 213 metrics: 214 - name: postgres.connections_utilization 215 description: Connections utilization 216 unit: percentage 217 chart_type: line 218 dimensions: 219 - name: used 220 - name: postgres.connections_usage 221 description: Connections usage 222 unit: connections 223 chart_type: stacked 224 dimensions: 225 - name: available 226 - name: used 227 - name: postgres.connections_state_count 228 description: Connections in each state 229 unit: connections 230 chart_type: stacked 231 dimensions: 232 - name: active 233 - name: idle 234 - name: idle_in_transaction 235 - name: idle_in_transaction_aborted 236 - name: disabled 237 - name: postgres.transactions_duration 238 description: Observed transactions time 239 unit: transactions/s 240 chart_type: stacked 241 dimensions: 242 - name: a dimension per bucket 243 - name: postgres.queries_duration 244 description: Observed active queries time 245 unit: queries/s 246 chart_type: stacked 247 dimensions: 248 - name: a dimension per bucket 249 - name: postgres.locks_utilization 250 description: Acquired locks utilization 251 unit: percentage 252 chart_type: line 253 dimensions: 254 - name: used 255 - name: postgres.checkpoints_rate 256 description: Checkpoints 257 unit: checkpoints/s 258 chart_type: stacked 259 dimensions: 260 - name: scheduled 261 - name: requested 262 - name: postgres.checkpoints_time 263 description: Checkpoint time 264 unit: milliseconds 265 chart_type: stacked 266 dimensions: 267 - name: write 268 - name: sync 269 - name: postgres.bgwriter_halts_rate 270 description: Background writer scan halts 271 unit: events/s 272 chart_type: line 273 dimensions: 274 - name: maxwritten 275 - name: postgres.buffers_io_rate 276 description: Buffers written rate 277 unit: B/s 278 chart_type: area 279 dimensions: 280 - name: checkpoint 281 - name: backend 282 - name: bgwriter 283 - name: postgres.buffers_backend_fsync_rate 284 description: Backend fsync calls 285 unit: calls/s 286 chart_type: line 287 dimensions: 288 - name: fsync 289 - name: postgres.buffers_allocated_rate 290 description: Buffers allocated 291 unit: B/s 292 chart_type: line 293 dimensions: 294 - name: allocated 295 - name: postgres.wal_io_rate 296 description: Write-Ahead Log writes 297 unit: B/s 298 chart_type: line 299 dimensions: 300 - name: write 301 - name: postgres.wal_files_count 302 description: Write-Ahead Log files 303 unit: files 304 chart_type: stacked 305 dimensions: 306 - name: written 307 - name: recycled 308 - name: postgres.wal_archiving_files_count 309 description: Write-Ahead Log archived files 310 unit: files/s 311 chart_type: stacked 312 dimensions: 313 - name: ready 314 - name: done 315 - name: postgres.autovacuum_workers_count 316 description: Autovacuum workers 317 unit: workers 318 chart_type: line 319 dimensions: 320 - name: analyze 321 - name: vacuum_analyze 322 - name: vacuum 323 - name: vacuum_freeze 324 - name: brin_summarize 325 - name: postgres.txid_exhaustion_towards_autovacuum_perc 326 description: Percent towards emergency autovacuum 327 unit: percentage 328 chart_type: line 329 dimensions: 330 - name: emergency_autovacuum 331 - name: postgres.txid_exhaustion_perc 332 description: Percent towards transaction ID wraparound 333 unit: percentage 334 chart_type: line 335 dimensions: 336 - name: txid_exhaustion 337 - name: postgres.txid_exhaustion_oldest_txid_num 338 description: Oldest transaction XID 339 chart_type: line 340 unit: xid 341 dimensions: 342 - name: xid 343 - name: postgres.catalog_relations_count 344 description: Relation count 345 unit: relations 346 chart_type: stacked 347 dimensions: 348 - name: ordinary_table 349 - name: index 350 - name: sequence 351 - name: toast_table 352 - name: view 353 - name: materialized_view 354 - name: composite_type 355 - name: foreign_table 356 - name: partitioned_table 357 - name: partitioned_index 358 - name: postgres.catalog_relations_size 359 description: Relation size 360 unit: B 361 chart_type: stacked 362 dimensions: 363 - name: ordinary_table 364 - name: index 365 - name: sequence 366 - name: toast_table 367 - name: view 368 - name: materialized_view 369 - name: composite_type 370 - name: foreign_table 371 - name: partitioned_table 372 - name: partitioned_index 373 - name: postgres.uptime 374 description: Uptime 375 unit: seconds 376 chart_type: line 377 dimensions: 378 - name: uptime 379 - name: postgres.databases_count 380 description: Number of databases 381 unit: databases 382 chart_type: line 383 dimensions: 384 - name: databases 385 - name: repl application 386 description: These metrics refer to the replication application. 387 labels: 388 - name: application 389 description: application name 390 metrics: 391 - name: postgres.replication_app_wal_lag_size 392 description: Standby application WAL lag size 393 unit: B 394 chart_type: line 395 dimensions: 396 - name: sent_lag 397 - name: write_lag 398 - name: flush_lag 399 - name: replay_lag 400 - name: postgres.replication_app_wal_lag_time 401 description: Standby application WAL lag time 402 unit: seconds 403 chart_type: line 404 dimensions: 405 - name: write_lag 406 - name: flush_lag 407 - name: replay_lag 408 - name: repl slot 409 description: These metrics refer to the replication slot. 410 labels: 411 - name: slot 412 description: replication slot name 413 metrics: 414 - name: postgres.replication_slot_files_count 415 description: Replication slot files 416 unit: files 417 chart_type: line 418 dimensions: 419 - name: wal_keep 420 - name: pg_replslot_files 421 - name: database 422 description: These metrics refer to the database. 423 labels: 424 - name: database 425 description: database name 426 metrics: 427 - name: postgres.db_transactions_ratio 428 description: Database transactions ratio 429 unit: percentage 430 chart_type: line 431 dimensions: 432 - name: committed 433 - name: rollback 434 - name: postgres.db_transactions_rate 435 description: Database transactions 436 unit: transactions/s 437 chart_type: line 438 dimensions: 439 - name: committed 440 - name: rollback 441 - name: postgres.db_connections_utilization 442 description: Database connections utilization 443 unit: percentage 444 chart_type: line 445 dimensions: 446 - name: used 447 - name: postgres.db_connections_count 448 description: Database connections 449 unit: connections 450 chart_type: line 451 dimensions: 452 - name: connections 453 - name: postgres.db_cache_io_ratio 454 description: Database buffer cache miss ratio 455 unit: percentage 456 chart_type: line 457 dimensions: 458 - name: miss 459 - name: postgres.db_io_rate 460 description: Database reads 461 unit: B/s 462 chart_type: line 463 dimensions: 464 - name: memory 465 - name: disk 466 - name: postgres.db_ops_fetched_rows_ratio 467 description: Database rows fetched ratio 468 unit: percentage 469 chart_type: line 470 dimensions: 471 - name: fetched 472 - name: postgres.db_ops_read_rows_rate 473 description: Database rows read 474 unit: rows/s 475 chart_type: line 476 dimensions: 477 - name: returned 478 - name: fetched 479 - name: postgres.db_ops_write_rows_rate 480 description: Database rows written 481 unit: rows/s 482 chart_type: line 483 dimensions: 484 - name: inserted 485 - name: deleted 486 - name: updated 487 - name: postgres.db_conflicts_rate 488 description: Database canceled queries 489 unit: queries/s 490 chart_type: line 491 dimensions: 492 - name: conflicts 493 - name: postgres.db_conflicts_reason_rate 494 description: Database canceled queries by reason 495 unit: queries/s 496 chart_type: line 497 dimensions: 498 - name: tablespace 499 - name: lock 500 - name: snapshot 501 - name: bufferpin 502 - name: deadlock 503 - name: postgres.db_deadlocks_rate 504 description: Database deadlocks 505 unit: deadlocks/s 506 chart_type: line 507 dimensions: 508 - name: deadlocks 509 - name: postgres.db_locks_held_count 510 description: Database locks held 511 unit: locks 512 chart_type: stacked 513 dimensions: 514 - name: access_share 515 - name: row_share 516 - name: row_exclusive 517 - name: share_update 518 - name: share 519 - name: share_row_exclusive 520 - name: exclusive 521 - name: access_exclusive 522 - name: postgres.db_locks_awaited_count 523 description: Database locks awaited 524 unit: locks 525 chart_type: stacked 526 dimensions: 527 - name: access_share 528 - name: row_share 529 - name: row_exclusive 530 - name: share_update 531 - name: share 532 - name: share_row_exclusive 533 - name: exclusive 534 - name: access_exclusive 535 - name: postgres.db_temp_files_created_rate 536 description: Database created temporary files 537 unit: files/s 538 chart_type: line 539 dimensions: 540 - name: created 541 - name: postgres.db_temp_files_io_rate 542 description: Database temporary files data written to disk 543 unit: B/s 544 chart_type: line 545 dimensions: 546 - name: written 547 - name: postgres.db_size 548 description: Database size 549 unit: B 550 chart_type: line 551 dimensions: 552 - name: size 553 - name: table 554 description: These metrics refer to the database table. 555 labels: 556 - name: database 557 description: database name 558 - name: schema 559 description: schema name 560 - name: table 561 description: table name 562 - name: parent_table 563 description: parent table name 564 metrics: 565 - name: postgres.table_rows_dead_ratio 566 description: Table dead rows 567 unit: percentage 568 chart_type: line 569 dimensions: 570 - name: dead 571 - name: postgres.table_rows_count 572 description: Table total rows 573 unit: rows 574 chart_type: line 575 dimensions: 576 - name: live 577 - name: dead 578 - name: postgres.table_ops_rows_rate 579 description: Table throughput 580 unit: rows/s 581 chart_type: line 582 dimensions: 583 - name: inserted 584 - name: deleted 585 - name: updated 586 - name: postgres.table_ops_rows_hot_ratio 587 description: Table HOT updates ratio 588 unit: percentage 589 chart_type: line 590 dimensions: 591 - name: hot 592 - name: postgres.table_ops_rows_hot_rate 593 description: Table HOT updates 594 unit: rows/s 595 chart_type: line 596 dimensions: 597 - name: hot 598 - name: postgres.table_cache_io_ratio 599 description: Table I/O cache miss ratio 600 unit: percentage 601 chart_type: line 602 dimensions: 603 - name: miss 604 - name: postgres.table_io_rate 605 description: Table I/O 606 unit: B/s 607 chart_type: line 608 dimensions: 609 - name: memory 610 - name: disk 611 - name: postgres.table_index_cache_io_ratio 612 description: Table index I/O cache miss ratio 613 unit: percentage 614 chart_type: line 615 dimensions: 616 - name: miss 617 - name: postgres.table_index_io_rate 618 description: Table index I/O 619 unit: B/s 620 chart_type: line 621 dimensions: 622 - name: memory 623 - name: disk 624 - name: postgres.table_toast_cache_io_ratio 625 description: Table TOAST I/O cache miss ratio 626 unit: percentage 627 chart_type: line 628 dimensions: 629 - name: miss 630 - name: postgres.table_toast_io_rate 631 description: Table TOAST I/O 632 unit: B/s 633 chart_type: line 634 dimensions: 635 - name: memory 636 - name: disk 637 - name: postgres.table_toast_index_cache_io_ratio 638 description: Table TOAST index I/O cache miss ratio 639 unit: percentage 640 chart_type: line 641 dimensions: 642 - name: miss 643 - name: postgres.table_toast_index_io_rate 644 description: Table TOAST index I/O 645 unit: B/s 646 chart_type: line 647 dimensions: 648 - name: memory 649 - name: disk 650 - name: postgres.table_scans_rate 651 description: Table scans 652 unit: scans/s 653 chart_type: line 654 dimensions: 655 - name: index 656 - name: sequential 657 - name: postgres.table_scans_rows_rate 658 description: Table live rows fetched by scans 659 unit: rows/s 660 chart_type: line 661 dimensions: 662 - name: index 663 - name: sequential 664 - name: postgres.table_autovacuum_since_time 665 description: Table time since last auto VACUUM 666 unit: seconds 667 chart_type: line 668 dimensions: 669 - name: time 670 - name: postgres.table_vacuum_since_time 671 description: Table time since last manual VACUUM 672 unit: seconds 673 chart_type: line 674 dimensions: 675 - name: time 676 - name: postgres.table_autoanalyze_since_time 677 description: Table time since last auto ANALYZE 678 unit: seconds 679 chart_type: line 680 dimensions: 681 - name: time 682 - name: postgres.table_analyze_since_time 683 description: Table time since last manual ANALYZE 684 unit: seconds 685 chart_type: line 686 dimensions: 687 - name: time 688 - name: postgres.table_null_columns 689 description: Table null columns 690 unit: columns 691 chart_type: line 692 dimensions: 693 - name: "null" 694 - name: postgres.table_size 695 description: Table total size 696 unit: B 697 chart_type: line 698 dimensions: 699 - name: size 700 - name: postgres.table_bloat_size_perc 701 description: Table bloat size percentage 702 unit: percentage 703 chart_type: line 704 dimensions: 705 - name: bloat 706 - name: postgres.table_bloat_size 707 description: Table bloat size 708 unit: B 709 chart_type: line 710 dimensions: 711 - name: bloat 712 - name: index 713 description: These metrics refer to the table index. 714 labels: 715 - name: database 716 description: database name 717 - name: schema 718 description: schema name 719 - name: table 720 description: table name 721 - name: parent_table 722 description: parent table name 723 - name: index 724 description: index name 725 metrics: 726 - name: postgres.index_size 727 description: Index size 728 unit: B 729 chart_type: line 730 dimensions: 731 - name: size 732 - name: postgres.index_bloat_size_perc 733 description: Index bloat size percentage 734 unit: percentage 735 chart_type: line 736 dimensions: 737 - name: bloat 738 - name: postgres.index_bloat_size 739 description: Index bloat size 740 unit: B 741 chart_type: line 742 dimensions: 743 - name: bloat 744 - name: postgres.index_usage_status 745 description: Index usage status 746 unit: status 747 chart_type: line 748 dimensions: 749 - name: used 750 - name: unused