Hi !
i could asked him, if could share it with the community ..
My colleague has no objections ... so if somebody wants to have this disable-alert-script ... no problem ..
a little example to disable an test :
flemming at titan:~ $ hobbit_cmd -v -d 1d -s cpu -c "known" bird033 PREPARING...
"disable bird033.cpu 1d known, Fri Jul 17 16:14:51 2009" Sent 1 commands for 1 host. flemming at titan:~ $
cheers, martin
On Sat, 11 Jul 2009, Martin Flemming wrote:
Hi !
you can do this with bb
disable HOSTNAME.TESTNAME DURATION <additional text> Disables a specific test for DURATION minutes. Thiswill cause the status of this test to be listed as "blue" on the BBDISPLAY server, and no alerts for this host/test will be generated. If DURATION is given as a number followed by s/m/h/d, it is interpreted as being in seconds/minutes/hours/days respectively. To disable all tests for a host, use an asterisk "*" for TESTNAME.
enable HOSTNAME.TESTNAME Re-enables a test that had been disabled.So you can execute bb hobbitserver "disable dbservername.* 2h Backup time" before shutting down the database and bb hobbitserver "enable dbserver.*" just at the end.
I've got an perl-script from my colleague for this,
USAGES:
hobbit_cmd -d {duration[s|m|h|d] | UNTILOK} [-s service1,service2,...] [-c "Comment"] [-n] [-v] {HOST1 HOST2 ... | ALL} ^ sets downtime
hobbit_cmd -E [-s service1,service2,...] [-n] [-v] {HOST1 HOST2 ... | ALL} ^ cancels downtimes
hobbit_cmd -R [-s service1,service2,...] [-n] [-v] {HOST1 HOST2 ... | ALL} ^ erases host or service data
hobbit_cmd -L [HOST1 HOST2 ...] ^ prints downtime information
-c add comments -n dry run -v increases verbosity in case of [-d], [-E] or [-R] present -E cancel downtime on targets (or certain service, if specified) mnemonic: Enable -R erase host or service data on server mnemonic: Remove -l reserved -L print verbose downtime information of all hosts or targets, if specified.
EXAMPLES: hobbit_cmd -d 24h -s service1,service2 -c "rebooting" HOST1 HOST2 hobbit_cmd -E -s service2 HOST1 HOST2 hobbit_cmd -R -s service2 HOST1 HOST2 hobbit_cmd -L
i could asked him, if could share it with the community ..
cheers, martin
On Fri, 10 Jul 2009, Shaun Phillips wrote:
Hi,
I have a need when we roll out new version of an application to disable cron on hosts whilst the app and database work goes ahead.
Is there a way from the command line on the client end or server end to disable alerts for cron and then enable them again?
Regards Shaun
Gruss
Martin Flemming
Martin Flemming DESY / IT office : Building 2b / 008a Notkestr. 85 phone : 040 - 8998 - 4667 22603 Hamburg mail : martin.flemming at desy.de