[Shinken-devel] New business rules operator : the not !
Status: Beta
Brought to you by:
naparuba
From: nap <nap...@gm...> - 2011-12-09 16:08:36
|
Hi all, I just pushed a new operator for business rules, the not (!). It's useful for active/passive setups. I've got an example in my own production : an active/passive heartbeat for a VIP+Cups system on my ERP system. I was using a negate for the passive part, but it was not very useful for the business rules. So no you can define : check_command bp_rule!host1,srv1&!host2,srv2 It will do theses switches : * UP->DOWN, DOWN->UP * OK->CRITICAL, CRITICAL->OK (from now I didn't touched at warning, maybe we can make it OK too?) Like always the test code was bigger than the core code, but it's always a good sign :) The commit is at : https://github.com/naparuba/shinken/commit/f41b5ae2e9c0b7ccf0dc15d0d4bef4217f8849e7 Jean |