table of contents
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- GENERAL OPTIONS
- PAGE LAYOUT OPTIONS
- COLUMN SELECTION OPTIONS
- STATUS PROPAGATION OPTIONS
- PURPLE STATUS OPTIONS
- ALTERNATE PAGESET OPTIONS
- ALTERNATE OUTPUT FORMATS
- OPTIONS USED BY CGI FRONT-ENDS
- DEBUGGING OPTIONS
- BUILDING ALTERNATE PAGESETS
- USING BBGEN FOR REPORTS
- SLA REPORTING
- PRE-GENERATED REPORTS
- SEE ALSO
other versions
- wheezy 4.3.0~beta2.dfsg-9.1
BBGEN(1) | General Commands Manual | BBGEN(1) |
NAME¶
bbgen - Xymon webpage generatorSYNOPSIS¶
bbgen -?DESCRIPTION¶
bbgen generates the overview webpages for the Xymon monitor. These are the webpages that show the overall status of your hosts, not the detailed status pages for each test.OPTIONS¶
bbgen has a large number of commandline options. The options can be used to change the behaviour of bbgen and affect the web pages generated by it.GENERAL OPTIONS¶
- --help or -?
- Provide a summary of available commandline options.
- --version
- Prints the version number of bbgen
- --docurl=URL
- Make hostnames be hyperlinks to documentation, accessed via
a common web page (typically a CGI script or a PHP-driven dynamic page).
The URL parameter is a formatting string with the name of the web page -
you can put a "%s" in it which will be replaced by the hostname
being accessed. E.g. if you use the bb-notes extension from
www.deadcat.net, you would enable this with
"--docurl=/xymon/admin/notes.php?host=%s". For the host
www.storner.dk this will result in a link to
"/xymon/admin/notes.php?host=www.storner.dk".
- --doccgi=URL
- This option is deprecated; please use --docurl instead.
- --no-doc-window
- By default, links to documentation for hosts and services
cause a new window to appear with the information. With this option, the
documentation will appear in the same window as the Xymon status.
- --htmlextension=.EXTENSION
- Sets the filename extension used for the webpages generated
by bbgen. By default, an extension of ".html" is used. Note that
you need to specify the "dot".
- --report[=COLUMNNAME]
- With this option, bbgen will send a status message with
details of how many hosts were processed, how many pages were generated,
any errors that occurred during the run, and some timing statistics. The
default columnname is "bbgen".
- --htaccess[=htaccess-filename]
- Create .htaccess files when new web page directories are
created. The content of the .htaccess files are determined by the
BBHTACCESS environment variable (for the top-level directory with bb.html
and bb2.html); by the BBPAGEHTACCESS variable (for the page-level
directories); and by the BBSUBPAGEHTACCESS variable for subpage- and
subparent-level directories. The filename of the .htaccess files default
to ".htaccess" if no filename is given with this option. The
BBHTACCESS variable is copied verbatim into the top-level .htaccess file.
The BBPAGEHTACCESS variable may contain a "%s" where the name of
the page is inserted. The BBSUBPAGEHTACCESS variable may contain two
"%s" instances: The first is replaced with the pagename, the
second with the subpagename.
- --max-eventcount=N
- Limit the eventlog on the BB2 page to only N events.
Default: 100.
- --max-eventtime=N
- Limit the eventlog on the BB2 page to events that happened
within the past N minutes. Default: 240.
- --no-eventlog
- Disable the eventlog normally displayed on the BB2 page
- --max-ackcount=N
- Limit the acknowledgment log on the BB2 page to only N
events. Default: 25.
- --max-acktime=N
- Limit the acknowledgment log on the BB2 page to acks that
happened within the past N minutes. Default: 240.
- --no-acklog
- Disable the acknowledgement log normally displayed on the
BB2 page.
- --nklog[=NK log column]
- This generates a text-based log of what is shown on the
bbnk.html status page, and sends a status message for the BBDISPLAY server
itself reflecting the color of the NK status page. This allows you to
track when problems have appeared on the bbnk status page. The logfile is
stored in $BBHOME/nkstatus.log
PAGE LAYOUT OPTIONS¶
These options affect how the webpages generated by bbgen appear in the browser.- --pages-last
- Put page- and subpage-links after hosts.
- --pages-first
- Put page- and subpage-links before hosts (default).
- --subpagecolumns=N
- Determines the number of columns used for links to pages
and subpages. The default is N=1.
- --maxrows=N
- Column headings on a page are by default only shown at the
beginning of a page, subpage or group of hosts. This options causes the
column headings to repeat for every N hosts shown.
- --pagetitle-links
- Normally, only the colored "dots" next to a page
or subpage act as links to the page itself. With this option, the page
title will link to the page also.
- --pagetext-headings
- Use the description text from the "page" or
"subpage" tags as a heading for the page, instead of the
"Pages hosted locally" or other standard heading.
- --no-underline-headings
- Normally, page headings are underlined using an HTML
"horizontal ruler" tag. This option disables the underlining of
headings.
- --recentgifs[=MINUTES]
- Use images named COLOR-recent.gif for tests, where the test
status has changed within the past 24 hours. These GIF files need to be
installed in the $BBHOME/www/gifs/ directory. By default, the threshold is
set to 24 hours - if you want it differently, you can specify the time
limit also. E.g. "--recentgifs=3h" will show the recent GIFs for
only 3 hours after a status change.
- --sort-group-only-items
- In a normal "group-only" directive, you can
specify the order in which the tests are displayed, from left to right. If
you prefer to have the tests listed in alphabetical order, use this option
- the page will then generate "group-only" groups like it
generates normal groups, and sort the tests alphabetically.
- --dialupskin=URL
- If you want to visually show that a test is a dialup-test,
you can use an alternate set of icons for the green/red/yellow>/etc.
images by specifying this option. The URL parameter specified here
overrides the normal setting from the BBSKIN environment variable, but
only for dialup tests.
- --reverseskin=URL
- Same as "--dialupskin", but for reverse tests
(tests with '!' in front).
- --tooltips=[always,never,main]
- Determines which pages use tooltips to show the description
of the host (from the COMMENT entry in the bb-hosts(5) file). If
set to always, tooltips are used on all pages. If set to
never, tooltips are never used. If set to main, tooltips are
used on the main pages, but not on the BB2 (all non-green) or NK (critical
systems) pages.
COLUMN SELECTION OPTIONS¶
These options affect which columns (tests) are included in the webpages generated by bbgen.- --ignorecolumns=test[,test]
- The given columns will be completely ignored by bbgen when
generating webpages. Can be used to generate reports where you eliminate
some of the more noisy tests, like "msgs".
- --nk-reds-only
- Only red status columns will be included on the NK page. By
default, the NK page will contain hosts with red, yellow and clear status.
- --bb2-colors=COLOR[,COLOR]
- Defines which colors cause a test to appear on the
"All non-green" status page (a.k.a. the BB2 page). COLOR is red,
yellow or purple. The default is to include all three.
- --bb2-ignorecolumns=test[,test]
- Same as the --ignorecolumns, but applies to hosts on the
BB2 page only.
- --bb2-ignorepurples
- Deprecated, use "--bb2colors" instead.
- --bb2-ignoredialups
- Ignore all dialup hosts on the BB2 page, including the BB2
eventlog.
- --includecolumns=test[,test]
- Always include these columns on bb2 page Will include
certain columns on the bb2.html page, regardless of its color. Normally,
bb2.html drops a test-column, if all tests are green. This can be used
e.g. to always have a link to the trends column (with the RRD graphs) from
your bb2.html page.
- --eventignore=test[,test]
- Ignore these tests in the BB2 event log display.
STATUS PROPAGATION OPTIONS¶
These options suppress the normal propagation of a status upwards in the page hierarchy. Thus, you can have a test with status yellow or red, but still have the entire page green. It is useful for tests that need not cause an alarm, but where you still want to know the actual status. These options set global defaults for all hosts; you can use the NOPROPRED and NOPROPYELLOW tags in the bb-hosts(5) file to apply similar limits on a per-host basis.- --nopropyellow=test[,test] or --noprop=test[,test]
- Disable upwards status propagation when YELLOW. The
"--noprop" option is deprecated and should not be used.
- --noproppurple=test[,test]
- Disable upwards status propagation when PURPLE.
- --nopropred=test[,test]
- Disable upwards status propagation when RED or YELLOW.
- --nopropack=test[,test]
- Disable upwards status propagation when status has been
acknowledged. If you want to disable all acked tests from being
propageted, use "--nopropack=*".
PURPLE STATUS OPTIONS¶
Purple statuses occur when reporting of a test status stops. A test status is valid for a limited amount of time - normally 30 minutes - and after this time, the test becomes purple.- --purplelog=FILENAME
- Generate a logfile of all purple status messages.
ALTERNATE PAGESET OPTIONS¶
- --pageset=PAGESETNAME
- Build webpages for an alternate pageset than the default.
See the PAGESETS section below.
- --template=TEMPLATE
- Use an alternate template for header and footer files.
Typically used together the the "--pageset" option; see the
PAGESETS section below.
ALTERNATE OUTPUT FORMATS¶
- --wml[=test1,test2,...]
- This option causes bbgen to generate a set of WML
"card" files that can be accessed by a WAP device (cell phone,
PDA etc.) The generated files contain the hosts that have a RED or YELLOW
status on tests specified. This option can define the default tests to
include - the defaults can be overridden or amended using the
"WML:" or "NK:" tags in the bb-hosts(5) file.
If no tests are specified, all tests will be included.
- --nstab=FILENAME
- Generate an HTML file suitable for a Netscape 6/Mozilla
sidebar entry. To actually enable your users to obtain such a sidebar
entry, you need this Javascript code in a webpage (e.g. you can include it
in the $BBHOME/web/bb_header file):
if ((typeof window.sidebar == "object") &&
(typeof window.sidebar.addPanel == "function"))
window.sidebar.addPanel ("Xymon",
"http://your.server.com/nstab.html","");
else
alert("Sidebar only for Mozilla or Netscape 6+");
<A HREF="javascript:addNetscapePanel();">Add to Sidebar</A>
<A HREF="javascript:addNetscapePanel();">
<IMG SRC="/gifs/add-button.gif" HEIGHT=45 WIDTH=100
ALT="[Add Sidebar]" STYLE="border:0">
</A>
- --nslimit=COLOR
- The minimum color to include in the Netscape Sidebar -
default is "red", meaning only critical alerts are included. If
you want to include warnings also, use "--nslimit=yellow".
- --rss
- Generate RSS/RDF content delivery stream of your Xymon
alerts. This output format can be dynamically embedded in other web pages,
much like the live newsfeeds often seen on web sites. Two RSS files will
be generated, one reflects the BB2 page, the other reflects the BBNK page.
They will be in the "bb2.rss" and "bbnk.rss" files,
respectively. In addition, an RSS file will be generated for each page
and/or subpage listing the hosts present on that page or subpage.
- --rssextension=.EXTENSION
- Sets the filename extension used for the RSS files
generated by bbgen. By default, an extension of ".rss" is used.
Note that you need to specify the "dot".
- --rssversion={0.91|0.92|1.0|2.0}
- The desired output format of the RSS/RDF feed. Version 0.91
appears to be the most commonly used format, and is the default if this
option is omitted.
- --rsslimit=COLOR
- The minimum color to include in the RSS feed - default is
"red", meaning only critical alerts are included. If you want to
include warnings also, use "--rsslimit=yellow".
OPTIONS USED BY CGI FRONT-ENDS¶
- --reportopts=START:END:DYNAMIC:STYLE
- Invoke bbgen in report-generation mode. This is normally
used by the bb-rep.cgi(1) CGI script, but may also be used directly
when pre-generating reports. The START parameter is the start-time for the
report in Unix time_t format (seconds since Jan 1st 1970 00:00 UTC); END
is the end-time for the report; DYNAMIC is 0 for a pre-built report and 1
for a dynamic (on-line) report; STYLE is "crit" to include only
critical (red) events, "nongr" to include all non-green events,
and "all" to include all events.
- --csv=FILENAME
- Used together with --reportopts, this causes bbgen to
generate an availability report in the form of a comma-separated values
(CSV) file. This format is commonly used for importing into spreadsheets
for further processing.
- --csvdelim=DELIMITER
- By default, a comma is used to delimit fields in the CSV
output. Some non-english spreadsheets use a different delimiter, typically
semi-colon. To generate a CSV file with the proper delimiter, you can use
this option to set the character used as delimiter. E.g.
"--csvdelim=;" - note that this normally should be in double
quotes, to prevent the Unix shell from interpreting the delimiter
character as a commandline delimiter.
- --snapshot=TIME
- Generate a snapshot of the Xymon pages, as they appeared at
TIME. TIME is given as seconds since Jan 1st 1970 00:00 UTC. Normally used
via the bb-snapshot.cgi(1) CGI script.
DEBUGGING OPTIONS¶
- --debug
- Causes bbgen to dump large amounts of debugging output to
stdout, if it was compiled with the -DDEBUG enabled. When reporting a
problem with bbgen, please try to reproduce the problem and provide the
output from running bbgen with this option.
- --timing
- Dump information about the time spent by various parts of
bbgen to stdout. This is useful to see what part of the processing is
responsible for the run-time of bbgen.
BUILDING ALTERNATE PAGESETS¶
With version 1.4 of bbgen comes the possibility to generate multiple sets of pages from the same data.-
#!/bin/sh BBWEB="/xymon/os" $BBHOME/bin/bbgen \ --pageset=os --template=os \ $BBHOME/www/os/
"$BBHOME/www/os/" option work together, and places the
new pageset HTML files in a subdirectory off the normal
Xymon webroot. If you normally access the Xymon pages as
"http://xymon.acme.com/xymon/", you will then access
the new pageset as "http://xymon.acme.com/xymon/os/"
NB: The directory given as BBWEB must contain a symbolic
link to the $BBHOME/www/html/ directory, or links to
individual status messages will not work. Similar links
should be made for the gifs/, help/ and notes/
directories.
using the "os" layout, instead of the default layout.
header- and footer-templates. Normally bbgen uses the
standard template in $BBHOME/web/bb_header and
.../bb_footer - with this option, it will instead use
the files "os_header" and "os_footer" from the
$BBHOME/web/ directory. This allows you to customize
headers and footers for each pageset. If you just want
to use the normal template, you can omit this option.
USING BBGEN FOR REPORTS¶
bbgen reporting is implemented via drop-in replacements for the standard Xymon reporting scripts (bb-rep.sh and bb-replog.sh) installed in your webservers cgi-bin directory.SLA REPORTING¶
bbgen reporting allows for the generation of true SLA (Service Level Agreement) reports, also for service periods that are not 24x7. This is enabled by defining a "REPORTTIME:timespec" tag for the hosts to define the service period, and optionally a "WARNPCT:level" tag to define the agreed availability.0700 : green for 10 minutes (600 seconds)
0710 : blue for 5 minutes (300 seconds)
0715 : green for 14 hours 38 minutes (52680 seconds)
2153 : red for 22 minutes (1320 seconds)
2215 : green
PRE-GENERATED REPORTS¶
Normally, bbgen produce reports that link to dynamically generated webpages with the detailed status of a test (via the bb-replog.sh CGI script).bbgen --reportopts=starttime:endtime:nodynamic:style
START=`date +%s --date="22 Jun 2003 00:00:00"`
END=`date +%s --date="22 Jun 2003 23:59:59"`
BBWEB=/reports/bigbrother/daily/2003/06/22 \
BBHELPSKIN=/xymon/help \
BBNOTESSKIN=/xymon/notes \
bbgen --reportopts=$START:$END:1:crit \
--subpagecolumns=2 \
/var/www/docroot/reports/xymon/daily/2003/06/22
SEE ALSO¶
bb-hosts(5), hobbitserver.cfg(5), hobbitlaunch.cfg(5), bb-rep.cgi(1), bb-snapshot.cgi(1), xymon(7)Version 4.2.3: 4 Feb 2009 | Xymon |