Add an exit code status check with a delay threshold
Bug #1133251 reported by
Callum Macdonald
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Invalid
|
Undecided
|
Unassigned |
Bug Description
pt-heartbeat is a great tool. We use it alongside monit to generate alerts if any of our slaves fall behind. However, that requires an intermediary script. It would be great if pt-heartbeat had an option whereby it would check that the replication delay is within a certain threshold and if so, exit 0, if not, exit 1. That would allow other scripts (such as monit) to call pt-heartbeat at regular intervals and verify the replication delay.
I imagine a single argument could be added along the lines of:
--check-threshold 60
Where 60 is the number of seconds considered acceptable. Anything over that would result in a non zero exit code.
To post a comment you must log in.
Thanks for the feedback. Since this isn't a bug, I've created https:/ /blueprints. launchpad. net/percona- toolkit/ +spec/pt- heartbeat- check-lag- and-exit