I may be over-complicating things as I’m basically just looking for a way to simulate the old Nagios Host/Service dependencies bits. Maybe using a mutator to create a stash in order to silence events is not the cleanest way.
I just noticed the filter_dependencies method in sensu-handler.rb. Is anyone using it? Looks like the a ‘dependencies’ attribute can be added to a check with an array of check names. This seems like a possible solution for node-specific checks. For example, my super_duper_check can depend on ‘keepalive’ which would (hopefully) result in super_duper_check not generating an event when the node’s ‘keepalive’ check fails. If I’m correct, I’m probably going to see if I can extend this to work across nodes. This could probably be done by refactoring the method to use a hash rather than an array where the key would represent the node and the value represents checks related to that node.
Anxious to hear any thoughts…