---
name: "bb-findhost.cgi"
section: "1"
platform: "linux"
package: "xymon"
version: "4.3.0~beta2.dfsg-9.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/bb-findhost.cgi"
---

# bb-findhost.cgi(1)

Xymon CGI script to find hosts

## NAME

bb-findhost.cgi - Xymon CGI script to find hosts

## SYNOPSIS

**bb-findhost.cgi?host=REGEX**

## DESCRIPTION

**bb-findhost.cgi** is invoked as a CGI script via the bb-findhost.sh CGI wrapper.

bb-findhost.cgi is passed a QUERY\_STRING environment variable with the "host=REGEX" parameter. The REGEX is a Posix regular expression (see *[regex(7)](/regex/7.md)* ) describing the hostnames to look for.  A trailing wildcard is assumed on all  hostnames - e.g. requesting the hostname "www" will match any host whose  name begins with "www".

It then produces a single web page, listing all of the hosts that matched any of the hostnames, with links to the Xymon webpages where they are located.

The output page lists hosts in the order they appear in the *[bb-hosts(5)](/bb-hosts/5.md)* file.

A sample web page implementing the search facility is included with bbgen, you access it via the URL /bb/help/bb-findhost.html.

## OPTIONS

- \--env=FILENAME

  Loads the environment from FILENAME before executing the CGI.

## FILES

- $BBHOME/web/findhost\_header

  HTML header file for the generated web page

- $BBHOME/web/findhost\_footer

  HTML footer file for the generated web page

- $BBHOME/web/findhost\_form

  Query form displayed when bb-findhost.cgi is called with no parameters.

## ENVIRONMENT VARIABLES

- BBHOSTS

  bb-findhost.cgi uses the BBHOSTS environment variable to find the bb-hosts file listing all known hosts and their page locations.

- BBHOME

  Used to locate the template files for the generated web pages.

## SEE ALSO

[bbgen(1)](/bbgen/1.md), [bb-hosts(5)](/bb-hosts/5.md), [hobbitserver.cfg(5)](/hobbitserver.cfg/5.md)
