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

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