<commit_before>#!/bin/bash
## Create cronjobs for munin-master
CRON="0,5,10,15,20,25,30,35,40,45,50,55 * * * * (sudo -u munin /opt/local/bin/munin-cron)"
(crontab -l 2>/dev/null || true; echo "$CRON" ) | sort | uniq | crontab

## Create localhost config for munin
HOSTNAME=$(hostname)
echo -e "[${HOSTNAME}]\n    address 127.0.0.1\n    use_node_name yes\n" > /opt/local/etc/munin/munin-conf.d/localhost.conf

## Enable FCGI for munin-graph and munin-html
svcadm enable svc:/network/spawn-fcgi:munin-graph
svcadm enable svc:/network/spawn-fcgi:munin-html<commit_msg>Add logadm for munin-master (and node) logfiles<commit_after>#!/bin/bash
## Create cronjobs for munin-master
CRON="0,5,10,15,20,25,30,35,40,45,50,55 * * * * (sudo -u munin /opt/local/bin/munin-cron)"
(crontab -l 2>/dev/null || true; echo "$CRON" ) | sort | uniq | crontab

## Create localhost config for munin
HOSTNAME=$(hostname)
echo -e "[${HOSTNAME}]\n    address 127.0.0.1\n    use_node_name yes\n" > /opt/local/etc/munin/munin-conf.d/localhost.conf

## Add logadm to rotate munin-master logfiles by default
logadm -r '/var/log/munin/munin-node.log'
logadm -w '/var/log/munin/*.log' -A 14d -p 1d -c -N -m 640

## Enable FCGI for munin-graph and munin-html
svcadm enable svc:/network/spawn-fcgi:munin-graph
svcadm enable svc:/network/spawn-fcgi:munin-html
{'fraction_non_alphanumeric': 0.16855631141345426, 'fraction_numerical': 0.04837490551776266, 'mean_word_length': 4.151750972762646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6336117', 'n_tokens_mistral': 606, 'n_tokens_neox': 538, 'n_words': 117}