Latest snapshot - DOWNTIME applied to individual tests
list Frédéric Mangeant
Hi again Henrik
I'm trying to use the new DOWNTIME settings. From the Changelog :
* DOWNTIME can now be applied to individual tests, and
you can specify a text explaining why the service is
down. The new format in the bb-hosts file is:
DOWNTIME=columns:days:starttime:endtime:cause
If you have more than one service that you want to set
the downtime for, "column" can be "*" to match all
services, or you can define multiple downtime-settings:
"DOWNTIME=http,ftp:*:0300:0315:CMS update;*:0:0200:0210:Reboot"
I added this to a host : DOWNTIME=*:*:1000:1600:Test
In the 'info' colum, that appeared correctly : Planned downtime:All
days:*:1000:1600:Test
Sent (with BBwin 0.7) a red status which appeared as... red, and an
alert was sent.
Maybe I'm not using DOWNTIME the right way ?
Another thing, adding a space in the cause field seems not to work.
Thanks in advance for your answer.
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
list Henrik Størner
▸
On Mon, Jun 19, 2006 at 02:20:06PM +0200, Fr?d?ric Mangeant wrote:
I added this to a host : DOWNTIME=*:*:1000:1600:Test In the 'info' colum, that appeared correctly : Planned downtime:All days:*:1000:1600:Test Sent (with BBwin 0.7) a red status which appeared as... red, and an alert was sent. Maybe I'm not using DOWNTIME the right way ?
I cannot reproduce this here. I tried adding this to my bb-hosts: 172.16.10.100 localhost # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet (it doesn't run telnet). Status appeared as blue, as expected. NOTE: The hobbitd daemon must reload the bb-hosts file before these changes take effect - something that happens only once every 10 minutes. So if you have just added this entry, then it may show up as red for a few minutes. You can force a reload by sending a SIGHUP to the hobbitd process. Regards, Henrik
list Frédéric Mangeant
▸
Henrik Stoerner a écrit :
I cannot reproduce this here. I tried adding this to my bb-hosts: 172.16.10.100 localhost # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet (it doesn't run telnet). Status appeared as blue, as expected. NOTE: The hobbitd daemon must reload the bb-hosts file before these changes take effect - something that happens only once every 10 minutes. So if you have just added this entry, then it may show up as red for a few minutes. You can force a reload by sending a SIGHUP to the hobbitd process.
Hi Henrik thanks, it works fine with a SIGHUP ;-) But adding this entry in bb-hosts : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet gives this under the 'info' column : Planned downtime:All days:*:1000:1600:Test It should have been "Test af downtime"... Regards, -- Frédéric Mangeant Steria EDC Sophia-Antipolis
list Larry Barber
"Test of downtime" needs to be in quotes. Thanks, Larry Barber
▸
On 6/26/06, Frédéric Mangeant <user-b6ea1d850181@xymon.invalid> wrote:Henrik Stoerner a écrit :I cannot reproduce this here. I tried adding this to my bb-hosts: 172.16.10.100 localhost # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet (it doesn't run telnet). Status appeared as blue, as expected. NOTE: The hobbitd daemon must reload the bb-hosts file before these changes take effect - something that happens only once every 10 minutes. So if you have just added this entry, then it may show up as red for a few minutes. You can force a reload by sending a SIGHUP to the hobbitd process.Hi Henrik thanks, it works fine with a SIGHUP ;-) But adding this entry in bb-hosts : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet gives this under the 'info' column : Planned downtime:All days:*:1000:1600:Test It should have been "Test af downtime"... Regards, -- Frédéric Mangeant Steria EDC Sophia-Antipolis
list Frédéric Mangeant
Larry Barber a écrit :
"Test of downtime" needs to be in quotes.
I've tried : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:"Test af downtime"" ftp 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:Test af downtime" ftp 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:'Test af downtime'" ftp But under the 'info' column, I only get the 1st word of the comment. -- Frédéric Mangeant Steria EDC Sophia-Antipolis
list Henrik Størner
▸
On Mon, Jun 26, 2006 at 04:33:17PM +0200, Frédéric Mangeant wrote:
But adding this entry in bb-hosts : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet gives this under the 'info' column : Planned downtime:All days:*:1000:1600:Test It should have been "Test af downtime"...
There's something screwy with the quoting in bb-hosts. Need to get that fixed. Regards, Henrik
list Larry Barber
Try: 10.50.8.55 fmangeant # DOWNTIME=*:*:1000:1800:"Test af downtime" ftp I don't think that it is necessary to enclose the whole thing in quotation marks.
▸
Thanks,
Larry Barber
On 6/26/06, Frédéric Mangeant <user-b6ea1d850181@xymon.invalid> wrote:Larry Barber a écrit :"Test of downtime" needs to be in quotes.I've tried : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:"Test af downtime"" ftp 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:Test af downtime" ftp 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1800:'Test af downtime'" ftp But under the 'info' column, I only get the 1st word of the comment. -- Frédéric Mangeant Steria EDC Sophia-Antipolis
list Henrik Størner
▸
On Mon, Jun 26, 2006 at 04:51:33PM +0200, Henrik Stoerner wrote:
On Mon, Jun 26, 2006 at 04:33:17PM +0200, Frédéric Mangeant wrote:But adding this entry in bb-hosts : 10.50.8.55 fmangeant # "DOWNTIME=*:*:1000:1600:Test af downtime" telnet gives this under the 'info' column : Planned downtime:All days:*:1000:1600:Test It should have been "Test af downtime"...There's something screwy with the quoting in bb-hosts. Need to get that fixed.
Apparently it's only a display-thing. This patch should fix it.
Henrik
-------------- next part --------------
--- lib/timefunc.c 2006/05/03 21:12:33 1.29
+++ lib/timefunc.c 2006/06/26 15:09:54
@@ -11,7 +11,7 @@
/* */
/*----------------------------------------------------------------------------*/
-static char rcsid[] = "$Id: timefunc.c,v 1.29 2006/05/03 21:12:33 henrik Exp $";
+static char rcsid[] = "$Id: timefunc.c,v 1.30 2006/06/26 15:09:57 henrik Exp $";
#include <time.h>
#include <sys/time.h>
@@ -89,7 +89,6 @@
}
sCopy = strdup(spec);
- sCopy[strcspn(sCopy, " \t\r\n")] = '\0';
sItem = strtok(sCopy, ",");
while (sItem) {
char *oneday, *dtext;
list Frédéric Mangeant
Henrik Stoerner a écrit :
Apparently it's only a display-thing. This patch should fix it.
Thanks, the attached patch fixes it. -- Frédéric Mangeant Steria EDC Sophia-Antipolis