FINDHOST.CGI(1)

πŸ¦‹ FINDHOST.CGI(1) β€” the findhost.cgi manual, bestie edition πŸ¦‹

okay so. hi. you're here because you want the tea on findhost.cgi, a Xymon CGI script that goes and finds hosts for you, and honestly? iconic behavior. this is the findhost.cgi(1) page from the General Commands Manual, and we're gonna walk through it together, hand in hand, no host left behind. 🫢


✨ NAME ✨

findhost.cgi β€” Xymon CGI script to find hosts. that's it. that's the job. she finds hosts. πŸ’…


🌸 SYNOPSIS 🌸

findhost.cgi?host=REGEX

yeah. that's the whole vibe. you hit her with a REGEX and she comes back with hosts. simple. clean. slay.


πŸ’– DESCRIPTION πŸ’–

so findhost.cgi doesn't get called directly by you, bestie β€” she's invoked as a CGI script via the findhost.sh CGI wrapper. think of findhost.sh as her manager. she doesn't take meetings without her. πŸŽ€

when she runs, she gets handed a QUERY_STRING environment variable with the "host=REGEX" parameter in it. that REGEX is a Posix regular expression (go peek at regex(7) if you want the full lore) and it describes the hostnames you're looking for. πŸ•΅οΈβ™€οΈ

and here's the cute part: a trailing wildcard is assumed on all hostnames. so like, if you request the hostname "www", she'll match any host whose name begins with "www". she's not being sloppy, she's being ✨generous✨.

then she produces a single web page listing every host that matched any of the hostnames, with links to the Xymon webpages where those hosts live. little portal, little door, very main character energy if you ask me. πŸ”₯

the output page lists hosts in the order they appear in the hosts.cfg(5) file. so the ordering? not vibes-based. it's file-based. respect the file. πŸ’œ

also!! a sample web page implementing the search facility is included with xymongen, and you access it via the URL /xymon/help/findhost.html. go look, she's cute. 🌈


✨ OPTIONS ✨

  • --env=FILENAME β€” loads the environment from FILENAME before executing the CGI. basically she reads the room (the room is FILENAME) first. πŸ“‹

πŸŽ€ FILES πŸŽ€

  • $XYMONHOME/web/findhost_header β€” the HTML header file for the generated web page. her little crown. πŸ‘‘
  • $XYMONHOME/web/findhost_footer β€” the HTML footer file for the generated web page. her little shoes. 🩰
  • $XYMONHOME/web/findhost_form β€” the query form displayed when findhost.cgi is called with no parameters. yes, she has a form for when you show up with nothing to say. we've all been there. 😭

πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

  • HOSTSCFG β€” findhost.cgi uses the HOSTSCFG environment variable to find the hosts.cfg file listing all known hosts and their page locations. that's her map. her little treasure map. πŸ—ΊοΈ
  • XYMONHOME β€” used to locate the template files for the generated web pages. she needs to know where home is, honestly same. 🏠

🌟 SEE ALSO 🌟

go read them. i'll wait. i'm literally always waiting. ⏳


fr fr, that's the whole page. every flag, every file, every env var, all present and accounted for. no cap. πŸ™ˆ

and that's a wrap, bestie!! this has been findhost.cgi(1) from Xymon Version 4.3.30: 4 Sep 2019 β€” she's serving FINDHOST.CGI(1) realness, and honestly? she ate. πŸ’…βœ¨ bye!! πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from