Hi There,
Good job!
Could an external command be the trigger for the macro modulation, time
based is good, but command based is really good as your external system
can send triggers as required.
Cheers,
X
On 13-03-26 4:28 AM, nap wrote:
Hi,
I think you remember the check_modulation to change the commands based
on the timeperiods. I think it was a bit too hard to use with the
packs. So I implement another idea from Olivier Hanesse : macro
modulations. After all, it's not really the full command wewant to
change, but only the warning/critical values for 99%in 99% of the cases.
So one easier way it to allow user to change the macros based on time.
And here we got : *macro_modulations* :)
It's quite easy to use, and will be fully compatible with the packs
based configuration.
Let's take our basic linux pack :
/define host{/
/ name linux/
/ use generic-host/
/ check_command check_ping/
/ register 0/
/ _LOAD_WARN 2,2,2/
/ _LOAD_CRIT 3,3,3/
/}/
We want to change the _LOAD_WARN and _LOAD_CRIT macro during a
specific timeperiod, like the "backup" one. All we need it to define
this :
/define macromodulation{
macromodulation_name Huge_load_during_backup
modulation_period backup
_LOAD_WARN 5,5,5
_LOAD_CRIT 8,8,8
}
/
And in your linux template, or directly the hosts, you can call this
modulation :
/define host{
name linux
use generic-host
check_command check_ping
register 0
macromodulations Huge_load_during_backup
_LOAD_WARN 2,2,2
_LOAD_CRIT 3,3,3
}
/
And you are done. During this "backup" timeperiod, the custom macros
will be changed automatically in all your linux hosts. Of course you
can have several modulations by hosts.
You can give a test about this, the tests are OK and the code was
quite simple, so I think there should not be any bugs remaining of this :)
Good test :)
Jean
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel