Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

nagios: Split postgresql into primary and replica.

Alex Vandiver499284d2fd24
diff --git a/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg b/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
index d6f3c4ed8d4..05caf7bb02b 100644
--- a/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
+++ b/puppet/zulip_ops/files/nagios4/conf.d/hostgroups.cfg
@@ -68,7 +68,7 @@ define hostgroup {
define hostgroup {
hostgroup_name postgresql
alias PostgreSQL app servers
- hostgroup_members postgresql_primary
+ hostgroup_members postgresql_primary, postgresql_replica
}
define hostgroup {
@@ -76,6 +76,11 @@ define hostgroup {
alias Primary PostgreSQL app servers
}
+define hostgroup {
+ hostgroup_name postgresql_replica
+ alias Replica PostgreSQL servers
+}
+
define hostgroup {
hostgroup_name smokescreen
alias Servers that run the Smokescreen HTTP proxy
diff --git a/puppet/zulip_ops/files/nagios4/conf.d/services.cfg b/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
index 8457d99a2f3..746af147d61 100644
--- a/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
+++ b/puppet/zulip_ops/files/nagios4/conf.d/services.cfg
@@ -229,7 +229,7 @@ define service {
define service {
use generic-service
service_description Check PostgreSQL autovac_freeze
- hostgroup_name postgresql_primary
+ hostgroup_name postgresql
check_command check_postgres_alert_args!zulip!nagios!autovac_freeze!101%!105%
contact_groups admins
}
@@ -317,7 +317,7 @@ define service {
define service {
use generic-service
service_description Check PostgreSQL replication lag
- hostgroup_name postgresql
+ hostgroup_name postgresql_primary, postgresql_replica
check_command check_postgresql_replication_lag
contact_groups admins
}
diff --git a/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
index ba96c5cea29..583419c93eb 100644
--- a/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
+++ b/puppet/zulip_ops/templates/nagios4/hosts.cfg.template.erb
@@ -4,7 +4,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>
- hostgroups all,fullstack,non_aws_host,frontends,not_pageable_servers,postgresql_primary
+ hostgroups all,fullstack,non_aws_host,frontends,not_pageable_servers,postgresql
}
<% end -%>
@@ -64,7 +64,7 @@ define host{
host_name <%= host %>
alias <%= host %>
address <%= host %>.<%= @default_host_domain %>
- hostgroups all,aws_host,postgresql,pageable_servers
+ hostgroups all,aws_host,postgresql_replica,pageable_servers
}
<% end -%>