How to output stdout and stderr from an exec program script in monit -
i have python script use check system conditions alert on using monit. script prints buch of stuff during execution stdout want capture in log file. how should configure monit conf script, such can capture both stdout , stderr of script , @ same time alerting on exit status of script. monit alert should included stdout/stderr alert events.
this tried
#/etc/monit/conf/myprogram.conf check program my_program path "/usr/bin/python -u /opt/program/my_program.py > my_prgoram.log 2&>1" if status !=0 alert but see monit thinks program reporting status=0 when exists error code 1.
what doing wrong?
$monit_description contains stderr
Comments
Post a Comment