[hobbit] Disable alert from client or Server
Martin Flemming
martin.flemming at desy.de
Sat Jul 11 17:17:00 CEST 2009
Hi !
you can do this with bb
> disable HOSTNAME.TESTNAME DURATION <additional text>
> Disables a specific test for DURATION minutes. This
> will 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
>
More information about the Xymon
mailing list