Temporary telegraf config to log when backups happen

Authored by nalvarez on May 9 2020, 3:13 AM.

Description

Temporary telegraf config to log when backups happen

Try to log when the backup script is running on the server, by simply
checking whether a process matching 'bin/run-backup.sh' is running.

This has several flaws:

  • It will think backups are running if *any* command with bin/run-backup.sh in the command line is running on the server, including 'vim bin/run-backup.sh' (though nobody should be editing the script directly in the server anyway)
  • If a container runs backups, the host will also see the process so it will be logged on the host too.
  • If telegraf on the container and the host run pgrep at exactly the same time, the host may see the container's pgrep briefly and detect it as the backup script.

...but it's better than nothing. I just want a rough timeline of when
backups run and how long they take.

Details

Committed
nalvarezMay 9 2020, 3:17 AM
Parents
R897:a083434c80eb: Delete my.cnf.j2
Branches
Unknown
Tags
Unknown