pt-stalk feature: execute external script on event
Bug #1001004 reported by
Gavin Towey
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Invalid
|
High
|
Daniel Nichter |
Bug Description
I'm including a patch for a new feature in pt-stalk.
--exec-
execute a command when a collection is triggered. This lets you do things like invoke pt-kill to handle a query pileup, as well as use stalk to gather info.
--exec-after-sleep
execute a command after collection has been triggered, and the script has sleet for --sleep seconds. This is used in my case to execute a script that creates a tar.gz file from the data, then sends it to a remote server.
Changed in percona-toolkit: | |
status: | New → Triaged |
tags: |
added: pt-stalk removed: request |
tags: | added: percona-23615 |
Changed in percona-toolkit: | |
importance: | Undecided → High |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
tags: |
added: plugin removed: feature |
To post a comment you must log in.
This looks useful. But I think we might want to do these slightly differently. Rather than providing a command to the tool's option, we could require the user to specify a file to be sourced, which must provide a specific function, similar to the way we source and call a trigger function. The function that's called should be executed in the background with & so that it does not hang the script entirely if the call is long-lived.