I have defined a handler for sending SMS via twilio:
=== sensu-go-twilio-handler-nofilter Name: sensu-go-twilio-handler-nofilter Type: pipe Timeout: 0 Filters: Mutator: Execute: RUN: /opt/sensu-plugins-ruby/embedded/bin/sensu-go-twilio-handler -f +sourcenumber -r +targnumber -s acountsid -t accounttoken Environment Variables: Runtime Assets:
I have omitted filters on purpose for testing.
I have tested the run command by copy & paste-ing it from this info output and cat’ting an example event to it. That works fine, I receive the SMS.
Then I have defined a check using this handler on the generated events:
=== check-cpu-test Name: check-cpu-test Interval: 60 Command: /opt/sensu-plugins-ruby/embedded/bin/check-cpu.rb -w 75 -c 90 Cron: Timeout: 0 TTL: 0 Subscriptions: test Handlers: sensu-go-twilio-handler-nofilter Runtime Assets: Hooks: Publish?: true Stdin?: false Proxy Entity Name: Namespace: default Metric Format: Metric Handlers:
The check is executed fine (I can see the event in the webUI). So the handler should be called, and without any filters to apply should send the SMS in any case (right?) - but that does not happen.
So the questions that arise are:
- Did I understand the basic concepts about event handlers and filtering correctly?
- How can I make sensu backend log execution (or not-execution) of handlers?
- Can this be related to the problem of http_proxy env variables I described in the Sensu Go forum?