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

source /srv/syslog/bin/secrets.sh

while IFS= read -r line; do
  if  [ -n "${MATOMO_FQDN+isset}" ] && [ -n "${MATOMO_AUTH_TOKEN+isset}" ] && [ -n "${MATOMO_SITEID+isset}" ]
  then
    echo ${line} | /srv/syslog/bin/import_logs.py \
    --url=https://${MATOMO_FQDN}/ --token-auth=${MATOMO_AUTH_TOKEN} \
    --idsite=${MATOMO_SITEID} --recorders=4 \
    --log-format-name=nginx_json -
  fi
done<commit_msg>HOTFIX: send logs for http errors, http redirects, and bot traffic to matomo<commit_after>#!/usr/bin/env sh

source /srv/syslog/bin/secrets.sh

while IFS= read -r line; do
  if  [ -n "${MATOMO_FQDN+isset}" ] && [ -n "${MATOMO_AUTH_TOKEN+isset}" ] && [ -n "${MATOMO_SITEID+isset}" ]
  then
    echo ${line} | /srv/syslog/bin/import_logs.py \
    --url=https://${MATOMO_FQDN}/ --token-auth=${MATOMO_AUTH_TOKEN} \
    --idsite=${MATOMO_SITEID} --recorders=4 \
    --enable-http-errors --enable-http-redirects --enable-bots \
    --log-format-name=nginx_json -
  fi
done
{'fraction_non_alphanumeric': 0.19621513944223107, 'fraction_numerical': 0.00199203187250996, 'mean_word_length': 3.240506329113924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5284838', 'n_tokens_mistral': 423, 'n_tokens_neox': 422, 'n_words': 70}