Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Rename check_postgres_backup to check_postgresql_backup.
Alex Vandiver53e59a0a1309
diff --git a/docs/production/export-and-import.md b/docs/production/export-and-import.mdindex 9fbe3fb5782..c40aa07ac6b 100644--- a/docs/production/export-and-import.md+++ b/docs/production/export-and-import.md@@ -177,7 +177,7 @@ PostgreSQL server to add:`/home/zulip/deployments/current/scripts/zulip-puppet-apply`. Youcan (and should) monitor that backups are running regularly viathe Nagios plugin installed into- `/usr/lib/nagios/plugins/zulip_postgres_backups/check_postgres_backup`.+ `/usr/lib/nagios/plugins/zulip_postgresql_backups/check_postgresql_backup`.* Any user-uploaded files. If you're using S3 as storage for fileuploads, this is backed up in S3. But if you have instead set@@ -226,7 +226,7 @@ installation from one server to another.We recommend running a disaster recovery after setting up your backups toconfirm that your backups are working. You may also want to monitorthat they are up to date using the Nagios plugin at:-`puppet/zulip/files/nagios_plugins/zulip_postgres_backups/check_postgres_backup`.+`puppet/zulip/files/nagios_plugins/zulip_postgresql_backups/check_postgresql_backup`.## Postgres streaming replicationdiff --git a/docs/production/troubleshooting.md b/docs/production/troubleshooting.mdindex 9a428cc0df5..17a1d9160cc 100644--- a/docs/production/troubleshooting.md+++ b/docs/production/troubleshooting.md@@ -245,7 +245,7 @@ Database monitoring:* `check_fts_update_log`: Checks whether full-text search updates arebeing processed properly or getting backlogged.* `check_postgres`: General checks for database health.-* `check_postgres_backup`: Checks status of Postgres backups.+* `check_postgresql_backup`: Checks status of Postgres backups.* `check_postgres_replication_lag`: Checks whether Postgres streamingreplication is up to date.diff --git a/puppet/zulip/files/nagios_plugins/zulip_postgres_backups/check_postgres_backup b/puppet/zulip/files/nagios_plugins/zulip_postgresql_backups/check_postgresql_backupsimilarity index 93%rename from puppet/zulip/files/nagios_plugins/zulip_postgres_backups/check_postgres_backuprename to puppet/zulip/files/nagios_plugins/zulip_postgresql_backups/check_postgresql_backupindex 1bd65b04129..2bf3a66da51 100755--- a/puppet/zulip/files/nagios_plugins/zulip_postgres_backups/check_postgres_backup+++ b/puppet/zulip/files/nagios_plugins/zulip_postgresql_backups/check_postgresql_backup@@ -22,7 +22,7 @@ if subprocess.check_output(['psql', '-v', 'ON_ERROR_STOP=1',report('OK', 'this is not the primary')try:- with open('/var/lib/nagios_state/last_postgres_backup') as f:+ with open('/var/lib/nagios_state/last_postgresql_backup') as f:last_backup = dateutil.parser.parse(f.read())except OSError:report('UNKNOWN', 'could not determine completion time of last Postgres backup')diff --git a/puppet/zulip/files/postgresql/pg_backup_and_purge b/puppet/zulip/files/postgresql/pg_backup_and_purgeindex ad4f66686fa..51c713ab54d 100755--- a/puppet/zulip/files/postgresql/pg_backup_and_purge+++ b/puppet/zulip/files/postgresql/pg_backup_and_purge@@ -41,7 +41,7 @@ pg_data_path = pg_data_paths[0]run(['env-wal-g', 'backup-push', pg_data_path])now = datetime.now(tz=timezone.utc)-with open('/var/lib/nagios_state/last_postgres_backup', 'w') as f:+with open('/var/lib/nagios_state/last_postgresql_backup', 'w') as f:f.write(now.isoformat())f.write("\n")diff --git a/puppet/zulip/manifests/postgresql_backups.pp b/puppet/zulip/manifests/postgresql_backups.ppindex e82bb0ba1e5..e773054d24d 100644--- a/puppet/zulip/manifests/postgresql_backups.pp+++ b/puppet/zulip/manifests/postgresql_backups.pp@@ -50,13 +50,13 @@ class zulip::postgresql_backups {require => File['/usr/local/bin/pg_backup_and_purge'],}- file { "${zulip::common::nagios_plugins_dir}/zulip_postgres_backups":+ file { "${zulip::common::nagios_plugins_dir}/zulip_postgresql_backups":require => Package[$zulip::common::nagios_plugins],recurse => true,purge => true,owner => 'root',group => 'root',mode => '0755',- source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgres_backups',+ source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgresql_backups',}}diff --git a/puppet/zulip_ops/files/nagios3/commands.cfg b/puppet/zulip_ops/files/nagios3/commands.cfgindex 0e182cb6477..fb0e8464a0c 100644--- a/puppet/zulip_ops/files/nagios3/commands.cfg+++ b/puppet/zulip_ops/files/nagios3/commands.cfg@@ -162,8 +162,8 @@ define command {}define command {- command_name check_postgres_backup- 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_backups/check_postgres_backup'+ command_name check_postgresql_backup+ 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_backups/check_postgresql_backup'}define command {diff --git a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg b/puppet/zulip_ops/files/nagios3/conf.d/services.cfgindex 755aa664285..770243664fe 100644--- a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg+++ b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg@@ -261,7 +261,7 @@ define service{define service {use generic-serviceservice_description Check last Postgres backup time- check_command check_postgres_backup+ check_command check_postgresql_backuphostgroup postgresqlcontact_groups admins}