<commit_before>#!/bin/bash
# Commands to be run on a juju controller apiserver to enable system
# monitoring.

set +ex

collectd_config_file=$1
runner_script_output_path=$2

cat <<EOF > ${runner_script_output_path}
password=`sudo grep oldpassword /var/lib/juju/agents/machine-*/agent.conf | cut -d" " -f2`
mongostat --host=127.0.0.1:37017 \
    --authenticationDatabase admin \
    --ssl \
    --sslAllowInvalidCertificates \
    --username \"admin\" \
    --password \"\<PASSWORD>\" \
    --noheaders 5 > /tmp/mongodb-stats.log 2> /tmp/mongodb-error.log
EOF

sudo apt-get install -y collectd-core
sudo mkdir /etc/collectd/collectd.conf.d
sudo cp ${collectd_config_file} /etc/collectd/collectd.conf
sudo /etc/init.d/collectd restart

sudo echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongo-org.list
sudo apt-get update
sudo apt-get install --yes --allow-unauthenticated mongodb-org-tools daemon
sudo chmod +x ${runner_script_output_path}<commit_msg>Pin version of mongodb tools due to output format change.<commit_after>#!/bin/bash
# Commands to be run on a juju controller apiserver to enable system
# monitoring.

set +ex

collectd_config_file=$1
runner_script_output_path=$2

cat <<EOF > ${runner_script_output_path}
password=`sudo grep oldpassword /var/lib/juju/agents/machine-*/agent.conf | cut -d" " -f2`
mongostat --host=127.0.0.1:37017 \
    --authenticationDatabase admin \
    --ssl \
    --sslAllowInvalidCertificates \
    --username \"admin\" \
    --password \"\<PASSWORD>\" \
    --noheaders 5 > /tmp/mongodb-stats.log 2> /tmp/mongodb-error.log
EOF

sudo apt-get install -y collectd-core
sudo mkdir /etc/collectd/collectd.conf.d
sudo cp ${collectd_config_file} /etc/collectd/collectd.conf
sudo /etc/init.d/collectd restart

sudo echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongo-org.list
sudo apt-get update
sudo apt-get install --yes --allow-unauthenticated mongodb-org-tools=3.2.10~rc2 daemon
sudo chmod +x ${runner_script_output_path}
{'fraction_non_alphanumeric': 0.1327939076630176, 'fraction_numerical': 0.017610661589719183, 'mean_word_length': 3.766439909297052, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '5698363', 'n_tokens_mistral': 794, 'n_tokens_neox': 718, 'n_words': 172}