LP #1049148: pt-stalk can't do "less-than" thresholds

Description

**Reported in Launchpad by Baron Schwartz last update 01-10-2012 20:56:26

I want to set up pt-stalk to trigger when there is too little disk space left, say, 200MB. I have had to write it as a trigger against "greater than disk-size minus 200MB" instead. Servers have different disk sizes, so this is somewhat tedious. It would be easier to set up if I could just say "less than 200MB" instead.

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 6:56 PM

**Comment from Launchpad by: Baron Schwartz on: 01-10-2012 20:56:25

No, because then I still have to customize the plugin on every server I deploy against. The only workable workaround I can think of is to negate the number and set the threshold to -200MB.

lpjirasync January 24, 2018 at 6:56 PM

**Comment from Launchpad by: Daniel Nichter on: 01-10-2012 20:32:27

Can you set --threshold=0, then ignore the var in a custom --function script, and in that custom script return 1 if the disk space is < whatever, else return 0? I.e. handle all logic in the custom script and use the [value -gt THRESHOLD] in the tool in a hackish way?

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 6:55 PM
Updated December 21, 2019 at 2:32 PM