Add an exit code status check with a delay threshold

Bug #1133251 reported by Callum Macdonald
6
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.

Tags: pt-heartbeat
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

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

Changed in percona-toolkit:
status: New → Invalid
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1080

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers