Filippo Giunchedi has submitted this change and it was merged. Change subject: elasticsearch: deploy shard percentage check ......................................................................
elasticsearch: deploy shard percentage check this is the initial deploy alongside the existing check to verify it works as expected. Once that's validated we can switch over. Judging from past alarms it would have fired a few times: 0.030303 2014-02 19:51 0.574468 2014-02 21:33 1.714290 2014-03 23:20 0.079008 2014-04 19:58 0.080046 2014-04 20:24 0.078593 2014-04 20:37 0.071414 2014-04 22:19 0.038087 2014-05 03:47 0.072611 2014-05 19:52 0.072611 2014-05 20:15 0.073936 2014-05 21:28 0.032132 2014-07 16:36 Change-Id: Ia83d2aa3f0e329e7212ad66c5e7d631f9f6ce939 --- M modules/elasticsearch/manifests/nagios/check.pp M modules/elasticsearch/manifests/nagios/plugin.pp M templates/icinga/checkcommands.cfg.erb 3 files changed, 23 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, but someone else must approve Filippo Giunchedi: Verified; Looks good to me, approved Manybubbles: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/elasticsearch/manifests/nagios/check.pp b/modules/elasticsearch/manifests/nagios/check.pp index 1cc879d..3d63f9d 100644 --- a/modules/elasticsearch/manifests/nagios/check.pp +++ b/modules/elasticsearch/manifests/nagios/check.pp @@ -8,4 +8,9 @@ check_command => 'check_elasticsearch', description => 'ElasticSearch health check', } -} \ No newline at end of file + + monitor_service { 'elasticsearch shards': + check_command => 'check_elasticsearch_shards', + description => 'ElasticSearch health check for shards', + } +} diff --git a/modules/elasticsearch/manifests/nagios/plugin.pp b/modules/elasticsearch/manifests/nagios/plugin.pp index e611857..596cb0b 100644 --- a/modules/elasticsearch/manifests/nagios/plugin.pp +++ b/modules/elasticsearch/manifests/nagios/plugin.pp @@ -1,5 +1,5 @@ -# == Class elasticsearch::icinga -# Includes the check_elasticsearch shell script. +# == Class elasticsearch::nagios::plugin +# Includes the nagios checks for elasticsearch. # include this class on your Nagios/Icinga node. # class elasticsearch::nagios::plugin { @@ -11,4 +11,14 @@ require => Package['icinga'], tag => 'nagiosplugin' } + + # new version, can do more fine-grained checks + @file { '/usr/lib/nagios/plugins/check_elasticsearch.py': + source => 'puppet:///modules/elasticsearch/nagios/check_elasticsearch.py', + owner => 'root', + group => 'root', + mode => '0755', + require => Package['icinga'], + tag => 'nagiosplugin' + } } diff --git a/templates/icinga/checkcommands.cfg.erb b/templates/icinga/checkcommands.cfg.erb index 74b2b42..3fd7044 100644 --- a/templates/icinga/checkcommands.cfg.erb +++ b/templates/icinga/checkcommands.cfg.erb @@ -500,12 +500,16 @@ } # Elasticsearch Checks - define command{ command_name check_elasticsearch command_line $USER1$/check_elasticsearch -H $HOSTADDRESS$ } +define command{ + command_name check_elasticsearch_shards + command_line $USER1$/check_elasticsearch.py --ignore-status --url http://$HOSTADDRESS$:9200 +} + # Generic checks for graphite define command{ command_name check_graphite_threshold -- To view, visit https://gerrit.wikimedia.org/r/156260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia83d2aa3f0e329e7212ad66c5e7d631f9f6ce939 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: Manybubbles <never...@wikimedia.org> Gerrit-Reviewer: Ottomata <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits