default[:hardware][:modules] = %w[lp]
default[:hardware][:grub][:cmdline] = %w[nomodeset]
default[:hardware][:sensors] = {}
+default[:hardware][:hwmon] = {}
default[:hardware][:ipmi][:excluded_sensors] = []
if node[:dmi] && node[:dmi][:system]
depends "apache"
depends "apt"
depends "git"
+depends "hardware"
depends "networking"
depends "timescaledb"
mode "644"
end
+metric_relabel = []
+
+node[:hardware][:hwmon].each do |chip, details|
+ next unless details[:ignore]
+
+ sensors = details[:ignore].join("|")
+
+ metric_relabel << {
+ :source_labels => "chip,sensor",
+ :regex => "#{chip};(#{sensors})",
+ :action => "drop"
+ }
+end
+
prometheus_exporter "node" do
port 9100
options %w[
--collector.systemd
--collector.tcpstat
]
+ metric_relabel metric_relabel
end
default_attributes(
:hardware => {
+ :hwmon => {
+ "i2c_0_0_002f" => {
+ :ignore => %w[fan3 fan4 fan5 fan6 fan7 fan8 fan9 fan10 fan11 fan12]
+ }
+ },
:ipmi => {
:excluded_sensors => [13, 14, 15, 16, 17, 18, 19, 20]
},