<commit_before>#!/bin/bash
. /etc/default/rkhunter
OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only`
CODE=$?
# Force everything that isn't OK to be a WARNING
if [ $CODE -gt 0 ]; then
  CODE=1
fi
printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster
exit $?<commit_msg>Force an output in the rkhunter passive check<commit_after>#!/bin/bash
. /etc/default/rkhunter
OUTPUT=`/usr/bin/nice -n 19 /usr/bin/rkhunter --cronjob --report-warnings-only`
if [ "$OUTPUT" == "" ]; then
  OUTPUT="No warnings found"
fi
CODE=$?
# Force everything that isn't OK to be a WARNING
if [ $CODE -gt 0 ]; then
  CODE=1
fi
printf "<%= @fqdn %>\trkhunter warnings\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster
exit $?
{'fraction_non_alphanumeric': 0.17117117117117117, 'fraction_numerical': 0.010296010296010296, 'mean_word_length': 3.8322981366459627, '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': '3866883', 'n_tokens_mistral': 319, 'n_tokens_neox': 299, 'n_words': 80}