hmm, strange, it should be the last line in print_warn. Is there some problem with the patch perhaps?
On 4/3/07, Andrew Beekhof <[EMAIL PROTECTED]> wrote:
On 4/3/07, Christofer Edvardsen <[EMAIL PROTECTED]> wrote: > The variable warning is changed in print_warn to allow for a proper exit > value. It is also used to make sure the warning header gets printed only > once. i figured as much... but you dont actually change the value anywhere that i can see. > Help with adapting the patch to the current code style or making what > it does more obvious is greatly appreciated. > > The need for this one line status output comes from a problem we had > earlier. On one of the hosts in our ha cluster heartbeat had failed to > start. This was not caught by the monitoring software because the services > had been taken over by other nodes in the system and the host was otherwise > fine. The intention with the one line status output is therefore to alert > with a critical condition whenever the checked host is not taking part of > the cluster and needs the immediate attention of the administrator. All > other non-normal conditions of the cluster would produce warnings (this is > the idea but not yet reflected in the code). Failure in individual services > produces only warnings because problems with them, and judgments of the > severity, are better handled by a direct monitoring of that specific > service. > > Sample output for normal condition: > Ok: 3 nodes online, 5 resources configured > > When heartbeat is not running on one host, this is the output of the check > on that host: > Critical: Unable to connect to the CIB > > The other hosts would show: > Warning: offline node: node2.example.com > > If more problems occur the output line would build on like this: > Warning: offline node: node2.example.com, offline node: node3.example.com > > The return values for crm_mon are: > 0 OK > 1 Warning > 2 Critical > > > > On 3/30/07, Andrew Beekhof <[EMAIL PROTECTED]> wrote: > > On 3/29/07, Christofer Edvardsen <[EMAIL PROTECTED]> wrote: > > > Hi! > > > I have added two new views to crm_mon that I thought I should share... > > > > > > The first is a mode that outputs html in cgi mode (instead of to a > file). > > > The second is a one line status output intended for scripting or nagios > and > > > other monitoring software. > > > > > > I had a look at the contribute howto but couldn't find info on how to > get > > > something like this accepted for the main distribution. How does that > > > normally work? > > > > you do what you just did :-) > > > > one question... > > you have some logic that uses "warning", but as far as I can see its a > > constant: > > gboolean warning = FALSE; > > > > what are you trying to do there? > > oh, and any chance you could include some sample output? > > > > > > > > Regards > > > > > > _______________________________________________________ > > > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > > > Home Page: http://linux-ha.org/ > > > > > > > > > > > _______________________________________________________ > > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > > Home Page: http://linux-ha.org/ > > > > > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > > _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/