Ottomata has uploaded a new change for review.
https://gerrit.wikimedia.org/r/119797
Change subject: RT 7085 - adding analytics contact group to researchdb icinga
alerts
......................................................................
RT 7085 - adding analytics contact group to researchdb icinga alerts
Had to add parameterization for contact_group on
role::coredb::common and mysql_wmf::coredb::monitoring.
Change-Id: I1a01c7d0230c9a24e02f47e5473ba61c4a54e716
---
M manifests/role/coredb.pp
M modules/mysql_wmf/manifests/coredb/monitoring.pp
2 files changed, 69 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/97/119797/1
diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp
index 71580fc..b0522b7 100644
--- a/manifests/role/coredb.pp
+++ b/manifests/role/coredb.pp
@@ -239,7 +239,10 @@
long_timeouts => true,
enable_unsafe_locks => true,
large_slave_trans_retries => true,
- innodb_file_per_table => $innodb_file_per_table
+ innodb_file_per_table => $innodb_file_per_table,
+ # send researchdb icinga alerts to admins
+ # and analytics icinga contact groups.
+ contact_group => 'admins,analytics',
}
}
@@ -269,7 +272,8 @@
$enable_unsafe_locks = false,
$large_slave_trans_retries = false,
$slow_query_digest = true,
- $heartbeat_enabled = true
+ $heartbeat_enabled = true,
+ $contact_group = 'admins',
) inherits role::coredb::config {
$cluster = $logical_cluster
@@ -303,7 +307,10 @@
heartbeat_enabled => $heartbeat_enabled,
}
- class { "mysql_wmf::coredb::monitoring": crit => true }
+ class { "mysql_wmf::coredb::monitoring":
+ crit => true,
+ contact_group => $contact_group,
+ }
}
else {
diff --git a/modules/mysql_wmf/manifests/coredb/monitoring.pp
b/modules/mysql_wmf/manifests/coredb/monitoring.pp
index f491ad9..526ead6 100644
--- a/modules/mysql_wmf/manifests/coredb/monitoring.pp
+++ b/modules/mysql_wmf/manifests/coredb/monitoring.pp
@@ -1,4 +1,12 @@
-class mysql_wmf::coredb::monitoring( $crit = false, $no_slave = false ) {
+class mysql_wmf::coredb::monitoring(
+ $crit = false,
+ $no_slave = false,
+ # Override contact_group if you want different
+ # Icinga contact_groups notified for mysql errors
+ # on this coredb instance.
+ $contact_group = 'admins',
+)
+{
include passwords::nagios::mysql
$mysql_check_pass = $passwords::nagios::mysql::mysql_check_pass
@@ -25,21 +33,63 @@
description => 'MySQL disk space',
nrpe_command => '/usr/lib/nagios/plugins/check_disk -w 6% -c 3% -l
-e',
critical => true,
+ contact_group => $contact_group,
}
nrpe::monitor_service { 'mysqld':
description => 'mysqld processes',
nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C
mysqld',
critical => $crit,
+ contact_group => $contact_group,
}
- monitor_service { 'mysql recent restart': description => 'MySQL Recent
Restart', check_command => 'nrpe_check_mysql_recent_restart', critical => $crit
}
- monitor_service { 'mysql processlist': description => 'MySQL Processlist',
check_command => 'nrpe_pmp_check_mysql_processlist', critical => false }
- monitor_service { 'mysql innodb': description => 'MySQL InnoDB',
check_command => 'nrpe_pmp_check_mysql_innodb', critical => false }
+ monitor_service { 'mysql recent restart':
+ description => 'MySQL Recent Restart',
+ check_command => 'nrpe_check_mysql_recent_restart',
+ critical => $crit,
+ contact_group => $contact_group,
+ }
+ monitor_service { 'mysql processlist':
+ description => 'MySQL Processlist',
+ check_command => 'nrpe_pmp_check_mysql_processlist',
+ critical => false,
+ contact_group => $contact_group,
+ }
+ monitor_service { 'mysql innodb':
+ description => 'MySQL InnoDB',
+ check_command => 'nrpe_pmp_check_mysql_innodb',
+ critical => false,
+ contact_group => $contact_group
+ }
if $no_slave == false {
- monitor_service { 'full lvs snapshot': description => 'Full LVS
Snapshot', check_command => 'nrpe_check_lvs', critical => false }
- monitor_service { 'mysql idle transaction': description => 'MySQL Idle
Transactions', check_command => 'nrpe_check_mysql_idle_transactions', critical
=> false }
- monitor_service { 'mysql replication heartbeat': description => 'MySQL
Replication Heartbeat', check_command => 'nrpe_check_mysql_slave_heartbeat',
critical => false }
- monitor_service { 'mysql slave delay': description => 'MySQL Slave
Delay', check_command => 'nrpe_check_mysql_slave_delay', critical => false }
- monitor_service { 'mysql slave running': description => 'MySQL Slave
Running', check_command => 'nrpe_check_mysql_slave_running', critical => false }
+ monitor_service { 'full lvs snapshot':
+ description => 'Full LVS Snapshot',
+ check_command => 'nrpe_check_lvs',
+ critical => false,
+ contact_group => $contact_group,
+ }
+ monitor_service { 'mysql idle transaction':
+ description => 'MySQL Idle Transactions',
+ check_command => 'nrpe_check_mysql_idle_transactions',
+ critical => false,
+ contact_group => $contact_group,
+ }
+ monitor_service { 'mysql replication heartbeat':
+ description => 'MySQL Replication Heartbeat',
+ check_command => 'nrpe_check_mysql_slave_heartbeat',
+ critical => false,
+ contact_group => $contact_group,
+ }
+ monitor_service { 'mysql slave delay':
+ description => 'MySQL Slave Delay',
+ check_command => 'nrpe_check_mysql_slave_delay',
+ critical => false,
+ contact_group => 'admins,analytics',
+ }
+ monitor_service { 'mysql slave running':
+ description => 'MySQL Slave Running',
+ check_command => 'nrpe_check_mysql_slave_running',
+ critical => false,
+ contact_group => $contact_group,
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/119797
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a01c7d0230c9a24e02f47e5473ba61c4a54e716
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits