Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/355249 )
Change subject: [WIP]raid: Implement the option to check write cache policies ...................................................................... [WIP]raid: Implement the option to check write cache policies Change-Id: I36fc6fb115c2d9e9d88391ea5a9230d6389f781c --- M modules/icinga/files/raid_handler.py M modules/raid/manifests/init.pp 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/49/355249/1 diff --git a/modules/icinga/files/raid_handler.py b/modules/icinga/files/raid_handler.py index de144e3..2b948ad 100644 --- a/modules/icinga/files/raid_handler.py +++ b/modules/icinga/files/raid_handler.py @@ -19,7 +19,8 @@ RAID_TYPES = ('megacli', 'hpssacli', 'mpt', 'md', 'n/a') COMPRESSED_RAID_TYPES = ('megacli', 'hpssacli') -SKIP_STRINGS = ('timeout', 'timed out', 'connection refused', 'out of bounds') +SKIP_STRINGS = ('timeout', 'timed out', 'connection refused', 'out of bounds', + 'policy') LOG_PATH = '/var/log/icinga/raid_handler.log' COMMAND_FILE = '/var/lib/nagios/rw/nagios.cmd' diff --git a/modules/raid/manifests/init.pp b/modules/raid/manifests/init.pp index fd5a071..f196b44 100644 --- a/modules/raid/manifests/init.pp +++ b/modules/raid/manifests/init.pp @@ -14,7 +14,12 @@ # following line should be then removed. $raid = split($::raid, ',') - $check_raid = '/usr/bin/sudo /usr/local/lib/nagios/plugins/check_raid' + $cache_write_policy = hiera('cache_write_policy') + if $cache_write_policy { + $check_raid = '/usr/bin/sudo /usr/local/lib/nagios/plugins/check_raid --policy $(cache_write_policy)' + } else { + $check_raid = '/usr/bin/sudo /usr/local/lib/nagios/plugins/check_raid' + } # for 'forking' checks (i.e. all but mdadm, which essentially just reads # kernel memory from /proc/mdstat) check every $check_interval -- To view, visit https://gerrit.wikimedia.org/r/355249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36fc6fb115c2d9e9d88391ea5a9230d6389f781c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo <jcre...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits