I am trying to get this external script to work whenever a smart event occurs it should be both send via email and using the external script using syslog/logger command. The mails are being send however the external script is not being used and nothing is send out via syslog.
#!/bin/bash
echo "starting automatic reaction" >> /var/log/automaticreaction.txt
EVENT=$(cat);
echo "logging event details $EVENT" >> /var/log/automaticreaction.txt
logger -n 10.1.1.1 -P 1234 $EVENT
echo "sending to syslog" >> /var/log/automaticreaction.txt
According to the documentation the EVENT=$(cat); and using the $EVENT should automatically retrieve the event data. Does someone here have experience with this?