Notify developer via system about new watchdog.
#!/bin/bash
log='/var/log/syslog'
regex='drupal: ([^\|]*)\|[^\|]*\|([^\|]*)[^\|]*\|[^\|]*\|[^\|]*\|[^\|]*\|[^\|]*\|[^\|]*\|(.*)'
while inotifywait -e modify $log; do
if tail -1 $log | grep drupal; then
line=`tail -1 $log`
[[ $line =~ $regex ]]
host="${BASH_REMATCH[1]}"
type="${BASH_REMATCH[2]}"
message="${BASH_REMATCH[3]}"
notify-send "$host: $type" "$message"
fi
done