Xymon Mailing List Archive search

printer monitoring v. static bb-hosts

5 messages in this thread

list Chapman Flack · Fri, 01 Dec 2006 22:34:21 -0500 ·
Hi,

I started writing a server extension for CUPS monitoring
(not just testing that the CUPS /server/ is there, but
really monitoring the queue states). The script can easily
learn all of the existing queues and their states from the
CUPS server, and report status with $BB for each queue
using the queue name as hostname and a few different columns
(running, accepting, jobcount).

So, it feels kind of redundant to have to go and add all of
the queue names to bb-hosts (or have them all treated as ghosts
with no way to specify what page they appear on).

How difficult would it be to support a kind of place-holder entry
in bb-hosts, maybe as simple as a group-only tag with a title and
no explicit hosts beneath it:

  group-only running|accepting|jobcount Printers

and then some modified form of the 'status' command in bb:

  $BB $BBDISP "gstatus Printers laser1.running green $(date)"

I bet such a capability would be useful for monitoring a lot
of things besides printers.

Does it seem feasible?

Chapman Flack
list Rich Smrcina · Sat, 02 Dec 2006 08:26:08 -0600 ·
Since CUPS (as a print server) would run on one or multiple hosts, why not just one column, CUPS?  Then when the icon is clicked, the various queue statuses for that host listed on the page.
quoted from Chapman Flack

Chapman Flack wrote:
Hi,

I started writing a server extension for CUPS monitoring
(not just testing that the CUPS /server/ is there, but
really monitoring the queue states). The script can easily
learn all of the existing queues and their states from the
CUPS server, and report status with $BB for each queue
using the queue name as hostname and a few different columns
(running, accepting, jobcount).

So, it feels kind of redundant to have to go and add all of
the queue names to bb-hosts (or have them all treated as ghosts
with no way to specify what page they appear on).

How difficult would it be to support a kind of place-holder entry
in bb-hosts, maybe as simple as a group-only tag with a title and
no explicit hosts beneath it:

 group-only running|accepting|jobcount Printers

and then some modified form of the 'status' command in bb:

 $BB $BBDISP "gstatus Printers laser1.running green $(date)"

I bet such a capability would be useful for monitoring a lot
of things besides printers.

Does it seem feasible?

Chapman Flack

-- 

Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Chapman Flack · Sat, 02 Dec 2006 12:06:13 -0500 ·
quoted from Rich Smrcina
Rich Smrcina wrote:
Since CUPS (as a print server) would run on one or multiple hosts, why 
not just one column, CUPS?  Then when the icon is clicked, the various 
queue statuses for that host listed on the page.
So if I understand what you're suggesting, it's something like:

      CUPS hosts:
   host      conn     cups
 cupshost1    grn      yel
                        `-clik!-.
			         -> Queues on cupshost1
				    queue     run    acc   njob
				    laser1    grn    grn   grn
				    laser2    grn    grn   grn
				    laser3    grn    grn   yel
				    laser4    grn    grn   grn

I guess my question is more about how to produce the 'queues on
cupshost1' page. A quick'n'dirty way would be to just have the
icon on the 'cups hosts' page link directly to the CUPS server's
own printers/ url. That would basically work and provide the
information, but not in a condensed Hobbit-like form. Another way
would be to create the page tag and group tag in bb-hosts in the
usual way and redundantly declare all the queue names in it, which
is what I was looking for a way to avoid. I suppose another way
would be for the ext script to generate the corresponding html
itself as the message it sends with bb for cupshost1 ... but even
if that can work it sounds like a brittle approach with a lot of
duplicated effort.

Or did you have another approach in mind that I've overlooked?

Thanks,
-Chap
list Rich Smrcina · Sat, 02 Dec 2006 15:33:51 -0600 ·
If you're sending a status message to the Hobbit server, it might look something like this:

status cupshost1.cups yellow date time CUPS queues not OK<cr>
Queues on cupshost1<cr>
queue   run   acc   njob<cr>
------------------------<cr>
laser1  &green &green &green
laser2 ...

This status will then appear on cupshost1 as a yellow cups icon.  The information on the first line after the time appears in larger bolder type on the cups page.  The data after the first <cr> appears underneath, centered, in smaller type.  You may have to play with the formatting, but that's how I send the data to Hobbit from the clients that I've written.

Obviously, design it how you like, but this format is pretty typical of clients and contributed tests.  I like to try to design my test results to appeal to the larger audience, but still be functional for me.
quoted from Chapman Flack

Chapman Flack wrote:
Rich Smrcina wrote:
Since CUPS (as a print server) would run on one or multiple hosts, why not just one column, CUPS?  Then when the icon is clicked, the various queue statuses for that host listed on the page.
So if I understand what you're suggesting, it's something like:

     CUPS hosts:
  host      conn     cups
cupshost1    grn      yel
                       `-clik!-.
                     -> Queues on cupshost1
                    queue     run    acc   njob
                    laser1    grn    grn   grn
                    laser2    grn    grn   grn
                    laser3    grn    grn   yel
                    laser4    grn    grn   grn

I guess my question is more about how to produce the 'queues on
cupshost1' page. A quick'n'dirty way would be to just have the
icon on the 'cups hosts' page link directly to the CUPS server's
own printers/ url. That would basically work and provide the
information, but not in a condensed Hobbit-like form. Another way
would be to create the page tag and group tag in bb-hosts in the
usual way and redundantly declare all the queue names in it, which
is what I was looking for a way to avoid. I suppose another way
would be for the ext script to generate the corresponding html
itself as the message it sends with bb for cupshost1 ... but even
if that can work it sounds like a brittle approach with a lot of
duplicated effort.

Or did you have another approach in mind that I've overlooked?

Thanks,
-Chap

-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Rich Smrcina · Sat, 02 Dec 2006 15:50:11 -0600 ·
Oops... there should be a <cr> at the end of each detail line...
quoted from Rich Smrcina

Rich Smrcina wrote:
If you're sending a status message to the Hobbit server, it might look something like this:

status cupshost1.cups yellow date time CUPS queues not OK<cr>
Queues on cupshost1<cr>
queue   run   acc   njob<cr>
------------------------<cr>
laser1  &green &green &green
laser2 ...

This status will then appear on cupshost1 as a yellow cups icon.  The information on the first line after the time appears in larger bolder type on the cups page.  The data after the first <cr> appears underneath, centered, in smaller type.  You may have to play with the formatting, but that's how I send the data to Hobbit from the clients that I've written.

Obviously, design it how you like, but this format is pretty typical of clients and contributed tests.  I like to try to design my test results to appeal to the larger audience, but still be functional for me.

Chapman Flack wrote:
Rich Smrcina wrote:
Since CUPS (as a print server) would run on one or multiple hosts, why not just one column, CUPS?  Then when the icon is clicked, the various queue statuses for that host listed on the page.
So if I understand what you're suggesting, it's something like:

     CUPS hosts:
  host      conn     cups
cupshost1    grn      yel
                       `-clik!-.
                     -> Queues on cupshost1
                    queue     run    acc   njob
                    laser1    grn    grn   grn
                    laser2    grn    grn   grn
                    laser3    grn    grn   yel
                    laser4    grn    grn   grn

I guess my question is more about how to produce the 'queues on
cupshost1' page. A quick'n'dirty way would be to just have the
icon on the 'cups hosts' page link directly to the CUPS server's
own printers/ url. That would basically work and provide the
information, but not in a condensed Hobbit-like form. Another way
would be to create the page tag and group tag in bb-hosts in the
usual way and redundantly declare all the queue names in it, which
is what I was looking for a way to avoid. I suppose another way
would be for the ext script to generate the corresponding html
itself as the message it sends with bb for cupshost1 ... but even
if that can work it sounds like a brittle approach with a lot of
duplicated effort.

Or did you have another approach in mind that I've overlooked?

Thanks,
-Chap

-- 
Rich Smrcina
VM Assist, Inc.
Phone: XXX-XXX-XXXX
Ans Service:  XXX-XXX-XXXX
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007