Xymon Mailing List Archive search

BB-Hosts DOWNTIME

17 messages in this thread

list Michael S. Fisher · Tue, 28 Apr 2009 09:06:18 -0700 ·
Hi all!

I am still to this day having issues getting the DOWNTIME parameters to
work. I have tried everything under the sun but ultimetely i have fallen
back to what is written in the BB-Hosts Man page..

DOWNTIME=*:0000:0200,*:0230:2359

This basically says that the host is DOWN between 2AM and
2:30AM......Correct?

Kind of an @ssbackwards way of looking at it but from what i can gather,
you just specify the time the server should be UP...right?

Its not working...i still get alerts and the page still stays red..not blue
as expected...

I have also tried

DOWNTIME=*:0200:0230

but as expected...that fails as well..

Anybody have any insight into this...im sure im missing something stupid...

THANKS!
list Jeremy Ruffer · Tue, 28 Apr 2009 17:22:54 +0100 ·
I use DOWNTIME=*:0045:0630 REPORTTIME=*:0000:0045,*:0630:2359

 
HTH

Jeremy

 
This message, and any associated files, are intended only for the use of the message recipient and may contain information that is confidential, subject to copyright or constitute a trade secret. If you are not the message recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to the message and then deleting it from your computer. HSS Hire Service Group Limited may monitor email traffic data and also the content of email for the purposes of security and staff training. Any views or opinions presented are solely those of user-020a2aa3cf14@xymon.invalid and do not necessarily represent those of the company.
 
HSS Hire Service Group is a limited company registered in England and Wales. Registered number: 644490.
Registered office: 25 Willow Lane, Mitcham, Surrey, CR4 4TS, United Kingdom.
quoted from Michael S. Fisher
 

From: user-ab09d151b26b@xymon.invalid [mailto:user-ab09d151b26b@xymon.invalid] 
Sent: 28 April 2009 17:06
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] BB-Hosts DOWNTIME

 
Hi all!

I am still to this day having issues getting the DOWNTIME parameters to
work. I have tried everything under the sun but ultimetely i have fallen
back to what is written in the BB-Hosts Man page..

DOWNTIME=*:0000:0200,*:0230:2359

This basically says that the host is DOWN between 2AM and
2:30AM......Correct?

Kind of an @ssbackwards way of looking at it but from what i can gather,
you just specify the time the server should be UP...right?

Its not working...i still get alerts and the page still stays red..not
blue as expected...

I have also tried 

DOWNTIME=*:0200:0230 

but as expected...that fails as well..

Anybody have any insight into this...im sure im missing something
stupid...

THANKS!
list Josh Luthman · Tue, 28 Apr 2009 12:26:09 -0400 ·
This statement says we expect downtime between midnight and 11:59PM Sunday
(0th day of the week), then specifies the weekdays between 6:30PM and 7:30AM
(the following day) and gets as specific as Saturday (6th day of the week)
between 8:30AM and 11:59PM.

DOWNTIME=0:0000:2359,W:1830:0730,6:0830:2359

Confirmed working with 4.2.0 - no patches or updates

I think you want

DOWNTIME=*:0200:0230 - specifying all days of the week, between 2AM and
2:30AM we expect downtime.  Maybe you don't want an asterisk?

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer
quoted from Jeremy Ruffer


On Tue, Apr 28, 2009 at 12:06 PM, <user-ab09d151b26b@xymon.invalid> wrote:
 Hi all!

I am still to this day having issues getting the DOWNTIME parameters to
work. I have tried everything under the sun but ultimetely i have fallen
back to what is written in the BB-Hosts Man page..

DOWNTIME=*:0000:0200,*:0230:2359

This basically says that the host is DOWN between 2AM and
2:30AM......Correct?

Kind of an @ssbackwards way of looking at it but from what i can gather,
you just specify the time the server should be UP...right?

Its not working...i still get alerts and the page still stays red..not blue
as expected...

I have also tried

DOWNTIME=*:0200:0230

but as expected...that fails as well..

Anybody have any insight into this...im sure im missing something stupid...

THANKS!
list Bill Hart · Tue, 28 Apr 2009 11:27:44 -0500 ·
Return Receipt
                                                                              Your       RE: [hobbit] BB-Hosts DOWNTIME                                  document:                                                                                                                                             was        user-079de6b18352@xymon.invalid                                               received                                                                   by:                                                                                                                                                   at:        04/28/2009 11:29:19 AM                                                                                                                  


Notice:
This communication is an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. � 2510.  Its disclosure is strictly limited to the recipient(s) intended by the sender of this message.  This transmission and any attachments may contain proprietary, confidential, attorney-client privileged information and/or attorney work product. If you are not the intended recipient, any disclosure, copying, distribution, reliance on, or use of any of the information contained herein is STRICTLY PROHIBITED.  Please destroy the original transmission and its attachments without reading or saving in any matter and confirm by return email.
list Michael S. Fisher · Tue, 28 Apr 2009 09:29:22 -0700 ·
I have tried using the paramter:


DOWNTIME=*:0200:0230


But this still generates alerts between that time interval...the page also
stays red...
list Michael S. Fisher · Tue, 28 Apr 2009 09:34:14 -0700 ·
Josh,

In reponse to your post, I have tried specifying the time to be DOWN in the
DOWNTIME synatx but that man page says just the opposite:

"E.g. to monitor a site 24x7, except between noon and 1 pm, use
DOWNTIME=*:0000:1159,*:1300:2359"

This statement puts in the time the system should be UP not DOWN...

????
list Josh Luthman · Tue, 28 Apr 2009 12:53:51 -0400 ·
The statement I declared works beyond the shadow of a doubt - so I'm pretty
sure we want to specify down, not up.  What version of Hobbitmon/Xymon are
you running?
signature

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


quoted from Michael S. Fisher
On Tue, Apr 28, 2009 at 12:34 PM, <user-ab09d151b26b@xymon.invalid> wrote:
 Josh,

In reponse to your post, I have tried specifying the time to be DOWN in the
DOWNTIME synatx but that man page says just the opposite:

"E.g. to monitor a site 24x7, except between noon and 1 pm, use
DOWNTIME=*:0000:1159,*:1300:2359"

This statement puts in the time the system should be UP not DOWN...

????
list Patrick Nixon · Tue, 28 Apr 2009 12:58:26 -0400 ·
Not sure if this helps, but this is my line to ignore the service
"cam" being red between 7:30pm to 8:30a and All Day Saturday and
Sunday.

DOWNTIME=cam:60:0000:2400:Offline2,cam:W:1930:0830:Offline
quoted from Josh Luthman

On Tue, Apr 28, 2009 at 12:34 PM,  <user-ab09d151b26b@xymon.invalid> wrote:
Josh,

In reponse to your post, I have tried specifying the time to be DOWN in the
DOWNTIME synatx but that man page says just the opposite:

"E.g. to monitor a site 24x7, except between noon and 1 pm, use
DOWNTIME=*:0000:1159,*:1300:2359"

This statement puts in the time the system should be UP not DOWN...

????
list Michael S. Fisher · Tue, 28 Apr 2009 10:01:53 -0700 ·
Josh,

That is bizarre...let me try again right now..i will specify the following
in my bb-hosts and allow up to 5 min for it to take and then test it out

DOWNTIME=*:1000:11:00

Should be down between 10AM and 11AM

....

Lemme try again
list Malcolm Hunter · Tue, 28 Apr 2009 19:03:59 +0200 ·
quoted from Patrick Nixon
In reponse to your post, I have tried specifying the time to be DOWN in
the
DOWNTIME synatx but that man page says just the opposite:

"E.g. to monitor a site 24x7, except between noon and 1 pm, use
DOWNTIME=*:0000:1159,*:1300:2359"

This statement puts in the time the system should be UP not DOWN...
Silly question, I assume but you are putting DOWNTIME on the host line?

e.g.

10.0.0.2  hostname # conn DOWNTIME=*:0200:0229

For my setup I only want working hours:

10.0.0.2 hostname # conn DOWNTIME=60:*:*,W:1800:0759

This excludes weekends and evenings (and works perfectly).

Regards,
Malcolm


-- 
Technical copy-editor & proofreader

KDE Proofreading Team
KDE British English Translation Team

http://l10n.kde.org/team-infos.php?teamcode=en_GB

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
list Michael S. Fisher · Tue, 28 Apr 2009 10:05:37 -0700 ·
I have just changed my BB-HOsts to reflect the following....I have a
suspision that my issue was with letting bb-hosts get regnerated before i
come to a conclusion of it not working..

BB-HOSTS entry =   DOWNTIME=*:1000:1100

The information page shows the following

Planned downtime:All days:1000:1100

---

I will give it another few min and try my test.
list Michael S. Fisher · Tue, 28 Apr 2009 10:12:19 -0700 ·
RESOLVED!

I do appologize for the non-sense but all of your configs are CORRECT. The
MAN PAGE for bb-hosts does NOT reflect the correct syntax...

My issue WAS in fact with letting the bb-hosts file get re-generated before
coming to a conclusion.

I have setup the BB-HOSTS with "DOWNTIME=*:1000:1100  and allowed up to 5
min to be re-generated. I then started the telnet service (should be down)
and restarted the bbwin client and viola...page went blue with "Planned
Downtime"

All is well and i appreciate all of your responses!!!

Much Thanks!
list Josh Luthman · Tue, 28 Apr 2009 13:14:35 -0400 ·
Seeing Patrick's statement reminded me that there was an issue with the
colon separator.  Can't recall what the resolution was, if any.
signature

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


quoted from Michael S. Fisher
On Tue, Apr 28, 2009 at 1:01 PM, <user-ab09d151b26b@xymon.invalid> wrote:
 Josh,

That is bizarre...let me try again right now..i will specify the following
in my bb-hosts and allow up to 5 min for it to take and then test it out

DOWNTIME=*:1000:11:00

Should be down between 10AM and 11AM

....

Lemme try again
list Josh Luthman · Tue, 28 Apr 2009 13:20:16 -0400 ·
 DOWNTIME=60:*:*,W:1800:0759

60 declaring Saturday and Sunday (last, first days of the week)
separator
all time
separator
all time
signature

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


quoted from Malcolm Hunter
On Tue, Apr 28, 2009 at 1:03 PM, Malcolm Hunter <user-b3e590ffeb6d@xymon.invalid>wrote:
In reponse to your post, I have tried specifying the time to be DOWN in
the
DOWNTIME synatx but that man page says just the opposite:

"E.g. to monitor a site 24x7, except between noon and 1 pm, use
DOWNTIME=*:0000:1159,*:1300:2359"

This statement puts in the time the system should be UP not DOWN...
Silly question, I assume but you are putting DOWNTIME on the host line?

e.g.

10.0.0.2  hostname # conn DOWNTIME=*:0200:0229

For my setup I only want working hours:

10.0.0.2 hostname # conn DOWNTIME=60:*:*,W:1800:0759

This excludes weekends and evenings (and works perfectly).

Regards,
Malcolm


--
Technical copy-editor & proofreader

KDE Proofreading Team
KDE British English Translation Team

http://l10n.kde.org/team-infos.php?teamcode=en_GB

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
http://www.gmx.net/de/go/multimessenger01

list Rob McBroom · Tue, 28 Apr 2009 15:16:33 -0400 ·
quoted from Michael S. Fisher
On 2009-Apr-28, at 1:05 PM, user-ab09d151b26b@xymon.invalid wrote:
I have just changed my BB-HOsts to reflect the following....I have a  suspision that my issue was with letting bb-hosts get regnerated  before i come to a conclusion of it not working..

BB-HOSTS entry = DOWNTIME=*:1000:1100

The information page shows the following

Planned downtime:All days:1000:1100
In my experience, the syntax that makes the information page look  correct is not the syntax that will actually work. I'm guessing the  code that parses the DOWNTIME option was duplicated in two places and  those two places are now out of sync.

-- 
Rob McBroom
<http://www.skurfer.com/>;
list Patrick Nixon · Wed, 29 Apr 2009 08:16:44 -0400 ·
I'd have to agree to that.

On my info page for the previously provided downtime, I have:

Planned Downtime: cam:60:0000:2400:Offline2, cam:W:1930:0830:Offline

Doesn't seem to be parsing it properly, but it does work appropriately.
quoted from Rob McBroom

On Tue, Apr 28, 2009 at 3:16 PM, Rob McBroom <user-371ba9bb5b75@xymon.invalid> wrote:
On 2009-Apr-28, at 1:05 PM, user-ab09d151b26b@xymon.invalid wrote:
I have just changed my BB-HOsts to reflect the following....I have a
suspision that my issue was with letting bb-hosts get regnerated before i
come to a conclusion of it not working..

BB-HOSTS entry = DOWNTIME=*:1000:1100

The information page shows the following

Planned downtime:All days:1000:1100
In my experience, the syntax that makes the information page look correct is
not the syntax that will actually work. I'm guessing the code that parses
the DOWNTIME option was duplicated in two places and those two places are
now out of sync.

--
Rob McBroom
<http://www.skurfer.com/>;

list Dominique Frise · Wed, 29 Apr 2009 15:37:23 +0200 ·
quoted from Patrick Nixon
Patrick Nixon wrote:
I'd have to agree to that.

On my info page for the previously provided downtime, I have:

Planned Downtime: cam:60:0000:2400:Offline2, cam:W:1930:0830:Offline

Doesn't seem to be parsing it properly, but it does work appropriately.

On Tue, Apr 28, 2009 at 3:16 PM, Rob McBroom <user-371ba9bb5b75@xymon.invalid> wrote:
On 2009-Apr-28, at 1:05 PM, user-ab09d151b26b@xymon.invalid wrote:
I have just changed my BB-HOsts to reflect the following....I have a
suspision that my issue was with letting bb-hosts get regnerated before i
come to a conclusion of it not working..

BB-HOSTS entry = DOWNTIME=*:1000:1100

The information page shows the following

Planned downtime:All days:1000:1100
In my experience, the syntax that makes the information page look correct is
not the syntax that will actually work. I'm guessing the code that parses
the DOWNTIME option was duplicated in two places and those two places are
now out of sync.

--
Rob McBroom
<http://www.skurfer.com/>;

Yes, I also do agree with this!
BTW, this was already spotted in
http://www.hswn.dk/hobbiton/2008/05/msg00042.html


After digging into the code, I found 2 issues around the DOWNTIME behaviour.

1. Internal handling of DOWNTIME values do not reflect the specification 
of the  bb-hosts(5) man page.

The man page says: 
DOWNTIME=[columns:]day:starttime:endtime:cause[,day:starttime:endtime:cause]

But the check_downtime function code in lib/timefunc.c says:
---- extract of ./lib/timefunc.c ----
...
    303                  do {
    304                          /* Its either DAYS:START:END or 
SERVICE:DAYS:START:END:CAUSE */
    305
    306                          s1 = p; p += strcspn(p, ":"); if (*p != 
'\0') { *p = '\0'; p++; }
    307                          s2 = p; p += strcspn(p, ":"); if (*p != 
'\0') { *p = '\0'; p++; }
...

According to this, the man page should say:
DOWNTIME=day:starttime:endtime:[,day:starttime:endtime]
	OR
DOWNTIME=columns:day:starttime:endtime:cause[,columns,day:starttime:endtime:cause]

2. The "Planned Downtime" line displayed in info column do not honor the 
optional "columns" tag at all. The generate_info function in 
./web/hobbitsvc-info.c calls the timespec_text function that handles 
day:starttime:endtime values only. (like REPORTTIME).

------------- extract of /web/hobbitsvc-info.c---------
    871          val = bbh_item(hostwalk, BBH_DOWNTIME);
    872          if (val) {
    873                  char *s = timespec_text(val);
    874                  addtobuffer(infobuf, "<tr><th 
align=left>Planned downtime:</th><td align=left>");
    875                  addtobuffer(infobuf, s);
    876                  addtobuffer(infobuf, "</td></tr>\n");
    877          }

There is no quick hacks to solve both problems :-(
I think only the boss -Henrik- can make the appropriate redesign/changes.

Dominique