Alexandros Kosiaris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/314669
Change subject: monitoring: Kill check_ganglia
......................................................................
monitoring: Kill check_ganglia
Does not seem to be used by any host, check-ganglia does not exist on
jessie and we are anyway deprecating ganglia
Change-Id: I58d410747a742ebe32f4bd5e18c1c87ed4bc866e
---
M modules/icinga/manifests/plugins.pp
D modules/monitoring/manifests/ganglia.pp
D modules/nagios_common/files/check_commands/check_ganglia.cfg
D modules/nagios_common/manifests/check/ganglia.pp
4 files changed, 0 insertions(+), 181 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/69/314669/1
diff --git a/modules/icinga/manifests/plugins.pp
b/modules/icinga/manifests/plugins.pp
index 24d1296..d638787 100644
--- a/modules/icinga/manifests/plugins.pp
+++ b/modules/icinga/manifests/plugins.pp
@@ -106,7 +106,6 @@
class { [
'nagios_common::commands',
- 'nagios_common::check::ganglia',
'nagios_common::check::redis'
] :
}
diff --git a/modules/monitoring/manifests/ganglia.pp
b/modules/monitoring/manifests/ganglia.pp
deleted file mode 100644
index 7206202..0000000
--- a/modules/monitoring/manifests/ganglia.pp
+++ /dev/null
@@ -1,130 +0,0 @@
-# == Define monitoring::ganglia
-# Wrapper for monitoring::service using check_ganglia command.
-# This allows you to monitor arbitrary values in ganglia
-# with icinga without having to add entries to checkcommands.cfg.erb
-#
-# Specifying threshold values
-# ===========================
-#
-# (This is extracted from ``check_gmond.checkval``; see the embedded
-# documentation for the most current version).
-#
-# The arguments to the ``-w`` and ``-c`` options use the following syntax:
-#
-# For numeric values
-# ------------------
-# - 5 -- match if v >= 5
-# - 3:5 -- match if 3 <= v <= 5
-# - :5 -- match if v <=5
-# - 1,2,3 -- match if v in (1,2,3)
-#
-# For string values
-# ------------------
-# - foo -- match if v == foo
-# - foo,bar -- match if v in (foo, bar)
-#
-# Negation
-# --------
-# You can negate a threshold expression by preceding it with '!'. For
-# example:
-#
-# - !5 -- match if v < 5
-# - !3:5 -- match if v<3 || v>5
-# - !1,2,3 -- match if v not in (1,2,3)
-#
-# ( Pasted from#
-#
https://github.com/wikimedia/operations-debs-check_ganglia#specifying-threshold-values
-# )
-#
-# == Usage
-# # Alert if free space in HDFS is less than 1TB
-# monitoring::ganglia { 'hdfs-capacity-remaining':
-# description => 'GB free in HDFS',
-# metric =>
-# 'Hadoop.NameNode.FSNamesystem.CapacityRemainingGB',
-# warning => ':1024',
-# critical => ':512,
-# }
-#
-# == Parameters
-# $description - Description of icinga alert
-# $metric - ganglia metric name
-# $warning - alert warning threshold
-# $critical - alert critical threshold
-# $metric_host - hostname in ganglia we want to monitor.
-# Can't use nagios macro in checkcommands.cfg
-# because fqdn is not available.
-# Default: $::fqdn of this node
-# $gmetad_host - Default: 'uranium.wikimedia.org'
-# $gmetad_query_port - gmetad XML query interface port. Default: 8654
-# $host
-# $retries
-# $group
-# $ensure
-# $nagios_critical - passed as $critical to monitoring::service define
-# $passive
-# $freshness
-# $normal_check_interval
-# $retry_check_interval
-# $contact_group
-#
-define monitoring::ganglia(
- $description,
- $metric,
- $warning,
- $critical,
- $metric_host = $::fqdn,
- $gmetad_host = 'uranium.wikimedia.org',
- $gmetad_query_port = 8654,
- $host = $::hostname,
- $retries = 3,
- $group = undef,
- $ensure = present,
- $nagios_critical = false,
- $passive = false,
- $freshness = 36000,
- $normal_check_interval = 3,
- $retry_check_interval = 3,
- $contact_group = 'admins'
-)
-{
- # Service group for ganglia checks
- # If defined in the declaration of resource, we use it;
- # If not, 'misc' servers have no hostgroup, the others adopt the
- # standard format
- $ganglia_group = $group ? {
- /.+/ => $group,
- # FIXME - top-scope var without namespace ($cluster), will break in
puppet 2.8
- # lint:ignore:variable_scope
- default => $cluster ? {
- 'misc' => undef,
- default => "${cluster}_${::site}"
- # lint:endignore
- }
- }
-
- # checkcommands.cfg's check_ganglia command has
- # many positional arguments that
- # are passed to check_ganglia script:
- # $ARG1$ -g gmetad host
- # $ARG2$ -p gmetad xml query port
- # $ARG3$ -H Host for which we want metrics
- # $ARG4$ -m ganglia metric name
- # $ARG5$ -w warning threshold
- # $ARG6$ -c critical threshold
- # $ARG7$ -C ganglia cluster name
-
- monitoring::service { $title:
- ensure => $ensure,
- description => $description,
- check_command =>
"check_ganglia!${gmetad_host}!${gmetad_query_port}!${metric_host}!${metric}!${warning}!${critical}!${::ganglia::cname}",
- retries => $retries,
- group => $ganglia_group,
- critical => $nagios_critical,
- passive => $passive,
- freshness => $freshness,
- normal_check_interval => $normal_check_interval,
- retry_check_interval => $retry_check_interval,
- contact_group => $contact_group,
- }
-}
diff --git a/modules/nagios_common/files/check_commands/check_ganglia.cfg
b/modules/nagios_common/files/check_commands/check_ganglia.cfg
deleted file mode 100644
index f99e82e..0000000
--- a/modules/nagios_common/files/check_commands/check_ganglia.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# check arbitrary ganglia metric values
-define command{
- command_name check_ganglia
- command_line $USER1$/check_ganglia -q -g $ARG1$ -p $ARG2$ -H $ARG3$ -m
'$ARG4$' -w '$ARG5$' -c '$ARG6$' -C '$ARG7$'
-}
diff --git a/modules/nagios_common/manifests/check/ganglia.pp
b/modules/nagios_common/manifests/check/ganglia.pp
deleted file mode 100644
index f573bea..0000000
--- a/modules/nagios_common/manifests/check/ganglia.pp
+++ /dev/null
@@ -1,45 +0,0 @@
-# = Class nagios_common::check::ganglia
-#
-# Installs check_ganglia package and sets up symlink into
-# /usr/lib/nagios/plugins.
-#
-# check_ganglia allows arbitrary values to be queried from ganglia and checked
-# for nagios/icinga. This is better than ganglios, as it queries gmetad's xml
-# query interfaces directly, rather than downloading and mangling xmlfiles from
-# each aggregator.
-#
-# NOTE: Package not available for trusty yet
-#
-# [*config_dir*]
-# The base directory to put configuration in.
-# Defaults to '/etc/icinga/'
-#
-# [*owner*]
-# The user which should own the config file.
-# Defaults to 'icinga'
-#
-# [*group*]
-# The group which should own the config file.
-# Defaults to 'icinga'
-class nagios_common::check::ganglia(
- $config_dir = '/etc/icinga',
- $owner = 'icinga',
- $group = 'icinga',
-) {
- package { 'check-ganglia':
- ensure => 'installed',
- }
-
- file { '/usr/lib/nagios/plugins/check_ganglia':
- ensure => 'link',
- target => '/usr/bin/check_ganglia',
- require => Package['check-ganglia'],
- }
-
- nagios_common::check_command::config { 'check_ganglia':
- require => File["${config_dir}/commands"],
- config_dir => $config_dir,
- owner => $owner,
- group => $group
- }
-}
--
To view, visit https://gerrit.wikimedia.org/r/314669
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I58d410747a742ebe32f4bd5e18c1c87ed4bc866e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits