I know I can obtain the file mtime using the function vfs.file.time with mode=change. But how can I create and email alert when a specific file has not been updated for more than 1 hour?
UserParameter=[B]rsync[/B]fileage[*],if [ -e "$1" ]; then now=$(date +%s) && was=$(stat -c%Y $1) && elapsed=$((now - was)) && echo $elapsed; else echo 0; fi
$ zabbix_agentd -t rsyncfileage[/var/log/messages] rsyncfileage[/var/log/messages] [t|42]
UserParameter=[B]rsync[/B]fileage[*],if [ -e "$1" ]; then now=$(date +%s) && was=$(stat -c%Y $1) && elapsed=$((now - was)) && echo $elapsed; else echo 0; fi
$ zabbix_agentd -t rsyncfileage[/var/log/messages] rsyncfileage[/var/log/messages] [t|42]
Comment