pt-heartbeat --monitor --file sometimes results in an empty file
I'm using pt-heartbeat to monitor replication delay between 1 master and 2 slaves (1 SSD, 1 disk). Running on the slaves like so:
$ cat /etc/pt-
Then I'm using monit and a custom rolled bash script to verify the contents of /var/spool/
Several times a day, maybe 5-10 times per day, the script finds the /var/spool/
I tried adding a delay and a second check into the script. I used a sleep of 2.7s to offset against the 1s interval in case the script was hitting at precisely the time when pt-heartbeat had truncated the file. This change appears to have reduced the frequency of the issue, but it still persists.
Just let me know if any additional information would be useful in tracking down this issue.
 $ while true; do ls --full-time /var/spool/