default[:hardware][:modules] = %w[lp]
default[:hardware][:grub][:cmdline] = %w[nomodeset]
default[:hardware][:sensors] = {}
+default[:hardware][:ipmi][:excluded_sensors] = []
if node[:dmi] && node[:dmi][:system]
case node[:dmi][:system][:manufacturer]
package "ipmitool"
package "freeipmi-tools"
+ template "/etc/prometheus/ipmi_local.yml" do
+ source "ipmi_local.yml.erb"
+ owner "root"
+ group "root"
+ mode "644"
+ end
+
prometheus_exporter "ipmi" do
port 9290
+ options "--config.file=/etc/prometheus/ipmi_local.yml"
+ subscribes :restart, "template[/etc/prometheus/ipmi_local.yml]"
end
end
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+modules:
+ default:
+ collectors:
+ - bmc
+ - ipmi
+ - dcmi
+ - chassis
+ exclude_sensor_ids:
+<% node[:hardware][:ipmi][:excluded_sensors].each do |sensor| -%>
+ - <%= sensor %>
+<% end -%>
default_attributes(
:hardware => {
+ :ipmi => {
+ :excluded_sensors => [3, 4]
+ },
:shm_size => "20g"
},
:munin => {