Springle has submitted this change and it was merged. Change subject: MariaDB monitoring for disk and process(es) ......................................................................
MariaDB monitoring for disk and process(es) Borrow these from coredb and add in some flexibility. Use a 'dba' contact group consisting of me, for now, for non-front-line-site-killing stuff like tendril and dbstore. Change-Id: I9f06bbaa57e98bacffc0e5771430ae7eafc26871 --- M files/icinga/contactgroups.cfg M manifests/role/mariadb.pp M modules/mariadb/manifests/init.pp A modules/mariadb/manifests/monitor_disk.pp A modules/mariadb/manifests/monitor_process.pp 5 files changed, 41 insertions(+), 0 deletions(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg index 2fb24e5..1e5257b 100644 --- a/files/icinga/contactgroups.cfg +++ b/files/icinga/contactgroups.cfg @@ -33,3 +33,8 @@ contactgroup_name contint members amusso } + +define contactgroup { + contactgroup_name dba + members springle +} diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp index 82957d5..0c47890 100644 --- a/manifests/role/mariadb.pp +++ b/manifests/role/mariadb.pp @@ -52,6 +52,9 @@ datadir => '/a/sqldata', tmpdir => '/a/tmp', } + + include mariadb::monitor_disk + include mariadb::monitor_process } # MariaDB 10 delayed slaves replicating all shards @@ -75,4 +78,7 @@ datadir => '/a/sqldata', tmpdir => '/a/tmp', } + + include mariadb::monitor_disk + include mariadb::monitor_process } diff --git a/modules/mariadb/manifests/init.pp b/modules/mariadb/manifests/init.pp index 91fcdc8..20fb7b3 100644 --- a/modules/mariadb/manifests/init.pp +++ b/modules/mariadb/manifests/init.pp @@ -2,4 +2,6 @@ include mariadb::config include mariadb::packages + include mariadb::monitor_disk + include mariadb::monitor_process } \ No newline at end of file diff --git a/modules/mariadb/manifests/monitor_disk.pp b/modules/mariadb/manifests/monitor_disk.pp new file mode 100644 index 0000000..7537959 --- /dev/null +++ b/modules/mariadb/manifests/monitor_disk.pp @@ -0,0 +1,14 @@ + +class mariadb::monitor_disk( + $is_critical = true, + $contact_group = 'dba', + $pct_warning = 10, + $pct_critical = 5, + ) { + nrpe::monitor_service { 'mariadb_disk_space': + description => 'MariaDB disk space', + nrpe_command => "/usr/lib/nagios/plugins/check_disk -w ${pct_warning}% -c ${pct_critical}% -l -e", + critical => $is_critical, + contact_group => $contact_group, + } +} \ No newline at end of file diff --git a/modules/mariadb/manifests/monitor_process.pp b/modules/mariadb/manifests/monitor_process.pp new file mode 100644 index 0000000..7e03df6 --- /dev/null +++ b/modules/mariadb/manifests/monitor_process.pp @@ -0,0 +1,14 @@ + +class mariadb::monitor_process( + $is_critical = true, + $contact_group = 'dba', + $process_name = 'mysqld', + $process_count = 1, + ) { + nrpe::monitor_service { "${process_name}": + description => "${process_name} processes", + nrpe_command => "/usr/lib/nagios/plugins/check_procs -c ${process_count}:{$process_count} -C ${process_name}", + critical => $is_critical, + contact_group => $contact_group, + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/121676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f06bbaa57e98bacffc0e5771430ae7eafc26871 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle <sprin...@wikimedia.org> Gerrit-Reviewer: Springle <sprin...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits