puppet: Rename postgres_appdb in nagios to postgresql.

This commit is contained in:
Alex Vandiver 2020-10-26 14:00:36 -07:00 committed by Tim Abbott
parent 23a289ecd5
commit e124324050
8 changed files with 25 additions and 31 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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