Sensu Go hooks using check variables and labels

#1

Are there any limitations on using check variables and client label values within a hook definition?

I’m specifically interested in building a hook script that grabs the check name of the calling check and a wait interval in the client definition in order to sleep for that interval and then perform an adhoc rerun in an interval less than the regularly scheduled interval.

I don’t see anything in the documentation that says I can’t do this, so I can right?

Thanks!

#2

Hi again @KendallChenoweth,

You could definitely do that. Otherwise, you could simply configure the check to run at a lower interval and configure a handler to verify the occurrences attribute of the event and prevent events below a certain number of occurrences from being handled.