From 1b2a888bcb8f6b9a713d4ad8889025817de21ad97f4f3d46d45d3a64bd4b58d9 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 8 Mar 2022 17:16:45 +0000 Subject: [PATCH] - added /etc/nrpe.d/check_postgres.cfg, containing some pre-configured nrpe checks for the different check options OBS-URL: https://build.opensuse.org/package/show/server:monitoring/check_postgres?expand=0&rev=22 --- check_postgres.cfg | 60 ++++++++++++++++++++++++++++++++++++++++++ check_postgres.changes | 6 +++++ check_postgres.spec | 7 ++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 check_postgres.cfg diff --git a/check_postgres.cfg b/check_postgres.cfg new file mode 100644 index 0000000..c214972 --- /dev/null +++ b/check_postgres.cfg @@ -0,0 +1,60 @@ +command[check_postgres_archive_ready]=/usr/lib/nagios/plugins/check_postgres_archive_ready -t 30 +command[check_postgres_autovac_freeze]=/usr/lib/nagios/plugins/check_postgres_autovac_freeze -t 30 +command[check_postgres_backends]=/usr/lib/nagios/plugins/check_postgres_backends -t 30 +command[check_postgres_bloat]=/usr/lib/nagios/plugins/check_postgres_bloat -t 30 +command[check_postgres_checkpoint]=/usr/lib/nagios/plugins/check_postgres_checkpoint -t 30 +command[check_postgres_cluster_id]=/usr/lib/nagios/plugins/check_postgres_cluster_id -t 30 +command[check_postgres_commitratio]=/usr/lib/nagios/plugins/check_postgres_commitratio -t 30 +command[check_postgres_connection]=/usr/lib/nagios/plugins/check_postgres_connection -t 30 +command[check_postgres_custom_query]=/usr/lib/nagios/plugins/check_postgres_custom_query -t 30 +command[check_postgres_database_size]=/usr/lib/nagios/plugins/check_postgres_database_size -t 30 +command[check_postgres_dbstats]=/usr/lib/nagios/plugins/check_postgres_dbstats -t 30 +command[check_postgres_disabled_triggers]=/usr/lib/nagios/plugins/check_postgres_disabled_triggers -t 30 +command[check_postgres_disk_space]=/usr/lib/nagios/plugins/check_postgres_disk_space -t 30 +command[check_postgres_fsm_pages]=/usr/lib/nagios/plugins/check_postgres_fsm_pages -t 30 +command[check_postgres_fsm_relations]=/usr/lib/nagios/plugins/check_postgres_fsm_relations -t 30 +command[check_postgres_hitratio]=/usr/lib/nagios/plugins/check_postgres_hitratio -t 30 +command[check_postgres_hot_standby_delay]=/usr/lib/nagios/plugins/check_postgres_hot_standby_delay -t 30 +command[check_postgres_index_size]=/usr/lib/nagios/plugins/check_postgres_index_size -t 30 +command[check_postgres_indexes_size]=/usr/lib/nagios/plugins/check_postgres_indexes_size -t 30 +command[check_postgres_last_analyze]=/usr/lib/nagios/plugins/check_postgres_last_analyze -t 30 +command[check_postgres_last_autoanalyze]=/usr/lib/nagios/plugins/check_postgres_last_autoanalyze -t 30 +command[check_postgres_last_autovacuum]=/usr/lib/nagios/plugins/check_postgres_last_autovacuum -t 30 +command[check_postgres_last_vacuum]=/usr/lib/nagios/plugins/check_postgres_last_vacuum -t 30 +command[check_postgres_listener]=/usr/lib/nagios/plugins/check_postgres_listener -t 30 +command[check_postgres_locks]=/usr/lib/nagios/plugins/check_postgres_locks -t 30 +command[check_postgres_logfile]=/usr/lib/nagios/plugins/check_postgres_logfile -t 30 +command[check_postgres_new_version_bc]=/usr/lib/nagios/plugins/check_postgres_new_version_bc -t 30 +command[check_postgres_new_version_box]=/usr/lib/nagios/plugins/check_postgres_new_version_box -t 30 +command[check_postgres_new_version_cp]=/usr/lib/nagios/plugins/check_postgres_new_version_cp -t 30 +command[check_postgres_new_version_pg]=/usr/lib/nagios/plugins/check_postgres_new_version_pg -t 30 +command[check_postgres_new_version_tnm]=/usr/lib/nagios/plugins/check_postgres_new_version_tnm -t 30 +command[check_postgres_pgagent_jobs]=/usr/lib/nagios/plugins/check_postgres_pgagent_jobs -t 30 +command[check_postgres_pgb_pool_cl_active]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_cl_active -t 30 +command[check_postgres_pgb_pool_cl_waiting]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_cl_waiting -t 30 +command[check_postgres_pgb_pool_maxwait]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_maxwait -t 30 +command[check_postgres_pgb_pool_sv_active]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_sv_active -t 30 +command[check_postgres_pgb_pool_sv_idle]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_sv_idle -t 30 +command[check_postgres_pgb_pool_sv_login]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_sv_login -t 30 +command[check_postgres_pgb_pool_sv_tested]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_sv_tested -t 30 +command[check_postgres_pgb_pool_sv_used]=/usr/lib/nagios/plugins/check_postgres_pgb_pool_sv_used -t 30 +command[check_postgres_pgbouncer_backends]=/usr/lib/nagios/plugins/check_postgres_pgbouncer_backends -t 30 +command[check_postgres_pgbouncer_checksum]=/usr/lib/nagios/plugins/check_postgres_pgbouncer_checksum -t 30 +command[check_postgres_prepared_txns]=/usr/lib/nagios/plugins/check_postgres_prepared_txns -t 30 +command[check_postgres_query_runtime]=/usr/lib/nagios/plugins/check_postgres_query_runtime -t 30 +command[check_postgres_query_time]=/usr/lib/nagios/plugins/check_postgres_query_time -t 30 +command[check_postgres_relation_size]=/usr/lib/nagios/plugins/check_postgres_relation_size -t 30 +command[check_postgres_replicate_row]=/usr/lib/nagios/plugins/check_postgres_replicate_row -t 30 +command[check_postgres_replication_slots]=/usr/lib/nagios/plugins/check_postgres_replication_slots -t 30 +command[check_postgres_same_schema]=/usr/lib/nagios/plugins/check_postgres_same_schema -t 30 +command[check_postgres_sequence]=/usr/lib/nagios/plugins/check_postgres_sequence -t 30 +command[check_postgres_settings_checksum]=/usr/lib/nagios/plugins/check_postgres_settings_checksum -t 30 +command[check_postgres_slony_status]=/usr/lib/nagios/plugins/check_postgres_slony_status -t 30 +command[check_postgres_table_size]=/usr/lib/nagios/plugins/check_postgres_table_size -t 30 +command[check_postgres_timesync]=/usr/lib/nagios/plugins/check_postgres_timesync -t 30 +command[check_postgres_total_relation_size]=/usr/lib/nagios/plugins/check_postgres_total_relation_size -t 30 +command[check_postgres_txn_idle]=/usr/lib/nagios/plugins/check_postgres_txn_idle -t 30 +command[check_postgres_txn_time]=/usr/lib/nagios/plugins/check_postgres_txn_time -t 30 +command[check_postgres_txn_wraparound]=/usr/lib/nagios/plugins/check_postgres_txn_wraparound -t 30 +command[check_postgres_version]=/usr/lib/nagios/plugins/check_postgres_version -t 30 +command[check_postgres_wal_files]=/usr/lib/nagios/plugins/check_postgres_wal_files -t 30 diff --git a/check_postgres.changes b/check_postgres.changes index 8748dc4..27f86b2 100644 --- a/check_postgres.changes +++ b/check_postgres.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 8 17:14:04 UTC 2022 - Lars Vogdt + +- added /etc/nrpe.d/check_postgres.cfg, containing some pre-configured + nrpe checks for the different check options + ------------------------------------------------------------------- Tue Feb 4 17:34:30 UTC 2020 - Martin Hauke diff --git a/check_postgres.spec b/check_postgres.spec index c077740..5720e42 100644 --- a/check_postgres.spec +++ b/check_postgres.spec @@ -1,7 +1,7 @@ # # spec file for package check_postgres # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ URL: http://bucardo.org/wiki/Check_postgres Source: https://github.com/bucardo/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: nagios-commands-postgres.cfg Source2: create_manpage.pl +Source3: check_postgres.cfg BuildRequires: nagios-rpm-macros BuildRequires: perl-macros BuildRequires: perl(Cwd) @@ -101,6 +102,8 @@ popd # create man page mkdir -p %{buildroot}/%{_mandir}/man1 perl %{SOURCE2} "%{version}" "1" check_postgres.pl > %{buildroot}/%{_mandir}/man1/check_postgres.pl.1 +# install nrpe snipplets +install -D -m0644 %{SOURCE3} %{buildroot}%{nrpe_sysconfdir}/check_postgres.cfg %files -f %{name}.files %doc MANIFEST README* TODO nagios-commands-postgres.cfg check_postgres.pl.html @@ -115,6 +118,8 @@ perl %{SOURCE2} "%{version}" "1" check_postgres.pl > %{buildroot}/%{_mandir}/man # avoid build dependecy of nagios - own the dirs %dir %{nagios_libdir} %dir %{nagios_plugindir} +%dir %{nrpe_sysconfdir} +%config(noreplace) %{nrpe_sysconfdir}/check_postgres.cfg %{nagios_plugindir}/* %changelog