We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My check look like:
@searches = ( { tag => 'ConReset', type => 'virtual', logfile => '/var/log/nginx/error.log', #criticalpatterns => '.*(?:failed|timed out) \(1\d\d: Connection (?:reset by peer|timed out)\) while reading .*', criticalpatterns => '.*directory index of .*', # warningpatterns => ['.*error.*, '.*fatal.*'], # warningthreshold => '10', rotation => 'debian', script => 'send_mail', scriptparams => '$MY_MAIL$ $CL_SERVICEPERFDATA$', options => 'perfdatai,script' } );
cat scripts/send_mail
#!/bin/bash MAIL=$1 PERFDATA=$2 HOST=$(hostname -f) var1=$(printf "%s: %d:%d Uhr status is %s\n" \ $HOST \ $CHECK_LOGFILES_DATE_HH \ $CHECK_LOGFILES_DATE_MI \ $CHECK_LOGFILES_SERVICESTATE) var2=$(printf "I found something:\n") var3=$(printf "%s\n\n" "$CHECK_LOGFILES_SERVICEOUTPUT") echo "$PERFDATA" >> /tmp/foo #echo -e $var1 "\n\n"$var2"\n"$var3 | mail -s "check_logfile $HOST" $MAIL
Debug Output:
tail -f /tmp/foo $ $ <- when try to get $CL_SERVICEPERFDATA$ $ $ ConReset ConReset ConReset CRITICAL CRITICAL CRITICAL $ $ $
I cant get the Performencedata here. I want to loop to send all error in one mail.
Best Regards
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
My check look like:
cat scripts/send_mail
Debug Output:
tail -f /tmp/foo$CL_SERVICEPERFDATA$
$
$ <- when try to get
$
$
ConReset
ConReset
ConReset
CRITICAL
CRITICAL
CRITICAL
$
$
$
I cant get the Performencedata here.
I want to loop to send all error in one mail.
Best Regards
The text was updated successfully, but these errors were encountered: