]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/584'
authorTom Hughes <tom@compton.nu>
Sun, 26 Feb 2023 18:43:57 +0000 (18:43 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 26 Feb 2023 18:43:57 +0000 (18:43 +0000)
cookbooks/hardware/recipes/default.rb
cookbooks/hardware/templates/default/ohai.rb.erb
cookbooks/prometheus/resources/collector.rb
cookbooks/prometheus/templates/default/alert_rules.yml.erb
cookbooks/tile/files/default/html/abuse.png [deleted file]
cookbooks/tile/files/default/html/abuse2.png [deleted file]
cookbooks/tile/files/default/html/abuse3.png [deleted file]
cookbooks/tile/files/default/html/crossdomain.xml
cookbooks/tile/files/default/html/robots.txt
cookbooks/tile/files/default/html/update-url-tile.png [deleted file]

index 72b405c3f60168178f547832f41ead0d8276426b..2af1124797d24f002add58d0ba2a7419782bf31c 100644 (file)
@@ -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
index b6064b38465184f3930eba4189661e2c9c928f20..a2eb0ef967d8811b2b912392850f4d677e6a7e0d 100644 (file)
@@ -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 = {
index 1dfd8764df27e873b727caf7a34e8a688b22d4d6..9a4870f24d67dd74222c88a96140a7fdcd861c55 100644 (file)
@@ -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"
index 1736da60cf16138b80cf5d8cc50ee60e68b94555..01d8ae00f654fce5a0120e3427928fd340c4d8df 100644 (file)
@@ -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 (file)
index f9f7910..0000000
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 (file)
index ba40a46..0000000
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 (file)
index b297ae7..0000000
Binary files a/cookbooks/tile/files/default/html/abuse3.png and /dev/null differ
index 76aaf4aeef363680a5305dead1b8da99992f042d..35fc43447c07ebe1e743a07daf9972db5d053260 100644 (file)
@@ -3,4 +3,3 @@
 <cross-domain-policy>
     <allow-access-from domain="*" secure="false" />
 </cross-domain-policy>
-       
index eb5b273491b94c380f41570e33c165e2e29cae9c..bfb50b0ae13ea1686276a22b698dd60408038ee2 100644 (file)
@@ -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 (file)
index 3456d30..0000000
Binary files a/cookbooks/tile/files/default/html/update-url-tile.png and /dev/null differ