puppet: Rename check_postgres_backup to check_postgresql_backup.

This commit is contained in:
Alex Vandiver
2020-10-26 14:05:28 -07:00
committed by Tim Abbott
parent 45f6c79c4a
commit 53e59a0a13
7 changed files with 10 additions and 10 deletions

View File

@@ -177,7 +177,7 @@ PostgreSQL server to add:
`/home/zulip/deployments/current/scripts/zulip-puppet-apply`. You
can (and should) monitor that backups are running regularly via
the 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 file
uploads, 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 to
confirm that your backups are working. You may also want to monitor
that 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 replication

View File

@@ -245,7 +245,7 @@ Database monitoring:
* `check_fts_update_log`: Checks whether full-text search updates are
being 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 streaming
replication is up to date.

View File

@@ -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')

View File

@@ -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")

View File

@@ -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',
}
}

View File

@@ -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 {

View File

@@ -261,7 +261,7 @@ define service{
define service {
use generic-service
service_description Check last Postgres backup time
check_command check_postgres_backup
check_command check_postgresql_backup
hostgroup postgresql
contact_groups admins
}