From earle@isolar.DynDNS.ORG Wed Jun 24 08:25:16 2026 From: earle@isolar.DynDNS.ORG To: xymon@xymon.com Subject: [Xymon] Ordering of yellow vs. red messages in :msgs alert e-mails Date: Fri, 29 Dec 2023 10:59:53 -0800 Message-ID: <963C0D10-95CC-4F3D-8241-6350DB340B64@isolar.DynDNS.ORG> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2596346153140904233==" --===============2596346153140904233== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This has been bugging me for awhile now, and I'm annoyed enough to ask=20 about it. My Xymon server is also my syslog server, so the messages file gets tons=20 of messages from everywhere. As such, I'm constantly getting Subject: Xymon [long #] xymonserver:msgs CRITICAL (RED) e-mail alerts. As we all know, they look something like -- red Fri Dec 29 08:31:45 PST 2023 - Log files NOT ok &red Critical entries in /var/log/messages [... lots of "&yellow" entries here ...] [... some "&red" entries here ...] Full log: <...SKIPPED...> [... more syslog stuff here ...] -- I keep having to scroll down through all the "&yellow" alerts I don't=20 really care much about to get down to the "&red" ones I do care about. Is there some knob somewhere I can twiddle to get the ordering reversed;=20 i.e. to have the &red ones appear first at the top, before all the=20 &yellow ones? A quick scan through the *.cfg files didn't turn up any=20 likely candidates. (Bonus points: put a blank line between the two "&red" and "&yellow"=20 sections.) Thanks! --===============2596346153140904233==-- From alt36@cam.ac.uk Wed Jun 24 08:25:16 2026 From: alt36@cam.ac.uk To: xymon@xymon.com Subject: [Xymon] Ordering of yellow vs. red messages in :msgs alert e-mails Date: Sat, 30 Dec 2023 11:23:00 +0000 Message-ID: <1b43de03-533a-4fac-b875-846d49ab821f@cam.ac.uk> In-Reply-To: <963C0D10-95CC-4F3D-8241-6350DB340B64@isolar.DynDNS.ORG> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7944823501108936145==" --===============7944823501108936145== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 29/12/2023 18:59, Greg Earle wrote: > I keep having to scroll down through all the "&yellow" alerts I don't > really care much about to get down to the "&red" ones I do care about. > > Is there some knob somewhere I can twiddle to get the ordering reversed; > i.e. to have the &red ones appear first at the top, before all the > &yellow ones?? A quick scan through the *.cfg files didn't turn up any > likely candidates. The contents of the alert emails are the same as the status messages sent to the xymon server. Thus, the ordering of the lines is defined by whatever generates the status message. I've never seen a config option to implement custom line ordering in either the 'msgs' or any other test, but if all you care about is the order of the lines in the alert emails (and not the status messages as reported by xymon itself) you could use a custom SCRIPT as the alert receipient rather than MAIL in alerts.cfg, e.g. SERVICE=msgs COLOR=red SCRIPT=/my/custom/alert-msgs-script.sh alerts at example.com and have that alert-msgs-script.sh send whatever message you want to RCPT (i.e. alerts at example.com in this example). See man alerts.cfg; the SCRIPT will have a number of environment variables available including BBALPHAMSG containing the full status text, which you could process/sort/rearrage as you wish and then have the SCRIPT send a mail. Adam --===============7944823501108936145==--