<commit_before>#!/usr/bin/env bash

# create telegraf user
curl -XPOST "http://influxdb.kube-system.svc:8086/query?u=root&p=root" \
         --data-urlencode "q=CREATE USER ${INFLUXDB_TELEGRAF_USERNAME} WITH PASSWORD '${<PASSWORD>}'"
curl -XPOST "http://influxdb.kube-system.svc:8086/query?u=root&p=root" \
         --data-urlencode "q=GRANT ALL on k8s to ${INFLUXDB_TELEGRAF_USERNAME}"
sed -i s/superSecurePassword/${INFLUXDB_TELEGRAF_PASSWORD}/ /etc/telegraf/telegraf.conf
sed -i s/username = "telegraf"/username = "${INFLUXDB_TELEGRAF_USERNAME}"/ /etc/telegraf/telegraf.conf

# setup and start telegraf
/usr/bin/telegraf --config /etc/telegraf/telegraf.conf<commit_msg>Fixed sed command in telegraf-node run.sh<commit_after>#!/usr/bin/env bash

# create telegraf user
curl -XPOST "http://influxdb.kube-system.svc:8086/query?u=root&p=root" \
         --data-urlencode "q=CREATE USER ${INFLUXDB_TELEGRAF_USERNAME} WITH PASSWORD '${<PASSWORD>}'"
curl -XPOST "http://influxdb.kube-system.svc:8086/query?u=root&p=root" \
         --data-urlencode "q=GRANT ALL on k8s to ${INFLUXDB_TELEGRAF_USERNAME}"
sed -i "s/superSecurePassword/${INFLUXDB_TELEGRAF_PASSWORD}/" /etc/telegraf/telegraf.conf
sed -i "s/username = \"telegraf\"/username = \"${INFLUXDB_TELEGRAF_USERNAME}\"/" /etc/telegraf/telegraf.conf

# setup and start telegraf
/usr/bin/telegraf --config /etc/telegraf/telegraf.conf
{'fraction_non_alphanumeric': 0.15797101449275364, 'fraction_numerical': 0.013043478260869565, 'mean_word_length': 4.6138211382113825, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '6030836', 'n_tokens_mistral': 591, 'n_tokens_neox': 565, 'n_words': 88}