From: Grant Slater Date: Wed, 13 Mar 2024 14:39:59 +0000 (+0000) Subject: Scrub last munin traces X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/9302cec0aab75609f536109ac0c10f3a44a204ef Scrub last munin traces Signed-off-by: Grant Slater --- diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index 234baa86c..df157c377 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -68,8 +68,6 @@ jobs: - mailman - matomo - memcached - - munin - - munin-plugins - mysql - networking - nginx diff --git a/.kitchen.yml b/.kitchen.yml index 80fe1b58b..f4a55180f 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -250,12 +250,6 @@ suites: - name: memcached run_list: - recipe[memcached::default] - - name: munin - run_list: - - recipe[munin::default] - - name: munin-plugins - run_list: - - recipe[munin::plugins] - name: mysql run_list: - recipe[mysql::default] diff --git a/cookbooks/apache/metadata.rb b/cookbooks/apache/metadata.rb index f5c6057da..2323547f7 100644 --- a/cookbooks/apache/metadata.rb +++ b/cookbooks/apache/metadata.rb @@ -7,7 +7,6 @@ description "Installs and configures apache" version "1.0.0" supports "ubuntu" depends "fail2ban" -depends "munin" depends "prometheus" depends "ssl" depends "systemd" diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index a689fad95..090fc770c 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -18,7 +18,6 @@ # include_recipe "fail2ban" -include_recipe "munin" include_recipe "prometheus" include_recipe "ssl" diff --git a/cookbooks/backup/templates/default/expire.cron.erb b/cookbooks/backup/templates/default/expire.cron.erb index c43c6f917..e1ec74a08 100644 --- a/cookbooks/backup/templates/default/expire.cron.erb +++ b/cookbooks/backup/templates/default/expire.cron.erb @@ -2,7 +2,7 @@ # DO NOT EDIT - This file is being maintained by Chef -for prefix in blogs chef-server chef-repository chef-git community forum git lists munin osm-blog osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org +for prefix in blogs chef-server chef-repository chef-git community forum git lists osm-blog osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org do /usr/local/bin/expire-backups --days=3 --weeks=3 --months=3 /store/backup $prefix done diff --git a/cookbooks/chef/metadata.rb b/cookbooks/chef/metadata.rb index 569c8701c..b2572c50d 100644 --- a/cookbooks/chef/metadata.rb +++ b/cookbooks/chef/metadata.rb @@ -10,6 +10,5 @@ depends "apache" depends "apt" depends "git" depends "ohai" -depends "munin" depends "systemd" gem "mail", "= 2.7.1" diff --git a/cookbooks/chef/recipes/server.rb b/cookbooks/chef/recipes/server.rb index 31b6b196a..93e9363dc 100644 --- a/cookbooks/chef/recipes/server.rb +++ b/cookbooks/chef/recipes/server.rb @@ -19,7 +19,6 @@ include_recipe "apache" include_recipe "chef::knife" -include_recipe "munin" # cache_dir = Chef::Config[:file_cache_path] # diff --git a/cookbooks/db/recipes/master.rb b/cookbooks/db/recipes/master.rb index 7d6643dd1..c2d1da024 100644 --- a/cookbooks/db/recipes/master.rb +++ b/cookbooks/db/recipes/master.rb @@ -62,11 +62,6 @@ postgresql_user "backup" do password passwords["backup"] end -postgresql_user "munin" do - cluster node[:db][:cluster] - action :drop -end - postgresql_user "replication" do cluster node[:db][:cluster] password passwords["replication"] diff --git a/cookbooks/dev/metadata.rb b/cookbooks/dev/metadata.rb index 29e665a43..f84941d94 100644 --- a/cookbooks/dev/metadata.rb +++ b/cookbooks/dev/metadata.rb @@ -12,7 +12,6 @@ depends "chef" depends "geoipupdate" depends "git" depends "memcached" -depends "munin" depends "mysql" depends "nodejs" depends "php" diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index ebb90accf..137db62cc 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -25,7 +25,6 @@ include_recipe "passenger" include_recipe "geoipupdate" include_recipe "git" include_recipe "memcached" -include_recipe "munin" include_recipe "mysql" include_recipe "nodejs" include_recipe "php::fpm" diff --git a/cookbooks/exim/metadata.rb b/cookbooks/exim/metadata.rb index cd9da2c45..89611b11a 100644 --- a/cookbooks/exim/metadata.rb +++ b/cookbooks/exim/metadata.rb @@ -8,7 +8,6 @@ version "1.0.0" supports "ubuntu" depends "accounts" depends "apache" -depends "munin" depends "networking" depends "prometheus" depends "ssl" diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 00c3be082..6ac19107f 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -17,7 +17,6 @@ # limitations under the License. # -include_recipe "munin" include_recipe "networking" include_recipe "prometheus" diff --git a/cookbooks/fail2ban/metadata.rb b/cookbooks/fail2ban/metadata.rb index 13cc6607f..8a1dfe995 100644 --- a/cookbooks/fail2ban/metadata.rb +++ b/cookbooks/fail2ban/metadata.rb @@ -6,5 +6,4 @@ description "Configures fail2ban" version "1.0.0" supports "ubuntu" -depends "munin" depends "prometheus" diff --git a/cookbooks/fail2ban/recipes/default.rb b/cookbooks/fail2ban/recipes/default.rb index ca0a419c3..216572989 100644 --- a/cookbooks/fail2ban/recipes/default.rb +++ b/cookbooks/fail2ban/recipes/default.rb @@ -17,7 +17,6 @@ # limitations under the License. # -include_recipe "munin" include_recipe "prometheus" package %w[ diff --git a/cookbooks/hardware/metadata.rb b/cookbooks/hardware/metadata.rb index 35dd20ed8..de57c77eb 100644 --- a/cookbooks/hardware/metadata.rb +++ b/cookbooks/hardware/metadata.rb @@ -9,7 +9,6 @@ supports "ubuntu" depends "apt" depends "chef" depends "git" -depends "munin" depends "prometheus" depends "ohai" depends "tools" diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index fa6cb6cc8..4122a7ac8 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -19,7 +19,6 @@ include_recipe "apt" include_recipe "git" -include_recipe "munin" include_recipe "prometheus" include_recipe "sysfs" include_recipe "tools" diff --git a/cookbooks/memcached/metadata.rb b/cookbooks/memcached/metadata.rb index f07fa1cdc..c5cee82b2 100644 --- a/cookbooks/memcached/metadata.rb +++ b/cookbooks/memcached/metadata.rb @@ -6,5 +6,4 @@ description "Installs and configures memcached" version "1.0.0" supports "ubuntu" -depends "munin" depends "prometheus" diff --git a/cookbooks/memcached/recipes/default.rb b/cookbooks/memcached/recipes/default.rb index b178016ad..a4a1462d3 100644 --- a/cookbooks/memcached/recipes/default.rb +++ b/cookbooks/memcached/recipes/default.rb @@ -17,7 +17,6 @@ # limitations under the License. # -include_recipe "munin" include_recipe "prometheus" package "memcached" diff --git a/cookbooks/munin/README.md b/cookbooks/munin/README.md deleted file mode 100644 index 42ea706ec..000000000 --- a/cookbooks/munin/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Munin Cookbook - -This cookbook configures munin, which we use for server monitoring at -[munin.openstreetmap.org](https://munin.openstreetmap.org). The cookbook -contains two recipes: - -* default - installs and configures munin-node on each machine. -* server - configures the central munin server - -Additionally two providers are defined - munin_plugin and munin_plugin_conf, for -configuring individual munin plugins. diff --git a/cookbooks/munin/attributes/default.rb b/cookbooks/munin/attributes/default.rb deleted file mode 100644 index a1eb7921d..000000000 --- a/cookbooks/munin/attributes/default.rb +++ /dev/null @@ -1,3 +0,0 @@ -default[:munin][:allow] = [] -default[:munin][:graphs] = {} -default[:munin][:plugins] = {} diff --git a/cookbooks/munin/libraries/expand.rb b/cookbooks/munin/libraries/expand.rb deleted file mode 100644 index 248c5ad5f..000000000 --- a/cookbooks/munin/libraries/expand.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Chef - class Munin - def self.expand(template, nodes, separator = " ") - nodes.map do |node| - if node.is_a?(Hash) - template - .gsub(/%%%([^%]+)%%%/) { node[Regexp.last_match[1].to_sym].tr("-", "_") } - .gsub(/%%([^%]+)%%/) { node[Regexp.last_match[1].to_sym] } - else - template - .gsub("%%%", node.tr("-", "_")) - .gsub("%%", node) - end - end.join(separator) - end - end -end diff --git a/cookbooks/munin/metadata.rb b/cookbooks/munin/metadata.rb deleted file mode 100644 index 98b074707..000000000 --- a/cookbooks/munin/metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -name "munin" -maintainer "OpenStreetMap Administrators" -maintainer_email "admins@openstreetmap.org" -license "Apache-2.0" -description "Installs and configures munin" - -version "1.0.0" -supports "ubuntu" -depends "networking" diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb deleted file mode 100644 index 3bbc4c492..000000000 --- a/cookbooks/munin/recipes/default.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# Cookbook:: munin -# Recipe:: default -# -# Copyright:: 2010, OpenStreetMap Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -service "munin-node" do - action [:stop, :disable] -end - -file "/etc/munin/munin-node.conf" do - action :delete -end - -package "munin-node" do - action :purge -end - -directory "/etc/munin" do - action :delete - recursive true -end diff --git a/cookbooks/munin/recipes/plugins.rb b/cookbooks/munin/recipes/plugins.rb deleted file mode 100644 index 3a4e7ebdc..000000000 --- a/cookbooks/munin/recipes/plugins.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# Cookbook:: munin -# Recipe:: default -# -# Copyright:: 2010, OpenStreetMap Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -include_recipe "munin" - -directory "/etc/munin/plugins" do - action :delete - recursive true -end - -directory "/usr/local/share/munin/plugins" do - action :delete - recursive true -end - -directory "/etc/munin/plugin-conf.d" do - action :delete - recursive true -end diff --git a/cookbooks/mysql/metadata.rb b/cookbooks/mysql/metadata.rb index 4f94d6099..bf6f46833 100644 --- a/cookbooks/mysql/metadata.rb +++ b/cookbooks/mysql/metadata.rb @@ -7,5 +7,4 @@ description "Installs and configures mysql" version "1.0.0" supports "ubuntu" depends "chef" -depends "munin" depends "prometheus" diff --git a/cookbooks/mysql/recipes/default.rb b/cookbooks/mysql/recipes/default.rb index b38a6364b..baeff798e 100644 --- a/cookbooks/mysql/recipes/default.rb +++ b/cookbooks/mysql/recipes/default.rb @@ -17,7 +17,6 @@ # limitations under the License. # -include_recipe "munin" include_recipe "prometheus" mysql_variant = if platform?("ubuntu") @@ -55,15 +54,6 @@ template "/etc/apparmor.d/local/usr.sbin.mysqld" do only_if { ::Dir.exist?("/sys/kernel/security/apparmor") } end -# FIXME: Remove purge post munin removal -package "libdbd-mysql-perl" do - action :purge -end - -package "libcache-cache-perl" do - action :purge -end - mysql_password = persistent_token("mysql", "prometheus", "password") mysql_user "prometheus" do diff --git a/cookbooks/nginx/metadata.rb b/cookbooks/nginx/metadata.rb index 6534c587e..b7e571c7c 100644 --- a/cookbooks/nginx/metadata.rb +++ b/cookbooks/nginx/metadata.rb @@ -7,7 +7,6 @@ description "Installs and configures nginx" version "1.0.0" supports "ubuntu" depends "apt" -depends "munin" depends "networking" depends "prometheus" depends "ssl" diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index bc7637609..d8e9d4d2b 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -18,7 +18,6 @@ # include_recipe "apt::nginx" -include_recipe "munin" include_recipe "prometheus" include_recipe "ssl" @@ -53,11 +52,6 @@ service "nginx" do subscribes :restart, "template[/etc/nginx/nginx.conf]" end -# FIXME: Remove purge post munin removal -package "libwww-perl" do - action :purge -end - prometheus_exporter "nginx" do port 9113 options "--nginx.scrape-uri=http://localhost:8050/nginx_status" diff --git a/cookbooks/nominatim/metadata.rb b/cookbooks/nominatim/metadata.rb index 3c8903ef3..ade7ed0b2 100644 --- a/cookbooks/nominatim/metadata.rb +++ b/cookbooks/nominatim/metadata.rb @@ -9,7 +9,6 @@ supports "ubuntu" depends "accounts" depends "fail2ban" depends "git" -depends "munin" depends "nginx" depends "php" depends "postgresql" diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 14b2b6628..2fc9191a6 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -18,7 +18,6 @@ # include_recipe "accounts" -include_recipe "munin" include_recipe "prometheus" if node[:nominatim][:api_flavour] == "php" diff --git a/cookbooks/ntp/metadata.rb b/cookbooks/ntp/metadata.rb index 240e619f9..b512bb56a 100644 --- a/cookbooks/ntp/metadata.rb +++ b/cookbooks/ntp/metadata.rb @@ -6,6 +6,5 @@ description "Installs and configures ntp as a client or server" version "0.8.2" supports "ubuntu" -depends "munin" depends "prometheus" depends "systemd" diff --git a/cookbooks/ntp/recipes/default.rb b/cookbooks/ntp/recipes/default.rb index 1b131f8f8..1f9579644 100644 --- a/cookbooks/ntp/recipes/default.rb +++ b/cookbooks/ntp/recipes/default.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -include_recipe "munin" - package %w[ chrony tzdata diff --git a/cookbooks/overpass/metadata.rb b/cookbooks/overpass/metadata.rb index 3f2aa322c..10f4d1b49 100644 --- a/cookbooks/overpass/metadata.rb +++ b/cookbooks/overpass/metadata.rb @@ -8,7 +8,6 @@ version "1.0.0" supports "ubuntu" depends "accounts" depends "apache" -depends "munin" depends "prometheus" depends "ruby" depends "systemd" diff --git a/cookbooks/overpass/recipes/default.rb b/cookbooks/overpass/recipes/default.rb index 474697168..0cad2a1ab 100644 --- a/cookbooks/overpass/recipes/default.rb +++ b/cookbooks/overpass/recipes/default.rb @@ -19,7 +19,6 @@ include_recipe "accounts" include_recipe "apache" -include_recipe "munin" include_recipe "prometheus" include_recipe "ruby" @@ -36,12 +35,6 @@ web_passwords = data_bag_item("web", "passwords") end end -# FIXME: Remove purge post munin removal -directory "#{basedir}/munin" do - action :delete - recursive true -end - ## Install overpass from source srcdir = "#{basedir}/src/osm-3s_v#{node[:overpass][:version]}" diff --git a/cookbooks/passenger/metadata.rb b/cookbooks/passenger/metadata.rb index 8cbf75fa6..26f48544f 100644 --- a/cookbooks/passenger/metadata.rb +++ b/cookbooks/passenger/metadata.rb @@ -8,7 +8,6 @@ version "1.0.0" supports "ubuntu" depends "apache" depends "apt" -depends "munin" depends "prometheus" depends "ruby" depends "systemd" diff --git a/cookbooks/passenger/recipes/default.rb b/cookbooks/passenger/recipes/default.rb index 04e85b486..4ad7f8b0e 100644 --- a/cookbooks/passenger/recipes/default.rb +++ b/cookbooks/passenger/recipes/default.rb @@ -19,7 +19,6 @@ include_recipe "apache" include_recipe "apt::passenger" -include_recipe "munin" include_recipe "prometheus" include_recipe "ruby" diff --git a/cookbooks/planet/metadata.rb b/cookbooks/planet/metadata.rb index a3e976976..2e70109ee 100644 --- a/cookbooks/planet/metadata.rb +++ b/cookbooks/planet/metadata.rb @@ -12,7 +12,6 @@ depends "apt" depends "awscli" depends "geoipupdate" depends "git" -depends "munin" depends "ruby" depends "osmosis" depends "systemd" diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index 519f58a52..ad532f93e 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -21,7 +21,6 @@ include_recipe "accounts" include_recipe "apache" include_recipe "geoipupdate" include_recipe "planet::aws" -include_recipe "munin" package %w[ python3 diff --git a/cookbooks/postgresql/metadata.rb b/cookbooks/postgresql/metadata.rb index a145daf0e..909b123df 100644 --- a/cookbooks/postgresql/metadata.rb +++ b/cookbooks/postgresql/metadata.rb @@ -7,6 +7,5 @@ description "Installs and configures postgresql" version "1.0.0" supports "ubuntu" depends "apt" -depends "munin" depends "ohai" depends "prometheus" diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index c34b4b013..eae492f16 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -18,7 +18,6 @@ # include_recipe "apt::postgresql" -include_recipe "munin" include_recipe "prometheus" package "locales-all" diff --git a/cookbooks/tile/metadata.rb b/cookbooks/tile/metadata.rb index b07aad4f2..eaf2843fd 100644 --- a/cookbooks/tile/metadata.rb +++ b/cookbooks/tile/metadata.rb @@ -9,7 +9,6 @@ supports "ubuntu" depends "accounts" depends "apache" depends "git" -depends "munin" depends "nodejs" depends "postgresql" depends "prometheus" diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index bd660f342..0c9da1339 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -20,7 +20,6 @@ include_recipe "accounts" include_recipe "apache" include_recipe "git" -include_recipe "munin" include_recipe "nodejs" include_recipe "postgresql" include_recipe "prometheus" diff --git a/cookbooks/web/metadata.rb b/cookbooks/web/metadata.rb index a0e3e8779..004e5f320 100644 --- a/cookbooks/web/metadata.rb +++ b/cookbooks/web/metadata.rb @@ -14,7 +14,6 @@ depends "fail2ban" depends "geoipupdate" depends "git" depends "memcached" -depends "munin" depends "nodejs" depends "passenger" depends "ruby" diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index ddaecdffb..1f3236caa 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -21,7 +21,6 @@ include_recipe "apache" include_recipe "apt" include_recipe "git" include_recipe "geoipupdate" -include_recipe "munin" include_recipe "nodejs" include_recipe "passenger" include_recipe "ruby" diff --git a/roles/base.rb b/roles/base.rb index faa580d9a..718b288a5 100644 --- a/roles/base.rb +++ b/roles/base.rb @@ -88,7 +88,6 @@ run_list( "recipe[devices]", "recipe[hardware]", "recipe[prometheus]", - "recipe[munin::plugins]", "recipe[networking]", "recipe[exim]", "recipe[ntp]", diff --git a/test/integration/munin/inspec/munin_node_spec.rb b/test/integration/munin/inspec/munin_node_spec.rb deleted file mode 100644 index 023bd9612..000000000 --- a/test/integration/munin/inspec/munin_node_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -describe package("munin-node") do - it { should_not be_installed } -end - -describe service("munin-node") do - it { should_not be_enabled } - it { should_not be_running } -end - -describe port(4949) do - it { should_not be_listening } -end