Skip to content

Commit 1751b31

Browse files
committed
Remove munin
Fixed: openstreetmap/operations#501 Signed-off-by: Grant Slater <github@firefishy.com>
1 parent 4dca09e commit 1751b31

File tree

95 files changed

+62
-8012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+62
-8012
lines changed

cookbooks/apache/recipes/default.rb

-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@
126126
maxretry 3
127127
end
128128

129-
munin_plugin "apache_accesses"
130-
munin_plugin "apache_processes"
131-
munin_plugin "apache_volume"
132-
133129
template "/var/lib/prometheus/node-exporter/apache.prom" do
134130
source "apache.prom.erb"
135131
owner "root"

cookbooks/chef/recipes/server.rb

-2
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,3 @@
101101
group "root"
102102
mode "755"
103103
end
104-
105-
munin_plugin "chef_status"

cookbooks/db/recipes/base.rb

-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
passwords = data_bag_item("db", "passwords")
2727
wal_secrets = data_bag_item("db", "wal-secrets")
2828

29-
postgresql_munin "openstreetmap" do
30-
cluster node[:db][:cluster]
31-
database "openstreetmap"
32-
end
33-
3429
directory "/srv/www.openstreetmap.org" do
3530
group "rails"
3631
mode "2775"

cookbooks/db/recipes/master.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
postgresql_user "munin" do
6666
cluster node[:db][:cluster]
67-
password passwords["munin"]
67+
action :drop
6868
end
6969

7070
postgresql_user "replication" do

cookbooks/dev/recipes/default.rb

-7
Original file line numberDiff line numberDiff line change
@@ -571,13 +571,6 @@
571571
apache_site "apis.dev.openstreetmap.org" do
572572
template "apache.apis.erb"
573573
end
574-
575-
node[:postgresql][:clusters].each_key do |name|
576-
postgresql_munin name do
577-
cluster name
578-
database "ALL"
579-
end
580-
end
581574
end
582575

583576
directory "/srv/ooc.openstreetmap.org" do

cookbooks/exim/recipes/default.rb

-3
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@
225225
mode "644"
226226
end
227227

228-
munin_plugin "exim_mailqueue"
229-
munin_plugin "exim_mailstats"
230-
231228
prometheus_exporter "exim" do
232229
port 9636
233230
user "Debian-exim"

cookbooks/fail2ban/recipes/default.rb

-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
action [:enable, :start]
5353
end
5454

55-
munin_plugin "fail2ban"
56-
5755
prometheus_exporter "fail2ban" do
5856
port 9635
5957
user "root"

cookbooks/hardware/recipes/default.rb

+2-55
Original file line numberDiff line numberDiff line change
@@ -445,38 +445,21 @@
445445
if controller && controller[:device]
446446
device = controller[:device].sub("/dev/", "")
447447
smart = disk[:smart_device]
448-
449-
if device.start_with?("cciss/") && smart =~ /^cciss,(\d+)$/
450-
array = node[:hardware][:disk][:arrays][disk[:arrays].first]
451-
munin = "cciss-3#{array[:wwn]}-#{Regexp.last_match(1)}"
452-
elsif smart =~ /^.*,(\d+)$/
453-
munin = "#{device}-#{Regexp.last_match(1)}"
454-
elsif smart =~ %r{^.*,(\d+)/(\d+)$}
455-
munin = "#{device}-#{Regexp.last_match(1)}:#{Regexp.last_match(2)}"
456-
end
457448
elsif disk[:device]
458449
device = disk[:device].sub("/dev/", "")
459450
smart = disk[:smart_device]
460-
461-
if smart =~ /^.*,(\d+),(\d+),(\d+)$/
462-
munin = "#{device}-#{Regexp.last_match(1)}:#{Regexp.last_match(2)}:#{Regexp.last_match(3)}"
463-
end
464451
end
465452
elsif disk[:device] =~ %r{^/dev/(nvme\d+)n\d+$}
466453
device = Regexp.last_match(1)
467-
munin = device
468454
elsif disk[:device]
469455
device = disk[:device].sub("/dev/", "")
470-
munin = device
471456
end
472457

473-
next if device.nil? || munin.nil?
458+
next if device.nil?
474459

475460
Hash[
476461
:device => device,
477-
:smart => smart,
478-
:munin => munin,
479-
:hddtemp => munin.tr("-:", "_")
462+
:smart => smart
480463
]
481464
end
482465

@@ -536,48 +519,12 @@
536519
private_users false
537520
protect_clock false
538521
end
539-
540-
# Don't try and do munin monitoring of disks behind
541-
# an Areca controller as they only allow one thing to
542-
# talk to the controller at a time and smartd will
543-
# throw errors if it clashes with munin
544-
disks = disks.reject { |disk| disk[:smart]&.start_with?("areca,") }
545-
546-
disks.each do |disk|
547-
munin_plugin "smart_#{disk[:munin]}" do
548-
target "smart_"
549-
conf "munin.smart.erb"
550-
conf_variables :disk => disk
551-
end
552-
end
553522
else
554523
service "smartd" do
555524
action [:stop, :disable]
556525
end
557526
end
558527

559-
if disks.count.positive?
560-
munin_plugin "hddtemp_smartctl" do
561-
conf "munin.hddtemp.erb"
562-
conf_variables :disks => disks
563-
end
564-
else
565-
munin_plugin "hddtemp_smartctl" do
566-
action :delete
567-
conf "munin.hddtemp.erb"
568-
end
569-
end
570-
571-
plugins = Dir.glob("/etc/munin/plugins/smart_*").map { |p| File.basename(p) } -
572-
disks.map { |d| "smart_#{d[:munin]}" }
573-
574-
plugins.each do |plugin|
575-
munin_plugin plugin do
576-
action :delete
577-
conf "munin.smart.erb"
578-
end
579-
end
580-
581528
if File.exist?("/etc/mdadm/mdadm.conf")
582529
mdadm_conf = edit_file "/etc/mdadm/mdadm.conf" do |line|
583530
line.gsub!(/^MAILADDR .*$/, "MAILADDR admins@openstreetmap.org")

cookbooks/hardware/templates/default/munin.hddtemp.erb

-10
This file was deleted.

cookbooks/hardware/templates/default/munin.smart.erb

-9
This file was deleted.

cookbooks/memcached/recipes/default.rb

-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@
3535
notifies :restart, "service[memcached]"
3636
end
3737

38-
munin_plugin_conf "memcached_multi" do
39-
template "munin.erb"
40-
end
41-
42-
%w[bytes commands conns evictions items memory].each do |stat|
43-
munin_plugin "memcached_multi_#{stat}" do
44-
target "memcached_multi_"
45-
end
46-
end
47-
4838
prometheus_exporter "memcached" do
4939
port 9150
5040
options "--memcached.address=#{node[:memcached][:ip_address]}:#{node[:memcached][:tcp_port]} --memcached.pid-file=/run/memcached/memcached.pid"

cookbooks/memcached/templates/default/munin.erb

-6
This file was deleted.

cookbooks/munin/files/default/plugin-conf.d/api

-2
This file was deleted.

cookbooks/munin/files/default/plugin-conf.d/chef

-2
This file was deleted.

cookbooks/munin/files/default/plugin-conf.d/hpasmcli2

-2
This file was deleted.

cookbooks/munin/files/default/plugins/api_calls_

-69
This file was deleted.

cookbooks/munin/files/default/plugins/api_calls_num

-34
This file was deleted.

cookbooks/munin/files/default/plugins/api_calls_status

-47
This file was deleted.

0 commit comments

Comments
 (0)