diff --git a/puppet/zulip/files/nagios_plugins/zulip_postgres_appdb/check_fts_update_log b/puppet/zulip/files/nagios_plugins/zulip_postgresql/check_fts_update_log similarity index 100% rename from puppet/zulip/files/nagios_plugins/zulip_postgres_appdb/check_fts_update_log rename to puppet/zulip/files/nagios_plugins/zulip_postgresql/check_fts_update_log diff --git a/puppet/zulip/files/nagios_plugins/zulip_postgres_appdb/check_postgres_replication_lag b/puppet/zulip/files/nagios_plugins/zulip_postgresql/check_postgres_replication_lag similarity index 100% rename from puppet/zulip/files/nagios_plugins/zulip_postgres_appdb/check_postgres_replication_lag rename to puppet/zulip/files/nagios_plugins/zulip_postgresql/check_postgres_replication_lag diff --git a/puppet/zulip/manifests/postgresql_base.pp b/puppet/zulip/manifests/postgresql_base.pp index beb4f758a8..021bd6e6b2 100644 --- a/puppet/zulip/manifests/postgresql_base.pp +++ b/puppet/zulip/manifests/postgresql_base.pp @@ -62,14 +62,14 @@ class zulip::postgresql_base { mode => '0644', source => 'puppet:///modules/zulip/postgresql/zulip_english.stop', } - file { "${zulip::common::nagios_plugins_dir}/zulip_postgres_appdb": + file { "${zulip::common::nagios_plugins_dir}/zulip_postgresql": require => Package[$zulip::common::nagios_plugins], recurse => true, purge => true, owner => 'root', group => 'root', mode => '0755', - source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgres_appdb', + source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgresql', } $pgroonga = zulipconf('machine', 'pgroonga', '') diff --git a/puppet/zulip_ops/files/nagios3/commands.cfg b/puppet/zulip_ops/files/nagios3/commands.cfg index 931c76d282..0e182cb647 100644 --- a/puppet/zulip_ops/files/nagios3/commands.cfg +++ b/puppet/zulip_ops/files/nagios3/commands.cfg @@ -153,12 +153,12 @@ define command { define command { command_name check_fts_update_log - command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_appdb/check_fts_update_log' + command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgresql/check_fts_update_log' } define command { command_name check_postgres_replication_lag - command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgres_appdb/check_postgres_replication_lag' + command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/zulip_postgresql/check_postgres_replication_lag' } define command { diff --git a/puppet/zulip_ops/files/nagios3/conf.d/hostgroups.cfg b/puppet/zulip_ops/files/nagios3/conf.d/hostgroups.cfg index 881f2b101a..01bcd826b9 100644 --- a/puppet/zulip_ops/files/nagios3/conf.d/hostgroups.cfg +++ b/puppet/zulip_ops/files/nagios3/conf.d/hostgroups.cfg @@ -67,19 +67,13 @@ define hostgroup { } define hostgroup { - hostgroup_name postgres - alias PostgreSQL servers - hostgroup_members postgres_appdb - } - -define hostgroup { - hostgroup_name postgres_appdb + hostgroup_name postgresql alias PostgreSQL app servers - hostgroup_members postgres_appdb_primary + hostgroup_members postgresql_primary } define hostgroup { - hostgroup_name postgres_appdb_primary + hostgroup_name postgresql_primary alias Primary PostgreSQL app servers } diff --git a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg index 59ef289490..755aa66428 100644 --- a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg +++ b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg @@ -158,7 +158,7 @@ define service { use generic-service service_description Check Postgres autovac_freeze check_command check_postgres!zulip!nagios!autovac_freeze - hostgroup postgres_appdb_primary + hostgroup postgresql_primary contact_groups admins } @@ -166,7 +166,7 @@ define service { use generic-service service_description Check Postgres backends check_command check_postgres!zulip!nagios!backends - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -174,7 +174,7 @@ define service { use generic-service service_description Check Postgres connection check_command check_postgres!zulip!nagios!connection - hostgroup postgres_appdb + hostgroup postgresql contact_groups page_admins } @@ -182,7 +182,7 @@ define service { use generic-service service_description Check Postgres disabled triggers check_command check_postgres!zulip!nagios!disabled_triggers - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -190,7 +190,7 @@ define service { use generic-service service_description Check Postgres hitratio check_command check_postgres!zulip!nagios!hitratio - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -198,7 +198,7 @@ define service { use generic-service service_description Check Postgres locks check_command check_postgres_alert_args!zulip!nagios!locks!400!600 - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -206,7 +206,7 @@ define service { use generic-service service_description Check Postgres query_time check_command check_postgres_alert_args!zulip!nagios!query_time!20 seconds!40 seconds - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -214,7 +214,7 @@ define service { use generic-service service_description Check Postgres sequence check_command check_postgres!zulip!nagios!sequence - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -222,7 +222,7 @@ define service { use generic-service service_description Check Postgres timesync check_command check_postgres!zulip!nagios!timesync - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -230,7 +230,7 @@ define service { # use generic-service # service_description Check Postgres txn_idle # check_command check_postgres_alert_args!zulip!nagios!txn_idle!20 seconds!40 seconds -# hostgroup postgres_appdb +# hostgroup postgresql # contact_groups admins # } @@ -238,7 +238,7 @@ define service { use generic-service service_description Check Postgres txn_time check_command check_postgres_alert_args!zulip!nagios!txn_time!20 seconds!40 seconds - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -246,7 +246,7 @@ define service { use generic-service service_description Check FTS update log length check_command check_fts_update_log - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -254,7 +254,7 @@ define service{ use generic-service service_description Check Postgres replication lag check_command check_postgres_replication_lag - hostgroup postgres_appdb + hostgroup postgresql contact_groups admins } @@ -262,7 +262,7 @@ define service { use generic-service service_description Check last Postgres backup time check_command check_postgres_backup - hostgroup postgres + hostgroup postgresql contact_groups admins } diff --git a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb index c186874e92..2825dfaf10 100644 --- a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb +++ b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb @@ -24,7 +24,7 @@ define host{ host_name <%= host %> alias <%= host %> address <%= host %> - hostgroups all,web,frontends,staging_frontends,singletornado_frontends,not_pageable_servers,postgres,postgres_appdb_primary + hostgroups all,web,frontends,staging_frontends,singletornado_frontends,not_pageable_servers,postgresql,postgresql_primary } <% end -%> @@ -64,7 +64,7 @@ define host{ host_name <%= host %> alias <%= host %> address <%= host %>.<%= @default_host_domain %> - hostgroups all,postgres,postgres_appdb_primary,pageable_servers + hostgroups all,postgresql,postgresql_primary,pageable_servers } <% end -%> @@ -74,7 +74,7 @@ define host{ host_name <%= host %> alias <%= host %> address <%= host %>.<%= @default_host_domain %> - hostgroups all,postgres_appdb,pageable_servers + hostgroups all,postgresql,pageable_servers } <% end -%> diff --git a/tools/ci/production-verify b/tools/ci/production-verify index cf6dde0b39..2a0cb57dc3 100755 --- a/tools/ci/production-verify +++ b/tools/ci/production-verify @@ -105,7 +105,7 @@ echo echo "Now running additional Nagios tests" echo if ! /usr/lib/nagios/plugins/zulip_app_frontend/check_queue_worker_errors \ - || ! su zulip -c /usr/lib/nagios/plugins/zulip_postgres_appdb/check_fts_update_log; then # || \ + || ! su zulip -c /usr/lib/nagios/plugins/zulip_postgresql/check_fts_update_log; then # || \ # ! su zulip -c "/usr/lib/nagios/plugins/zulip_app_frontend/check_send_receive_time --site=https://127.0.0.1/api --nagios --insecure"; then set +x echo