Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/179096
Change subject: ganglia: remove Labs support ...................................................................... ganglia: remove Labs support Not currently used, replaced by diamond/graphite, and no plans to revive it in the foreseeable future. Change-Id: Iec70797e38068dc0e654b1de92517f9dd2219fa3 --- D files/ganglia/gmond.conf.labsstub M manifests/ganglia.pp M templates/ganglia/gmond_template.erb 3 files changed, 81 insertions(+), 174 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/96/179096/1 diff --git a/files/ganglia/gmond.conf.labsstub b/files/ganglia/gmond.conf.labsstub deleted file mode 100644 index 1f1ae58..0000000 --- a/files/ganglia/gmond.conf.labsstub +++ /dev/null @@ -1,24 +0,0 @@ -/* This configuration is as close to 2.5.x default behavior as possible - The values closely match ./gmond/metric.h definitions in 2.5.x */ -globals { - daemonize = yes - setuid = yes - user = nobody - debug_level = 0 - max_udp_msg_len = 1472 - mute = yes - deaf = no - allow_extra_data = yes - host_dmax = 86400 /*secs */ - cleanup_threshold = 300 /*secs */ - gexec = no - send_metadata_interval = 60 -} - -/* The host section describes attributes of the host, like the location */ -host { - location = "unspecified" -} - -# BEGIN AUTOGEN FROM CRON -# END AUTOGEN FROM CRON diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 0a036e8..668e015 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -3,16 +3,14 @@ # # Parameters: # - $deaf: Is the gmond process an aggregator -# - $cname: Cluster / Cloud 's name +# - $cname: Cluster's name # - $location: Machine's location -# - $mcast_address: Multicast "cluster" to join and send data on (production only) -# - $gmetad_host: Hostname or IP of gmetad server used by gmond (labs only) +# - $mcast_address: Multicast "cluster" to join and send data on # - $authority_url: URL used by gmond and gmetad # - $gridname: Grid name used by gmetad # - $data_sources: Hash of datasources used by gmetad (production only) # - $rra_sizes: Round-robin archives sizes used by gmetad # - $rrd_rootdir: Directory to store round-robin dbs used by gmetad -# - $gmetad_conf: gmetad conf filename (ends in '.labsstub' for labs) # - $ganglia_servername: Server name used by apache # - $ganglia_serveralias: Server alias(es) used by apache # - $ganglia_webdir: Path of web directory used by apache @@ -21,11 +19,8 @@ class ganglia { # FIXME: remove after the ganglia module migration - if $::realm == 'labs' or ($::hostname in ['netmon1001'] or $::site == 'esams' or $::site == 'codfw') { - $ganglia_cluster = $::realm ? { - labs => $::instanceproject, - default => $cluster - } + if ($::hostname in ['netmon1001'] or $::site == 'esams' or $::site == 'codfw') { + $ganglia_cluster = $cluster, class { 'ganglia_new::monitor': cluster => $ganglia_cluster, } @@ -35,7 +30,6 @@ } # aggregator should not be deaf (they should listen) # ganglia_aggregator for production are defined in site.pp; - # for labs, 'deaf = "no"' is defined in gmond.conf.labsstub if $ganglia_aggregator { $deaf = 'no' } else { @@ -226,96 +220,86 @@ ensure => present, } - if $::realm == 'labs' { - $gridname = 'wmflabs' - # for labs, just generate a stub gmetad configuration without data_source lines - $gmetad_conf = 'gmetad.conf.labsstub' - $authority_url = 'http://ganglia.wmflabs.org' - $rra_sizes = '"RRA:AVERAGE:0.5:1:360" "RRA:AVERAGE:0.5:24:245" "RRA:AVERAGE:0.5:168:241" "RRA:AVERAGE:0.5:672:241" "RRA:AVERAGE:0.5:5760:371"' - $rrd_rootdir = '/mnt/ganglia_tmp/rrds.pmtpa' - } else { - $gridname = 'Wikimedia' - $gmetad_conf = 'gmetad.conf' - $authority_url = 'http://ganglia.wikimedia.org' - case $::hostname { - # netmon1001 runs gmetad to get varnish data into torrus - # unlike other servers, netmon1001 uses the default rrd_rootdir - /^netmon1001$/: { - $data_sources = { - 'Upload caches eqiad' => 'cp1048.eqiad.wmnet cp1061.eqiad.wmnet' - } - $rra_sizes = '"RRA:AVERAGE:0:1:4032" "RRA:AVERAGE:0.17:6:2016" "RRA:MAX:0.17:6:2016" "RRA:AVERAGE:0.042:288:732" "RRA:MAX:0.042:288:732"' + $gridname = 'Wikimedia' + $authority_url = 'http://ganglia.wikimedia.org' + case $::hostname { + # netmon1001 runs gmetad to get varnish data into torrus + # unlike other servers, netmon1001 uses the default rrd_rootdir + /^netmon1001$/: { + $data_sources = { + 'Upload caches eqiad' => 'cp1048.eqiad.wmnet cp1061.eqiad.wmnet' } - # neon needs gmetad config - /^neon$/: { - $data_sources = { - 'Miscellaneous eqiad' => 'carbon.wikimedia.org ms1004.eqiad.wmnet', - 'Miscellaneous codfw' => 'install2001.wikimedia.org', - 'Analytics cluster eqiad' => 'analytics1009.eqiad.wmnet analytics1010.eqiad.wmnet analytics1014.eqiad.wmnet', - 'Mobile caches eqiad' => 'cp1046.eqiad.wmnet cp1047.eqiad.wmnet', - 'Mobile caches esams' => 'hooft.esams.wikimedia.org:11677', - 'Mobile caches ulsfo' => 'cp4011.ulsfo.wmnet cp4019.ulsfo.wmnet', - 'Analytics Kafka cluster eqiad' => 'analytics1012.eqiad.wmnet analytics1018.eqiad.wmnet analytics1022.eqiad.wmnet', - } - $rra_sizes = '"RRA:AVERAGE:0.5:1:360" "RRA:AVERAGE:0.5:24:245" "RRA:AVERAGE: 0.5:168:241" "RRA:AVERAGE:0.5:672:241" "RRA:AVERAGE:0.5:5760:371"' - } - default: { - $data_sources = { - 'Video scalers eqiad' => 'tmh1001.eqiad.wmnet tmh1002.eqiad.wmnet', - 'Image scalers eqiad' => 'mw1153.eqiad.wmnet mw1154.eqiad.wmnet', - 'API application servers eqiad' => 'mw1114.eqiad.wmnet mw1115.eqiad.wmnet', - 'Application servers eqaid' => 'mw1054.eqiad.wmnet mw1055.eqiad.wmnet', - 'Jobrunners eqiad' => 'mw1001.eqiad.wmnet mw1002.eqiad.wmnet', - 'MySQL' => 'db1050.eqiad.wmnet', - 'PDF servers eqiad' => 'ocg1001.eqiad.wmnet', - 'Fundraising eqiad' => 'pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet', - 'Virtualization cluster eqiad' => 'labnet1001.eqiad.wmnet virt1000.wikimedia.org', - 'Labs NFS cluster eqiad' => 'labstore1001.eqiad.wmnet labstore1003.eqiad.wmnet', - 'MySQL eqiad' => 'db1053.eqiad.wmnet db1054.eqiad.wmnet db1057.eqiad.wmnet', - 'LVS loadbalancers eqiad' => 'lvs1001.wikimedia.org lvs1002.wikimedia.org', - 'LVS loadbalancers codfw' => 'install2001.wikimedia.org:10651 lvs2001.codfw.wmnet lvs2002.codfw.wmnet', - 'Miscellaneous eqiad' => 'carbon.wikimedia.org ms1004.eqiad.wmnet', - 'Miscellaneous codfw' => 'install2001.wikimedia.org:10657', - 'Mobile caches eqiad' => 'cp1046.eqiad.wmnet cp1047.eqiad.wmnet', - 'Mobile caches esams' => 'hooft.esams.wikimedia.org:11677', - 'Bits caches eqiad' => 'cp1056.eqiad.wmnet cp1057.eqiad.wmnet', - 'Upload caches eqiad' => 'cp1048.eqiad.wmnet cp1061.eqiad.wmnet', - 'Swift eqiad' => 'ms-fe1001.eqiad.wmnet ms-fe1002.eqiad.wmnet', - 'Swift esams' => 'hooft.esams.wikimedia.org:11676', - 'Swift codfw' => 'install2001.wikimedia.org:10676', - 'Search eqiad' => 'search1001.eqiad.wmnet search1002.eqiad.wmnet', - 'Bits caches esams' => 'hooft.esams.wikimedia.org:11670 cp3019.esams.wikimedia.org cp3020.esams.wikimedia.org', - 'LVS loadbalancers esams' => 'hooft.esams.wikimedia.org:11651 lvs3001.esams.wmnet lvs3002.esams.wmnet', - 'Miscellaneous esams' => 'hooft.esams.wikimedia.org:11657', - 'Analytics cluster eqiad' => 'analytics1009.eqiad.wmnet analytics1010.eqiad.wmnet analytics1014.eqiad.wmnet', - 'Memcached eqiad' => 'mc1001.eqiad.wmnet mc1002.eqiad.wmnet', - 'Text caches esams' => 'hooft.esams.wikimedia.org:11669', - 'Upload caches esams' => 'hooft.esams.wikimedia.org:11671 cp3003.esams.wikimedia.org cp3004.esams.wikimedia.org', - 'Parsoid eqiad' => 'wtp1001.eqiad.wmnet wtp1002.eqiad.wmnet', - 'Parsoid Varnish eqiad' => 'cp1045.eqiad.wmnet cp1058.eqiad.wmnet', - 'Redis eqiad' => 'rdb1001.eqiad.wmnet rdb1002.eqiad.wmnet', - 'Text caches eqiad' => 'cp1052.eqiad.wmnet cp1053.eqiad.wmnet', - 'Misc Web caches eqiad' => 'cp1043.eqiad.wmnet cp1044.eqiad.wmnet', - 'LVS loadbalancers ulsfo' => 'lvs4001.ulsfo.wmnet lvs4003.ulsfo.wmnet', - 'Bits caches ulsfo' => 'cp4001.ulsfo.wmnet cp4003.ulsfo.wmnet', - 'Upload caches ulsfo' => 'cp4005.ulsfo.wmnet cp4013.ulsfo.wmnet', - 'Mobile caches ulsfo' => 'cp4011.ulsfo.wmnet cp4019.ulsfo.wmnet', - 'Text caches ulsfo' => 'cp4008.ulsfo.wmnet cp4016.ulsfo.wmnet', - 'Elasticsearch eqiad' => 'elastic1001.eqiad.wmnet elastic1007.eqiad.wmnet elastic1013.eqiad.wmnet', - 'Logstash eqiad' => 'logstash1001.eqiad.wmnet logstash1003.eqiad.wmnet', - 'RCStream eqiad' => 'rcs1001.eqiad.wmnet', - 'Analytics Kafka cluster eqiad' => 'analytics1012.eqiad.wmnet analytics1018.eqiad.wmnet analytics1022.eqiad.wmnet', - 'Service Cluster A eqiad' => 'sca1001.eqiad.wmnet sca1002.eqiad.wmnet', - 'Corp OIT LDAP mirror eqiad' => 'plutonium.wikimedia.org', - 'Corp OIT LDAP mirror codfw' => 'pollux.wikimedia.org', - } - $rra_sizes = '"RRA:AVERAGE:0.5:1:360" "RRA:AVERAGE:0.5:24:245" "RRA:AVERAGE:0.5:168:241" "RRA:AVERAGE:0.5:672:241" "RRA:AVERAGE:0.5:5760:371"' - $rrd_rootdir = '/mnt/ganglia_tmp/rrds.pmtpa' + $rra_sizes = '"RRA:AVERAGE:0:1:4032" "RRA:AVERAGE:0.17:6:2016" "RRA:MAX:0.17:6:2016" "RRA:AVERAGE:0.042:288:732" "RRA:MAX:0.042:288:732"' + } + # neon needs gmetad config + /^neon$/: { + $data_sources = { + 'Miscellaneous eqiad' => 'carbon.wikimedia.org ms1004.eqiad.wmnet', + 'Miscellaneous codfw' => 'install2001.wikimedia.org', + 'Analytics cluster eqiad' => 'analytics1009.eqiad.wmnet analytics1010.eqiad.wmnet analytics1014.eqiad.wmnet', + 'Mobile caches eqiad' => 'cp1046.eqiad.wmnet cp1047.eqiad.wmnet', + 'Mobile caches esams' => 'hooft.esams.wikimedia.org:11677', + 'Mobile caches ulsfo' => 'cp4011.ulsfo.wmnet cp4019.ulsfo.wmnet', + 'Analytics Kafka cluster eqiad' => 'analytics1012.eqiad.wmnet analytics1018.eqiad.wmnet analytics1022.eqiad.wmnet', } + $rra_sizes = '"RRA:AVERAGE:0.5:1:360" "RRA:AVERAGE:0.5:24:245" "RRA:AVERAGE: 0.5:168:241" "RRA:AVERAGE:0.5:672:241" "RRA:AVERAGE:0.5:5760:371"' + } + default: { + $data_sources = { + 'Video scalers eqiad' => 'tmh1001.eqiad.wmnet tmh1002.eqiad.wmnet', + 'Image scalers eqiad' => 'mw1153.eqiad.wmnet mw1154.eqiad.wmnet', + 'API application servers eqiad' => 'mw1114.eqiad.wmnet mw1115.eqiad.wmnet', + 'Application servers eqaid' => 'mw1054.eqiad.wmnet mw1055.eqiad.wmnet', + 'Jobrunners eqiad' => 'mw1001.eqiad.wmnet mw1002.eqiad.wmnet', + 'MySQL' => 'db1050.eqiad.wmnet', + 'PDF servers eqiad' => 'ocg1001.eqiad.wmnet', + 'Fundraising eqiad' => 'pay-lvs1001.frack.eqiad.wmnet pay-lvs1002.frack.eqiad.wmnet', + 'Virtualization cluster eqiad' => 'labnet1001.eqiad.wmnet virt1000.wikimedia.org', + 'Labs NFS cluster eqiad' => 'labstore1001.eqiad.wmnet labstore1003.eqiad.wmnet', + 'MySQL eqiad' => 'db1053.eqiad.wmnet db1054.eqiad.wmnet db1057.eqiad.wmnet', + 'LVS loadbalancers eqiad' => 'lvs1001.wikimedia.org lvs1002.wikimedia.org', + 'LVS loadbalancers codfw' => 'install2001.wikimedia.org:10651 lvs2001.codfw.wmnet lvs2002.codfw.wmnet', + 'Miscellaneous eqiad' => 'carbon.wikimedia.org ms1004.eqiad.wmnet', + 'Miscellaneous codfw' => 'install2001.wikimedia.org:10657', + 'Mobile caches eqiad' => 'cp1046.eqiad.wmnet cp1047.eqiad.wmnet', + 'Mobile caches esams' => 'hooft.esams.wikimedia.org:11677', + 'Bits caches eqiad' => 'cp1056.eqiad.wmnet cp1057.eqiad.wmnet', + 'Upload caches eqiad' => 'cp1048.eqiad.wmnet cp1061.eqiad.wmnet', + 'Swift eqiad' => 'ms-fe1001.eqiad.wmnet ms-fe1002.eqiad.wmnet', + 'Swift esams' => 'hooft.esams.wikimedia.org:11676', + 'Swift codfw' => 'install2001.wikimedia.org:10676', + 'Search eqiad' => 'search1001.eqiad.wmnet search1002.eqiad.wmnet', + 'Bits caches esams' => 'hooft.esams.wikimedia.org:11670 cp3019.esams.wikimedia.org cp3020.esams.wikimedia.org', + 'LVS loadbalancers esams' => 'hooft.esams.wikimedia.org:11651 lvs3001.esams.wmnet lvs3002.esams.wmnet', + 'Miscellaneous esams' => 'hooft.esams.wikimedia.org:11657', + 'Analytics cluster eqiad' => 'analytics1009.eqiad.wmnet analytics1010.eqiad.wmnet analytics1014.eqiad.wmnet', + 'Memcached eqiad' => 'mc1001.eqiad.wmnet mc1002.eqiad.wmnet', + 'Text caches esams' => 'hooft.esams.wikimedia.org:11669', + 'Upload caches esams' => 'hooft.esams.wikimedia.org:11671 cp3003.esams.wikimedia.org cp3004.esams.wikimedia.org', + 'Parsoid eqiad' => 'wtp1001.eqiad.wmnet wtp1002.eqiad.wmnet', + 'Parsoid Varnish eqiad' => 'cp1045.eqiad.wmnet cp1058.eqiad.wmnet', + 'Redis eqiad' => 'rdb1001.eqiad.wmnet rdb1002.eqiad.wmnet', + 'Text caches eqiad' => 'cp1052.eqiad.wmnet cp1053.eqiad.wmnet', + 'Misc Web caches eqiad' => 'cp1043.eqiad.wmnet cp1044.eqiad.wmnet', + 'LVS loadbalancers ulsfo' => 'lvs4001.ulsfo.wmnet lvs4003.ulsfo.wmnet', + 'Bits caches ulsfo' => 'cp4001.ulsfo.wmnet cp4003.ulsfo.wmnet', + 'Upload caches ulsfo' => 'cp4005.ulsfo.wmnet cp4013.ulsfo.wmnet', + 'Mobile caches ulsfo' => 'cp4011.ulsfo.wmnet cp4019.ulsfo.wmnet', + 'Text caches ulsfo' => 'cp4008.ulsfo.wmnet cp4016.ulsfo.wmnet', + 'Elasticsearch eqiad' => 'elastic1001.eqiad.wmnet elastic1007.eqiad.wmnet elastic1013.eqiad.wmnet', + 'Logstash eqiad' => 'logstash1001.eqiad.wmnet logstash1003.eqiad.wmnet', + 'RCStream eqiad' => 'rcs1001.eqiad.wmnet', + 'Analytics Kafka cluster eqiad' => 'analytics1012.eqiad.wmnet analytics1018.eqiad.wmnet analytics1022.eqiad.wmnet', + 'Service Cluster A eqiad' => 'sca1001.eqiad.wmnet sca1002.eqiad.wmnet', + 'Corp OIT LDAP mirror eqiad' => 'plutonium.wikimedia.org', + 'Corp OIT LDAP mirror codfw' => 'pollux.wikimedia.org', + } + $rra_sizes = '"RRA:AVERAGE:0.5:1:360" "RRA:AVERAGE:0.5:24:245" "RRA:AVERAGE:0.5:168:241" "RRA:AVERAGE:0.5:672:241" "RRA:AVERAGE:0.5:5760:371"' + $rrd_rootdir = '/mnt/ganglia_tmp/rrds.pmtpa' } } - file { "/etc/ganglia/${gmetad_conf}": + file { "/etc/ganglia/gmetad.conf": ensure => present, require => Package['gmetad'], content => template('ganglia/gmetad.conf.erb'), @@ -330,48 +314,10 @@ class ganglia::collector inherits ganglia::collector::config { system::role { 'ganglia::collector': description => 'Ganglia gmetad aggregator' } - # for labs, gmond.conf and gmetad.conf are generated every 4 hours by a - # cron job - if $::realm == 'labs' { - file { '/etc/ganglia/gmond.conf.labsstub': - ensure => present, - source => 'puppet:///files/ganglia/gmond.conf.labsstub', - mode => '0444', - } - - file { '/usr/local/sbin/generate-ganglia-conf.py': - ensure => present, - source => 'puppet:///files/ganglia/generate-ganglia-conf.py', - mode => '0755', - } - - cron { 'generate-ganglia-conf': - ensure => present, - command => '/usr/local/sbin/generate-ganglia-conf.py', - require => Package['gmetad'], - user => 'root', - hour => [0, 4, 8, 12, 16, 20], - minute => 30, - environment => 'PATH=$PATH:/sbin', - } - - # log gmetad messages to /var/log/ganglia.log - rsyslog::conf { 'ganglia': - source => 'puppet:///files/ganglia/rsyslog.d/30-ganglia.conf', - priority => 30, - } - - file { '/etc/logrotate.d/ganglia': - ensure => present, - source => 'puppet:///files/logrotate/ganglia', - mode => '0444', - } - } - service { 'gmetad': ensure => running, - require => File["/etc/ganglia/${gmetad_conf}"], - subscribe => File["/etc/ganglia/${gmetad_conf}"], + require => File["/etc/ganglia/gmetad.conf"], + subscribe => File["/etc/ganglia/gmetad.conf"], hasstatus => false, } } diff --git a/templates/ganglia/gmond_template.erb b/templates/ganglia/gmond_template.erb index c8ae535..353152f 100644 --- a/templates/ganglia/gmond_template.erb +++ b/templates/ganglia/gmond_template.erb @@ -13,11 +13,6 @@ cleanup_threshold = 300 /*secs */ gexec = no send_metadata_interval = 60 - -<% if @realm == "labs" and has_variable?("instancename") then %> - override_hostname = <%= instancename %> -<% end %> - } /* @@ -39,15 +34,6 @@ /* Feel free to specify as many udp_send_channels as you like. Gmond used to only support having a single channel */ -<% if @realm == "labs" then %> -<% if has_variable?("project_gid") then %> -udp_send_channel { - host = <%= @gmetad_host %> - port = <%= @project_gid %> - ttl = 3 -} -<% end %> -<% else %> udp_send_channel { mcast_join = <%= @mcast_address %> port = 8649 @@ -71,7 +57,6 @@ tcp_accept_channel { port = 8649 } -<% end %> /* Each metrics module that is referenced by gmond must be specified and loaded. If the module has been statically linked with gmond, it does -- To view, visit https://gerrit.wikimedia.org/r/179096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec70797e38068dc0e654b1de92517f9dd2219fa3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits