From: Tom Hughes Date: Sun, 26 Feb 2023 18:43:57 +0000 (+0000) Subject: Merge remote-tracking branch 'github/pull/584' X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/4c682bc4db2ad5e8b2ae7032dffcf124b853616d?hp=c438a3ec0cde2723efcf17ecd43d926ef3699329 Merge remote-tracking branch 'github/pull/584' --- diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 72b405c3f..2af112479 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -702,7 +702,7 @@ prometheus_collector "ohai" do interval "15m" user "root" proc_subset "all" - capability_bounding_set %w[CAP_DAC_OVERRIDE CAP_SYS_ADMIN] + capability_bounding_set %w[CAP_DAC_OVERRIDE CAP_SYS_ADMIN CAP_SYS_RAWIO] private_devices false private_users false protect_clock false diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index b6064b384..a2eb0ef96 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -331,6 +331,7 @@ Ohai.plugin(:Hardware) do when "Hardware Revision" then controller[:hardware_version] = Regexp.last_match(2) when "Firmware Version" then controller[:firmware_version] = Regexp.last_match(2) when "PCI Address (Domain:Bus:Device.Function)" then controller[:pci_slot] = Regexp.last_match(2) + when "Battery/Capacitor Status" then controller[:battery_status] = Regexp.last_match(2).split.first.downcase end elsif controller && line =~ /^ Logical Drive: (\d+)$/ array = { diff --git a/cookbooks/prometheus/resources/collector.rb b/cookbooks/prometheus/resources/collector.rb index 1dfd8764d..9a4870f24 100644 --- a/cookbooks/prometheus/resources/collector.rb +++ b/cookbooks/prometheus/resources/collector.rb @@ -36,6 +36,7 @@ property :protect_kernel_modules, [true, false] action :create do systemd_service service_name do description "Prometheus #{new_resource.collector} collector" + type "oneshot" user new_resource.user dynamic_user new_resource.user.nil? group "adm" diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 1736da60c..01d8ae00f 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -530,6 +530,11 @@ groups: alertgroup: "prometheus" - name: raid rules: + - alert: raid controller battery failed + expr: ohai_controller_info{battery_status="failed"} > 0 + for: 5m + labels: + alertgroup: "{{ $labels.instance }}" - alert: raid array degraded expr: ohai_array_info{status="degraded"} > 0 for: 5m diff --git a/cookbooks/tile/files/default/html/abuse.png b/cookbooks/tile/files/default/html/abuse.png deleted file mode 100644 index f9f7910d3..000000000 Binary files a/cookbooks/tile/files/default/html/abuse.png and /dev/null differ diff --git a/cookbooks/tile/files/default/html/abuse2.png b/cookbooks/tile/files/default/html/abuse2.png deleted file mode 100644 index ba40a46a0..000000000 Binary files a/cookbooks/tile/files/default/html/abuse2.png and /dev/null differ diff --git a/cookbooks/tile/files/default/html/abuse3.png b/cookbooks/tile/files/default/html/abuse3.png deleted file mode 100644 index b297ae727..000000000 Binary files a/cookbooks/tile/files/default/html/abuse3.png and /dev/null differ diff --git a/cookbooks/tile/files/default/html/crossdomain.xml b/cookbooks/tile/files/default/html/crossdomain.xml index 76aaf4aee..35fc43447 100644 --- a/cookbooks/tile/files/default/html/crossdomain.xml +++ b/cookbooks/tile/files/default/html/crossdomain.xml @@ -3,4 +3,3 @@ - diff --git a/cookbooks/tile/files/default/html/robots.txt b/cookbooks/tile/files/default/html/robots.txt index eb5b27349..bfb50b0ae 100644 --- a/cookbooks/tile/files/default/html/robots.txt +++ b/cookbooks/tile/files/default/html/robots.txt @@ -11,4 +11,3 @@ Disallow: /20/ Disallow: /21/ Disallow: /22/ Disallow: /23/ - diff --git a/cookbooks/tile/files/default/html/update-url-tile.png b/cookbooks/tile/files/default/html/update-url-tile.png deleted file mode 100644 index 3456d30ce..000000000 Binary files a/cookbooks/tile/files/default/html/update-url-tile.png and /dev/null differ