<commit_before>#!/bin/bash

CONFIG_FILE=/logstash/logstash.conf

if [ -z "${ES_PORT_9300_TCP_ADDR}" -o -z "${ES_PORT_9300_TCP_PORT}" ]; then
    echo "Must link elasticsearch as es"
    exit 1
fi

sed -i \
    -e "s@{{es_hostname}}@${ES_PORT_9300_TCP_ADDR}@" \
    -e "s@{{es_port}}@${ES_PORT_9300_TCP_PORT}@" \
    ${CONFIG_FILE}

/logstash/bin/logstash agent \
		       --configtest \
		       --config /logstash/logstash.conf || exit 1

# Fire up logstash!
exec /logstash/bin/logstash \
     agent \
     --config ${CONFIG_FILE} \
     -- \
     web<commit_msg>Use correct ES port.<commit_after>#!/bin/bash

CONFIG_FILE=/logstash/logstash.conf

if [ -z "${ES_PORT_9200_TCP_ADDR}" -o -z "${ES_PORT_9200_TCP_PORT}" ]; then
    echo "Must link elasticsearch as es"
    exit 1
fi

sed -i \
    -e "s@{{es_hostname}}@${ES_PORT_9200_TCP_ADDR}@" \
    -e "s@{{es_port}}@${ES_PORT_9200_TCP_PORT}@" \
    ${CONFIG_FILE}

/logstash/bin/logstash agent \
		       --configtest \
		       --config /logstash/logstash.conf || exit 1

# Fire up logstash!
exec /logstash/bin/logstash \
     agent \
     --config ${CONFIG_FILE} \
     -- \
     web
{'fraction_non_alphanumeric': 0.16299559471365638, 'fraction_numerical': 0.03171806167400881, 'mean_word_length': 2.6293929712460065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6841558', 'n_tokens_mistral': 498, 'n_tokens_neox': 461, 'n_words': 84}