Skip to content

Instantly share code, notes, and snippets.

@skihero
Created November 5, 2014 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skihero/e6ee7a1b4179bb9631d4 to your computer and use it in GitHub Desktop.
Save skihero/e6ee7a1b4179bb9631d4 to your computer and use it in GitHub Desktop.
action_info
Quick hash to put normal action information in one place:
our $action_info = {
# Name # clusterwide? # helpstring
archive_ready => [1, 'Check the number of WAL files ready in the pg_xlog/archive_status'],
autovac_freeze => [1, 'Checks how close databases are to autovacuum_freeze_max_age.'],
backends => [1, 'Number of connections, compared to max_connections.'],
bloat => [0, 'Check for table and index bloat.'],
checkpoint => [1, 'Checks how long since the last checkpoint'],
cluster_id => [1, 'Checks the Database System Identifier'],
commitratio => [0, 'Report if the commit ratio of a database is too low.'],
connection => [0, 'Simple connection check.'],
custom_query => [0, 'Run a custom query.'],
database_size => [0, 'Report if a database is too big.'],
dbstats => [1, 'Returns stats from pg_stat_database: Cacti output only'],
disabled_triggers => [0, 'Check if any triggers are disabled'],
disk_space => [1, 'Checks space of local disks Postgres is using.'],
fsm_pages => [1, 'Checks percentage of pages used in free space map.'],
fsm_relations => [1, 'Checks percentage of relations used in free space map.'],
hitratio => [0, 'Report if the hit ratio of a database is too low.'],
hot_standby_delay => [1, 'Check the replication delay in hot standby setup'],
index_size => [0, 'Checks the size of indexes only.'],
table_size => [0, 'Checks the size of tables only.'],
relation_size => [0, 'Checks the size of tables and indexes.'],
last_analyze => [0, 'Check the maximum time in seconds since any one table has been analyzed.'],
last_vacuum => [0, 'Check the maximum time in seconds since any one table has been vacuumed.'],
last_autoanalyze => [0, 'Check the maximum time in seconds since any one table has been autoanalyzed.'],
last_autovacuum => [0, 'Check the maximum time in seconds since any one table has been autovacuumed.'],
listener => [0, 'Checks for specific listeners.'],
locks => [0, 'Checks the number of locks.'],
logfile => [1, 'Checks that the logfile is being written to correctly.'],
new_version_bc => [0, 'Checks if a newer version of Bucardo is available.'],
new_version_box => [0, 'Checks if a newer version of boxinfo is available.'],
new_version_cp => [0, 'Checks if a newer version of check_postgres.pl is available.'],
new_version_pg => [0, 'Checks if a newer version of Postgres is available.'],
new_version_tnm => [0, 'Checks if a newer version of tail_n_mail is available.'],
pgb_pool_cl_active => [1, 'Check the number of active clients in each pgbouncer pool.'],
pgb_pool_cl_waiting => [1, 'Check the number of waiting clients in each pgbouncer pool.'],
pgb_pool_sv_active => [1, 'Check the number of active server connections in each pgbouncer pool.'],
pgb_pool_sv_idle => [1, 'Check the number of idle server connections in each pgbouncer pool.'],
pgb_pool_sv_used => [1, 'Check the number of used server connections in each pgbouncer pool.'],
pgb_pool_sv_tested => [1, 'Check the number of tested server connections in each pgbouncer pool.'],
pgb_pool_sv_login => [1, 'Check the number of login server connections in each pgbouncer pool.'],
pgb_pool_maxwait => [1, 'Check the current maximum wait time for client connections in pgbouncer pools.'],
pgbouncer_backends => [0, 'Check how many clients are connected to pgbouncer compared to max_client_conn.'],
pgbouncer_checksum => [0, 'Check that no pgbouncer settings have changed since the last check.'],
pgagent_jobs => [0, 'Check for no failed pgAgent jobs within a specified period of time.'],
prepared_txns => [1, 'Checks number and age of prepared transactions.'],
query_runtime => [0, 'Check how long a specific query takes to run.'],
query_time => [1, 'Checks the maximum running time of current queries.'],
replicate_row => [0, 'Verify a simple update gets replicated to another server.'],
same_schema => [0, 'Verify that two databases have the exact same tables, columns, etc.'],
sequence => [0, 'Checks remaining calls left in sequences.'],
settings_checksum => [0, 'Check that no settings have changed since the last check.'],
slony_status => [1, 'Ensure Slony is up to date via sl_status.'],
timesync => [0, 'Compare database time to local system time.'],
txn_idle => [1, 'Checks the maximum "idle in transaction" time.'],
txn_time => [1, 'Checks the maximum open transaction time.'],
txn_wraparound => [1, 'See how close databases are getting to transaction ID wraparound.'],
version => [1, 'Check for proper Postgres version.'],
wal_files => [1, 'Check the number of WAL files in the pg_xlog directory'],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment