XYMONQ(1)
πΈ XYMONQ(1) β the xymon query bestie πΈ
ok so first things first, this is part of the User Commands section of the manual, and it's all about xymonq. Hi. Welcome. You're gonna love her. π
β¨ NAME β¨
xymonq β a frontend to query the Xymon network- and systems-monitor. periodt.
π SYNOPSIS π
xymonq [ -c conf-file] -q QUERYTYPE [-P PAGEPATH] [-H HOSTNAME] [-T
TEST] [-C COLOR[,COLOR,...]] [-X CRITS] [-f FIELD[,FIELD,...]] [-s
SECTION[,SECTION,...]] | -l ] [-S|-p] [-h | -V] [-d]
xymonq -q clientlog [-P PAGEPATH] [-H HOSTNAME] [-T TEST] [-C
COLOR[,COLOR,...]] [-X CRITS] [-s SECTION[,SECTION,...]] | -l ]
xymonq -q xymondboard [-P PAGEPATH] [-H HOSTNAME] [-T TEST] [-C
COLOR[,COLOR,...]] [-X CRITS] [-f FIELD,[FIELD,...]]
xymonq -q hostinfo [-P PAGEPATH] [-H HOSTNAME] [-T TEST] [-C
COLOR[,COLOR,...]] [-X CRITS]
xymonq -q xymondlog [-P PAGEPATH] [-H HOSTNAME] {-T TEST | -l} [-C
COLOR[,COLOR,...]] [-X CRITS]
xymonq -q ghostlist [-a [-]AGE] [-l]
xymonq -q config [-f file]
xymonq -q {ping|version}
like, she has range, and she's not afraid to use it π
π DESCRIPTION π
xymonq is a frontend that sends all kinds of query-messages over to a Xymon server's xymond(8), and it does it by way of xymon(1). So basically: you get all the test- (column) info for one or more hosts/tests, plus the internal status info of Xymon itself. Everything. All of it. Obsessed. π¦
xymonq β A frontend to query the Xymon network- and systems-monitor.
π OPTIONS TO SELECT DISPLAYED DATA FOR THE HOSTS π
-q QUERYTYPEβ the query you wanna throw at Xymon. Your choices areclientlog,xymondboard,hostinfo,xymondlog,ghost[list],config,ping.
Scroll down to the QUERYTYPES section for the tea on each one. β
π§ OPTIONS TO SELECT HOSTS π§
-P PAGEPATHβ a PAGEPATH spec, the kind you'd find inhosts.cfg(*).-H HOSTNAMEβ a hostname fromhosts.cfg(*). And hey, if you wanna read the hosts from stdin, just use"-"β that shuts all the other filters off, no cap.-T TESTβ the name of a TEST, and it defaults to"info"(*).
(*) and yes bestie, all of these get interpreted as a REGEX. slay.
-C COLORβ only show tests with that COLOR. You can comma-separate a whole list, like"clear,green". Default: empty, which means all the colors. π-X CRITSβ eXtra CRITERIA, like"ip=","net="or"tag=". The CRITS get passed toxymondboardexactly as-is.
This exists to give you support for new or less-often-used filter CRITERIA. You can stack -X multiple times (-X ip=172.33 -X tag=test) or shove multiple quoted criteria into one (-X "ip=172.33 tag=test).
And ever since Xymon v4.3.19, you can filter on the whole message (msg=PCRE), on various timestamps, and on XMH-values (XMH_string=VALUE, e.g. XHM_CLASS=linux β peep xymon-xmh(5) for that one). π«
An empty (or missing) option matches every single item of that criterium. generous queen.
-Lβ print the evaluated hostlist to stdout and dip. bye. βοΈ-Sβ print"HOST=hostname"separator-lines above the data. (deprecated, just so you know, bestie β it's giving legacy)-pβ prefix every line of output with"hostname: ". Valid for these queries:clientlog,xymondboard,xymondlog.
π Options for clientlog:
-f FIELDβ which fields to print. defaults to"hostname".-s SECTIONβ one or more section-names, coma separated. If it's empty, the whole clientlog gets printed. all of it. π-lβ list the available sections only (as they occur).
π Options for xymondboard:
-f FIELDβ the fields to print. defaults to empty, which means it falls back to the xymon-defaults.
π Options for xymondlog:
-lβ just list the available tests for the selected host(s).
π¦ Options for ghostlist:
-a [-]AGEβ print only hosts with report AGE; AGE is a GNU-date"-s"-compatible string. and the"-"prefix inverts the selection, sneaky.-lβ only print the hostnames instead of the default full"ghostline".
β Options for client:
-f fileβ the file to retrieve, e.g."hosts.cfg","analysis.cfg". Only files ending in.cfgcan be fetched, so don't even try it with anything else. Defaults to"hosts.cfg".
π Global options:
-c conf-fileβ use the config-file you specify. This stops her from searching the default locations; and if you don't specify, the default-values apply. Important: this has to be the 1st cmdline option, so that you can selectively override values from the cmdline afterwards. order matters, bestie. π-vβ verbose output, it prints the"xymon"-commandlines.-Vβ print version info.-dβ enable debug output.-hβ this help message. (hi, this is the help message π«Ά)
π QUERYTYPES π
Okay so this is only a short lil description of the query types possible β for the full deep dive, go read xymon(1). iykyk.
clientlogβ Get the raw-data transmitted to the xymon-server. This contains the data gathered by thexymonclient*-scripts.xymondboardβ Obtain status for one or more hosts w/ extensive filtering on the host-selection side as well as the output-side (-f FIELDS).hostinfoβ Retrieve the config fromhosts.cfgabout one or more hosts (host-selection likexymondboard).xymondlogβ Print full of status-columns as dispayed on the web interface.configβ Retrieve a config-file (only".cfg"-files) from theserver/etc/-dir of the xymon-server.ghostlistβ Get information about hosts sending data without being present in the xymon-server configuration. spooky. π»ping|versionβ Get version of the xymon-server, this uses theping-command.
πΈ CONFIG FILE πΈ
The default configuration and some query-settings can be adjusted with a configuration file. The file has to conform to bash(1) syntax, because it gets sourced as-is. no filter, just vibes.
Possible settings (default values shown):
XYMON_CMD="xymon" Path and command name for `xymon` binary.
XYMON_SRV="127.0.0.1:1984" Where to find the Xymon server: IP:PORT (recommended) or HOSTNAME:PORT.
QUERYTYPE="" The default query to execute.
TEST="info" The test to use for selecting hosts or printing w/ xymondlog.
FIELDS="..." The fields to print for xymondboard, defaults to xymon(1)-defaults.
SECTION="" Section(s) to print for clientlog. Multiple sections are comma separated.
The config file can be specified via -c conf-file. And if you don't specify one, xymonq searches these locations in order, using the first one found:
./.xymonq.cfg~/.xymonq.cfg/etc/xymon/xymonq.cfg- if no file is found: use default values
π₯ EXAMPLES π₯
Print a list of all hosts known to xymon (i.e. defined in hosts.cfg)
xymonq -L
Examples for clientlog:
Print the 'clientlog' for all hosts
xymonq -q clientlog
List all sections in 'clientlog' for all hosts on page 'dc1', print "HOST="-separator
xymonq -q clientlog -P dc1 -lS
Print the 'osversion' section for hosts whole hostname matches the regex "bb.*com"
xymonq -q clientlog -H "bb.*com" -s osversion
Examples for xymondlog:
List all tests for all hosts on page 'dc1' whose hostname contain 'mx'
xymonq -q xymondlog -P dc1 -H mx -l
Print the 'disk'-status of hosts whose hostname match the PCRE 'bb'
xymonq -q xymondlog -H bb -T disk
Examples for xymondboard:
Identical host-selection as above but show the first line of the 'cpu'-status
xymonq -q xymondboard -H bb -T cpu -f line1
Examples for ghostlist:
Get the "hosts.cfg"-file:
xymonq -q config
xymonq -q config -f hosts.cfg
Get "analysis.cfg"-file:
xymonq -q config -f analysis.cfg
Examples for ghostlist:
Print the full ghostlist:
xymonq -q ghostlist
Print the hosts from ghostlist that reported within the last 5 minutes:
xymonq -q ghostlist -a "5 minutes ago"
Print the hostnames only from ghostlist that reported at least 24 hours ago:
xymonq -q ghostlist -a "-yesterday" -l
Examples for config:
Fetch hosts.cfg:
xymonq -q config -f hosts.cfg
π«Ά AUTHOR π«Ά
Written by Thomas Eckert. legend behavior, honestly.
π COPYRIGHT π
Copyright Β© 2015-2018 Thomas Eckert, http://www.it-eckert.com/
π SEE ALSO π
xymon(1), xymon-xmh(5), xymond(8)
and that's the whole page bestie!! this one came from IT-Eckert, dated January 2018, and it's page XYMONQ(1) of the manual. go query something gorgeous. π β¨π
π¦ where this page comes from
- debian bookworm: xymonq 0.8-1 Β· Permissive
- debian trixie: xymonq 0.8-1 Β· Permissive
- ubuntu jammy: xymonq 0.8-1 Β· Permissive
- ubuntu noble: xymonq 0.8-1 Β· Permissive
- ubuntu questing: xymonq 0.8-1
- ubuntu resolute: xymonq 0.8-1.1 Β· Permissive
- ubuntu stonking: xymonq 0.8-1.1 Β· Permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms