<commit_before># DO NOT EDIT - This file is being maintained by Chef

# Set maximum number of update processes to run at once
max_processes 64

# Maximum number of graphs to generate at once
max_graph_jobs 24
max_cgi_graph_jobs 24

# Render pages and graphs on demand
html_strategy cgi
graph_strategy cgi

# Use rrdcached
rrdcached_socket /var/run/rrdcached.sock

# Configure alert targets
contact.admins.command mail -s "Munin Notification for ${var:host}" <EMAIL>
contact.admins.always_send invalid
contact.null.command cat > /dev/null
contact.null.always_send invalid

# Send alerts to the admins by default
contacts admins

# Ignore uncontactable hosts for twelve hours
unknown_limit 144
<% @clients.sort { |a,b| a[:hostname] <=> b[:hostname] }.each do |client| -%>

# Configure monitoring for <%= client[:fqdn] %>
[<%= client[:hostname] %>.openstreetmap.org]
<% if Time.now - Time.at(client[:ohai_time]) > @expiry_time -%>
    update no
<% end -%>
<% if client[:networking][:roles][:external][:zone] == "ucl" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client[:networking][:roles][:external][:zone] == "ams" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client[:networking][:roles][:external][:zone] == "bm" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client.external_ipaddress -%>
    address <%= client.external_ipaddress %>
<% end -%>
    use_node_name yes
<% if client[:munin][:plugins] -%>
<% client[:munin][:plugins].keys.sort.each do |plugin| -%>
<% client[:munin][:plugins][plugin].keys.sort.each do |value| -%>
<% if client[:munin][:plugins][plugin][value].kind_of?(Hash) -%>
<% if client[:munin][:plugins][plugin][value][:graph] -%>
    <%= plugin %>.<%= value %>.graph <%= client[:munin][:plugins][plugin][value][:graph] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:draw] -%>
    <%= plugin %>.<%= value %>.draw <%= client[:munin][:plugins][plugin][value][:draw] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:label] -%>
    <%= plugin %>.<%= value %>.label <%= client[:munin][:plugins][plugin][value][:label] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:warning] -%>
    <%= plugin %>.<%= value %>.warning <%= client[:munin][:plugins][plugin][value][:warning] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:critical] -%>
    <%= plugin %>.<%= value %>.critical <%= client[:munin][:plugins][plugin][value][:critical] %>
<% end -%>
<% else -%>
    <%= plugin %>.<%= value %> <%= client[:munin][:plugins][plugin][value] %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% if client[:munin][:graphs] -%>
<% client[:munin][:graphs].keys.sort.each do |graph| -%>
<% if client[:munin][:graphs][graph][:title] -%>
    <%= graph %>.graph_title <%= client[:munin][:graphs][graph][:title] %>
<% end -%>
<% if client[:munin][:graphs][graph][:vlabel] -%>
    <%= graph %>.graph_vlabel <%= client[:munin][:graphs][graph][:vlabel] %>
<% end -%>
<% if client[:munin][:graphs][graph][:category] -%>
    <%= graph %>.graph_category <%= client[:munin][:graphs][graph][:category] %>
<% end -%>
<% client[:munin][:graphs][graph][:values].keys.sort.each do |value| -%>
<% if client[:munin][:graphs][graph][:values][value][:sum] -%>
    <%= graph %>.<%= value %>.sum <%= client[:munin][:graphs][graph][:values][value][:sum].join(" ") %>
<% end -%>
<% if client[:munin][:graphs][graph][:values][value][:label] -%>
    <%= graph %>.<%= value %>.label <%= client[:munin][:graphs][graph][:values][value][:label] %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% end -%>

# Configure monitoring for pdu1.ams.openstreetmap.org
[openstreetmap.org;pdu1.ams.openstreetmap.org]
    address 10.0.48.10
    use_node_name no

# Configure monitoring for pdu1.ams.openstreetmap.org
[openstreetmap.org;pdu2.ams.openstreetmap.org]
    address 10.0.48.10
    use_node_name no

# Configure compound graphs for ams.openstreetmap.org
[ams.openstreetmap.org]
    update no
    apcpdu_current.graph_title Load
    apcpdu_current.graph_args --lower-limit 0
    apcpdu_current.graph_vlabel Amps
    apcpdu_current.graph_category power
    apcpdu_current.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_current.current pdu2=pdu2.ams.openstreetmap.org:snmp_pdu2_ams_openstreetmap_org_apcpdu_current.current
    apcpdu_current.graph_total total
    apcpdu_current.current.label Current
    apcpdu_current.current.draw AREASTACK
    apcpdu_current.current.min 0
    apcpdu_power.graph_title Power
    apcpdu_power.graph_args --base 1000 --lower-limit 0
    apcpdu_power.graph_vlabel Watts
    apcpdu_power.graph_category power
    apcpdu_power.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_power.power pdu2=pdu2.ams.openstreetmap.org:snmp_pdu2_ams_openstreetmap_org_apcpdu_power.power
    apcpdu_power.graph_total total
    apcpdu_power.power.label Power
    apcpdu_power.power.draw AREASTACK
    apcpdu_power.power.min 0
    apcpdu_temperature.graph_title Temperature
    apcpdu_temperature.graph_args --lower-limit 0
    apcpdu_temperature.graph_vlabel Degrees Celsius
    apcpdu_temperature.graph_category sensors
    apcpdu_temperature.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_temperature.temperature
    apcpdu_temperature.temperature.label Temperature
    apcpdu_temperature.temperature.draw LINE2
    apcpdu_temperature.temperature.min 0
    apcpdu_humidity.graph_title Humidity
    apcpdu_humidity.graph_args --lower-limit 0
    apcpdu_humidity.graph_vlabel %
    apcpdu_humidity.graph_category sensors
    apcpdu_humidity.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_humidity.humidity
    apcpdu_humidity.humidity.label Humidity
    apcpdu_humidity.humidity.draw LINE2
    apcpdu_humidity.humidity.min 0
<% unless @frontends.empty? && @backends.empty? -%>

# Configure compound graphs for www.openstreetmap.org
[www.openstreetmap.org]
    update no
    apache_accesses.graph_title Apache accesses
    apache_accesses.graph_vlabel accesses / ${graph_period}
    apache_accesses.graph_category apache<commit_msg>Fix composite munin graphs for amsterdam<commit_after># DO NOT EDIT - This file is being maintained by Chef

# Set maximum number of update processes to run at once
max_processes 64

# Maximum number of graphs to generate at once
max_graph_jobs 24
max_cgi_graph_jobs 24

# Render pages and graphs on demand
html_strategy cgi
graph_strategy cgi

# Use rrdcached
rrdcached_socket /var/run/rrdcached.sock

# Configure alert targets
contact.admins.command mail -s "Munin Notification for ${var:host}" <EMAIL>
contact.admins.always_send invalid
contact.null.command cat > /dev/null
contact.null.always_send invalid

# Send alerts to the admins by default
contacts admins

# Ignore uncontactable hosts for twelve hours
unknown_limit 144
<% @clients.sort { |a,b| a[:hostname] <=> b[:hostname] }.each do |client| -%>

# Configure monitoring for <%= client[:fqdn] %>
[<%= client[:hostname] %>.openstreetmap.org]
<% if Time.now - Time.at(client[:ohai_time]) > @expiry_time -%>
    update no
<% end -%>
<% if client[:networking][:roles][:external][:zone] == "ucl" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client[:networking][:roles][:external][:zone] == "ams" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client[:networking][:roles][:external][:zone] == "bm" -%>
    address <%= client.internal_ipaddress || client.external_ipaddress %>
<% elsif client.external_ipaddress -%>
    address <%= client.external_ipaddress %>
<% end -%>
    use_node_name yes
<% if client[:munin][:plugins] -%>
<% client[:munin][:plugins].keys.sort.each do |plugin| -%>
<% client[:munin][:plugins][plugin].keys.sort.each do |value| -%>
<% if client[:munin][:plugins][plugin][value].kind_of?(Hash) -%>
<% if client[:munin][:plugins][plugin][value][:graph] -%>
    <%= plugin %>.<%= value %>.graph <%= client[:munin][:plugins][plugin][value][:graph] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:draw] -%>
    <%= plugin %>.<%= value %>.draw <%= client[:munin][:plugins][plugin][value][:draw] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:label] -%>
    <%= plugin %>.<%= value %>.label <%= client[:munin][:plugins][plugin][value][:label] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:warning] -%>
    <%= plugin %>.<%= value %>.warning <%= client[:munin][:plugins][plugin][value][:warning] %>
<% end -%>
<% if client[:munin][:plugins][plugin][value][:critical] -%>
    <%= plugin %>.<%= value %>.critical <%= client[:munin][:plugins][plugin][value][:critical] %>
<% end -%>
<% else -%>
    <%= plugin %>.<%= value %> <%= client[:munin][:plugins][plugin][value] %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% if client[:munin][:graphs] -%>
<% client[:munin][:graphs].keys.sort.each do |graph| -%>
<% if client[:munin][:graphs][graph][:title] -%>
    <%= graph %>.graph_title <%= client[:munin][:graphs][graph][:title] %>
<% end -%>
<% if client[:munin][:graphs][graph][:vlabel] -%>
    <%= graph %>.graph_vlabel <%= client[:munin][:graphs][graph][:vlabel] %>
<% end -%>
<% if client[:munin][:graphs][graph][:category] -%>
    <%= graph %>.graph_category <%= client[:munin][:graphs][graph][:category] %>
<% end -%>
<% client[:munin][:graphs][graph][:values].keys.sort.each do |value| -%>
<% if client[:munin][:graphs][graph][:values][value][:sum] -%>
    <%= graph %>.<%= value %>.sum <%= client[:munin][:graphs][graph][:values][value][:sum].join(" ") %>
<% end -%>
<% if client[:munin][:graphs][graph][:values][value][:label] -%>
    <%= graph %>.<%= value %>.label <%= client[:munin][:graphs][graph][:values][value][:label] %>
<% end -%>
<% end -%>
<% end -%>
<% end -%>
<% end -%>

# Configure monitoring for pdu1.ams.openstreetmap.org
[openstreetmap.org;pdu1.ams.openstreetmap.org]
    address 10.0.48.10
    use_node_name no

# Configure monitoring for pdu1.ams.openstreetmap.org
[openstreetmap.org;pdu2.ams.openstreetmap.org]
    address 10.0.48.10
    use_node_name no

# Configure compound graphs for ams.openstreetmap.org
[ams.openstreetmap.org]
    update no
    apcpdu_current.graph_title Load
    apcpdu_current.graph_args --lower-limit 0
    apcpdu_current.graph_vlabel Amps
    apcpdu_current.graph_category power
    apcpdu_current.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_current.current pdu2=pdu2.ams.openstreetmap.org:snmp_pdu2_ams_openstreetmap_org_apcpdu_current.current
    apcpdu_current.graph_total total
    apcpdu_current.pdu1.label PDU A
    apcpdu_current.pdu1.draw AREASTACK
    apcpdu_current.pdu1.min 0
    apcpdu_current.pdu2.label PDU B
    apcpdu_current.pdu2.draw AREASTACK
    apcpdu_current.pdu2.min 0
    apcpdu_power.graph_title Power
    apcpdu_power.graph_args --base 1000 --lower-limit 0
    apcpdu_power.graph_vlabel Watts
    apcpdu_power.graph_category power
    apcpdu_power.graph_order pdu1=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_power.power pdu2=pdu2.ams.openstreetmap.org:snmp_pdu2_ams_openstreetmap_org_apcpdu_power.power
    apcpdu_power.graph_total total
    apcpdu_power.pdu1.label PDU A
    apcpdu_power.pdu1.draw AREASTACK
    apcpdu_power.pdu1.min 0
    apcpdu_power.pdu2.label PDU B
    apcpdu_power.pdu2.draw AREASTACK
    apcpdu_power.pdu2.min 0
    apcpdu_temperature.graph_title Temperature
    apcpdu_temperature.graph_args --lower-limit 0
    apcpdu_temperature.graph_vlabel Degrees Celsius
    apcpdu_temperature.graph_category sensors
    apcpdu_temperature.graph_order temperature=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_temperature.temperature
    apcpdu_temperature.temperature.label Temperature
    apcpdu_temperature.temperature.draw LINE2
    apcpdu_temperature.temperature.min 0
    apcpdu_humidity.graph_title Humidity
    apcpdu_humidity.graph_args --lower-limit 0
    apcpdu_humidity.graph_vlabel %
    apcpdu_humidity.graph_category sensors
    apcpdu_humidity.graph_order humidity=pdu1.ams.openstreetmap.org:snmp_pdu1_ams_openstreetmap_org_apcpdu_humidity.humidity
    apcpdu_humidity.humidity.label Humidity
    apcpdu_humidity.humidity.draw LINE2
    apcpdu_humidity.humidity.min 0
<% unless @frontends.empty? && @backends.empty? -%>

# Configure compound graphs for www.openstreetmap.org
[www.openstreetmap.org]
    update no
    apache_accesses.graph_title Apache accesses
    apache_accesses.graph_vlabel accesses / ${graph_period}
    apache_accesses.graph_category apache
{'fraction_non_alphanumeric': 0.16937647987371746, 'fraction_numerical': 0.010260457774269928, 'mean_word_length': 5.18701171875, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1684202', 'n_tokens_mistral': 4918, 'n_tokens_neox': 4497, 'n_words': 714}