COMBO.CFG(5)

πŸ“¦
version 4.3.30 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, this is combo.cfg(5) β€” the manual for combo.cfg, which is literally the Configuration of combostatus tool. that's the whole vibe. it's a file format page, it's giving config-file realness, and we're gonna walk through it together 🫢


✨ SYNOPSIS ✨

$XYMONHOME/etc/combo.cfg

🌸 DESCRIPTION 🌸

so combostatus(1) does NOT share a config file with anybody β€” she has her own, and it lives at $XYMONHOME/etc/combo.cfg. every single line in this file defines one combined test. one line, one test. that's the deal πŸ’…


πŸŽ€ FILE FORMAT πŸŽ€

each line of the file = a brand new combined test. and like, blank lines? ignored. lines that start with a hash mark (#)? also ignored, they're comments. queen behavior, truly.

the file uses the hostnames and testnames that you're already using in your Xymon hosts.cfg file. then you combine them with normal logical operators β€” "||" for "or", "&&" for "and", etc. it's giving math class but make it slay.

a simple test β€” like "Web1.http" β€” gives you the value "1" if the "http" test for server "Web1" is green, yellow or clear. it gives you the value "0" if it's red, purple or blue. no cap, that's the whole mapping.

and it's not just logic, bestie β€” you can also do integer arithmetic and comparisons. for example, this is valid:

WebCluster.http = (Web1.http + Web2.http + Web3.http) >= 2

this test goes green if two or more of the http tests for Web1, Web2 and Web3 are green. iconic, honestly.

the full range of operators are:

  • + β€” Add
  • - β€” Subtract
  • * β€” Multiply
  • / β€” Divide
  • % β€” Modulo
  • | β€” Bit-wise "or"
  • & β€” Bit-wise "and"
  • || β€” Logical "or"
  • && β€” Logical "and"
  • > β€” Greater than
  • < β€” Less than
  • >= β€” Greater than or equal
  • <= β€” Less than or equal
  • == β€” Equal

there is currently no support for a "not" operator. 😭 if you need it, use the transcription (host.test == 0) instead of !host.test. that's the workaround, that's the move.

NB: all operators have EQUAL PRECEDENCE. like, every single one. if you need something evaluated in a specific order, you MUST use parentheses to group the expressions together. no parentheses = chaos = you get what you get πŸ™ˆ

if the expression comes out as "0", the combined test goes red. if it comes out as non-zero, the combined test is green. that's it, that's the rules.

Note: if the expression involves hostnames with a character that is also an operator β€” e.g. if you have a host "t1-router-newyork.foo.com" with a dash in the hostname β€” then that operator-character must be escaped with a backslash '\' in the expression, or it will be interpreted as an operator. like this, bestie:

nyc.conn = (t1\-router\-nyc.conn || backup\-router\-nyc.conn)

🌈 EXAMPLE 🌈

WebCluster.http = (Web1.http || Web2.http)
AppSrvCluster.procs = (AppSrv1.conn && AppSrv1.procs) || (AppSrv2.conn && AppSrv2.procs)
Customer.cluster = WebCluster.http && AppSrvCluster.procs

let's break it down line by line because this is a moment πŸ’…

  • the first line defines a new test, with hostname "WebCluster" and the columnname "http". it will be green if the http test on either the "Web1" or the "Web2" server is green.
  • the second line defines a "procs" test for the "AppSrvCluster" host. each of the AppSrv1 and AppSrv2 hosts is checked for "conn" (ping) and their "procs" test. on each host, both of these must be green, but the combined test is green if that condition is fulfilled on just one of the hosts.
  • the third line uses the two first tests to build a "double combined" test, defining a test that shows the overall health of the system. main character energy fr fr πŸ‘‘

πŸ¦‹ FILES πŸ¦‹

$XYMONHOME/etc/combo.cfg

⭐ SEE ALSO ⭐

combostatus(1)


and that's the page, bestie!! go forth and combine your tests πŸ’– this was Xymon, Version 4.3.30: 4 Sep 2019 β€” so like, she's a classic, a vintage icon, and yes the date is part of the lore. stay green out there πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from