I decided to do 3 things.
1 - Create a script to execute rsync on cron
rsync -rlptv --delete-after root@serverA:/some_dir/ /another_dir/ > /lalla_dir/my.log
if [ $? = 0 ];then
echo $[ 1 + $[ RANDOM % 1000 ]] >> /lalla_dir/my.log
echo "Status = OK" >> /lalla_dir/my.log
else
echo $[ 1 + $[ RANDOM % 1000 ]] >> /lalla_dir/my.log
echo "Status = ERROR" >> /lalla_dir/my.log
fi
2 - Create two Itens on Zabbix
A - check_sum my.log( , script , ,
Zabbix
vfs.file.cksum[]
B - OK.
Zabbix
vfs.file.regmatch[/lalla_dir/my.log,Status = OK]
3 - .
{my-server:vfs.file.cksum[/lalla_dir/my.log].change()}=0
or
{my-server:vfs.file.regmatch[/lalla_dir/my.log,Status = OK].last()}=0
, " = ", , erro ( ) (, cron)
- has has have, they...