Xymon Mailing List Archive search

non-green view

7 messages in this thread

list James Wade · Thu, 25 Jan 2007 14:58:39 -0600 ·
Is there anyway to have the non-green view also show

systems disabled? ie.blue items.

 
Thanks.James
list Johann Eggers · Thu, 25 Jan 2007 22:06:48 +0100 ·
quoted from James Wade
-----Original Message-----
From: James Wade [mailto:user-659655b2ea05@xymon.invalid]
Sent: Thu 1/25/2007 9:58 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] non-green view
 
Is there anyway to have the non-green view also show

systems disabled? ie.blue items.

On my systems they show on the non-green-view as well... 

Johann
list Henrik Størner · Thu, 25 Jan 2007 22:09:50 +0100 ·
quoted from James Wade
On Thu, Jan 25, 2007 at 02:58:39PM -0600, James Wade wrote:
Is there anyway to have the non-green view also show
systems disabled? ie.blue items.
Run bbgen with the "--bb2colors=red,yellow,purple,blue" option.


Henrik
list Eric van de Meerakker · Fri, 26 Jan 2007 10:18:46 +0100 ·
Hi Henrik,


Can I enter a feature request on that one? I've always used a BB
extension script (show-blue.sh) to display disabled items on the bb2
page, and i've just tested the "--bb2-colors" option as you showed
below. The big difference is that --bb2-colors will show the background
as blue when there is a disabled test and everything else is green,
while show-blue.sh won't affect the background color. Perhaps a
'--nopropblue' option could be created that does the same thing?


Thanks,

Eric.
quoted from Henrik Størner

Henrik Stoerner wrote:
On Thu, Jan 25, 2007 at 02:58:39PM -0600, James Wade wrote:
Is there anyway to have the non-green view also show
systems disabled? ie.blue items.
Run bbgen with the "--bb2colors=red,yellow,purple,blue" option.


Henrik

list John Tullis · Wed, 2 May 2018 19:14:30 +0000 ·
I'm looking for an easy way to list each non-green item and amount of time it has been that color. We have 50 different users and are looking for an easier way to track what servers need attention. The non-green view is massive for us and hovering over each icon to see the time it has been that color is a little tedious.

If there isn't a view I can run, is there a command I can run to query the status and time of a non-green so I can display it in a separate page?

Ideally it would look something like this:
ServerA    |      disk    |      red      |   43 days
ServerB    | memory |   yellow   |   10 days

Currently we're parsing the history log and displaying based on that but it leaves a lot to be desired.
list Ralph Mitchell · Wed, 2 May 2018 22:31:45 -0400 ·
Sounds like you're asking about xymondboard:

        xymon  localhost  "xymondboard  color=red,yellow,purple
fields=hostname,testname,color,lastchange"

There are notes on how to use it in the man page for the xymon command:

       https://www.xymon.com/help/manpages/man1/xymon.1.html

The lastchange value is seconds since the epoch.

Ralph Mitchell
quoted from John Tullis


On Wed, May 2, 2018 at 3:14 PM, John Tullis <user-a6bbfd057f07@xymon.invalid> wrote:
I'm looking for an easy way to list each non-green item and amount of time
it has been that color. We have 50 different users and are looking for an
easier way to track what servers need attention. The non-green view is
massive for us and hovering over each icon to see the time it has been that
color is a little tedious.

If there isn't a view I can run, is there a command I can run to query the
status and time of a non-green so I can display it in a separate page?

Ideally it would look something like this:
ServerA    |      disk    |      red      |   43 days
ServerB    | memory |   yellow   |   10 days

Currently we're parsing the history log and displaying based on that but
it leaves a lot to be desired.

list Paul Root · Thu, 3 May 2018 14:49:35 +0000 ·
#!/usr/bin/perl
#

# command line options
use Getopt::Std;

# long listing
# Not including - case insensitive
# Including - case insensitive
getopts ("lv:i:");

#   Need Hostname and port
$XC = "/etc/sysconfig/xymon-client";

if ($ARGV[0]) {
        $H = $ARGV[0];
} else {
        `grep ^XYMONSERVERS $XC` =~ /.*=\"(.*)\"/;
        ($H, @junk) = split (/ /, $1);
}
$P=($ARGV[1] ? $ARGV[1] : 1984);

# Fields wanted for output
$F = "hostname,testname,lastchange";
$F .= ',line1' if ($opt_l);

# extraneous text to remove
@p = ("Disabled by: ",
          "Reason: ",
          "<!-- \[.*\] -->",
          "<IMG SRC=\"\/.*\/gifs\/.+.gif\" ALT=\".+\" HEIGHT=\"16\" WIDTH=\"16\" BORDER=0>",
          "<table border=1>",
);

for $c qw(red yellow purple blue) {
        print "$c:\n";
        $F .= ',diabletime,dismsg' if ($c eq 'blue');   # blue output wants the disable message
        @o = `~xymon/client/bin/xymon $H:$P "xymondboard color=$c fields=$F"`;
        for $l (@o) {
                next if ($opt_v && grep (/$opt_v/i, $l));
                next if ($opt_i && !grep (/$opt_i/i, $l));
                chop $l;
                $l =~ s/\\n/\t/g;
                for $p (@p) {
                        $l =~ s/$p//g;
                }
                @l = split (/\|/, $l);
                $i=0;
                while ($f = shift (@l)) {
                        if ($i == 2) {
                                $t = time;
                                $t -= $f;
                                $t = $t / 60;
                                if ($t > 60) {
                                        $t = $t / 60;
                                        if ($t > 24) {
                                                $t = $t / 24;
                                                $s = sprintf ("%3d %s", $t, ($t < 2 ? 'day' : 'days'));
                                        } else {
                                                $s = sprintf ("%3d %s", $t, ($t < 2 ? 'hour' : 'hours'));
                                        }
                                } else {
                                        $s = sprintf ("%3d min", $t);
                                }
                                print $s, (length ($s) < 8 ? "\t\t" : "\t");
                        } else {
                                print $f, (length ($f) < 8 ? "\t\t" : "\t");
                        }
                        $i++;
                }
                print "\n";
        }
        print "\n";
quoted from Ralph Mitchell
}

From: Xymon <xymon-bounces at xymon.com> On Behalf Of Ralph Mitchell
Sent: Wednesday, May 02, 2018 9:32 PM
To: John Tullis <user-a6bbfd057f07@xymon.invalid>
Cc: xymon at xymon.com
Subject: Re: [Xymon] Non-Green View

Sounds like you're asking about xymondboard:

        xymon  localhost  "xymondboard  color=red,yellow,purple  fields=hostname,testname,color,lastchange"

There are notes on how to use it in the man page for the xymon command:

       https://www.xymon.com/help/manpages/man1/xymon.1.html

The lastchange value is seconds since the epoch.

Ralph Mitchell


On Wed, May 2, 2018 at 3:14 PM, John Tullis <user-a6bbfd057f07@xymon.invalid<mailto:user-a6bbfd057f07@xymon.invalid>> wrote:
I'm looking for an easy way to list each non-green item and amount of time it has been that color. We have 50 different users and are looking for an easier way to track what servers need attention. The non-green view is massive for us and hovering over each icon to see the time it has been that color is a little tedious.

If there isn't a view I can run, is there a command I can run to query the status and time of a non-green so I can display it in a separate page?

Ideally it would look something like this:
ServerA    |      disk    |      red      |   43 days
ServerB    | memory |   yellow   |   10 days

Currently we're parsing the history log and displaying based on that but it leaves a lot to be desired.


This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.