sensu-plugins / sensu-plugins-postgres

This plugin provides native PostgreSQL instrumentation for monitoring and metrics collection, including: service health, database connectivity, database locks, replication status, database size, `pg_stat_bgwriter` metrics, and more.
http://sensu-plugins.io
MIT License
16 stars 43 forks source link

Assist in visualizing the PostgreSQL vacuum process #135

Closed phumpal closed 4 years ago

phumpal commented 4 years ago

Use sensu to aggregate vacuum metrics from the pg_stat_progress_vacuum view.

Per https://www.postgresql.org/docs/12/progress-reporting.html#VACUUM-PROGRESS-REPORTING

Pull Request Checklist

Is this in reference to an existing issue?

General

New Plugins

Purpose

Known Compatibility Issues

phumpal commented 4 years ago

I may need to wait a day or two to accumulate a nice chart for these but will circle back when I have test results.

phumpal commented 4 years ago

Example output

staging-postgres-test-1.postgresql.vacuum.test_db.pid 24186 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.relid 154544 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.phase 2 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.heap_blks_total 82308 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.heap_blks_scanned 82308 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.heap_blks_vacuumed 0 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.index_vacuum_count 0 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.max_dead_tuples 96218052 1591329314
staging-postgres-test-1.postgresql.vacuum.test_db.num_dead_tuples 85 1591329314
phumpal commented 4 years ago

PTAL

phumpal commented 4 years ago

Gentle ping @majormoses @jspaleta

majormoses commented 4 years ago

released: https://rubygems.org/gems/sensu-plugins-postgres/versions/4.1.0

phumpal commented 4 years ago

Awesome. Thanks again @majormoses !