[Xymon] Alerts.cfg

Jeremy Ruffer jeremy.ruffer at gmail.com
Sat Dec 16 15:23:29 CET 2023


Hi Neil,

You could use a script to create a list of the critical hosts into a 
file, include that file, then specify the actions.

In alerts.cfg

include hostlist
Then put what ever actions you want after that.

The script to create the list is:
#!/bin/sh

list=`grep = $XYMONSERVERROOT/etc/critical.cfg |cut -f1 -d'|'`

ALERTLIST="host="
FIRST="Y"
for host in $list
do
   if [ $FIRST = "Y" ]
   then
     ALERTLIST="${ALERTLIST}$host"
     FIRST="N"
   else
     ALERTLIST="${ALERTLIST},$host"
   fi
done
echo $ALERTLIST >$XYMONSERVERROOT/etc/hostlist

This script would need to be run every time you make a change to 
critical hosts.

Regards

Jeremy


------ Original Message ------
From: "Neil Simmonds" <Neil.Simmonds at studio.co.uk>
To: "xymon at xymon.com" <xymon at xymon.com>
Sent: 15/12/2023 13:51:55
Subject: [Xymon] Alerts.cfg

>Hi folks,
>
>
>
>Beyond having the script check in critical.cfg for the alerting 
>server/test combination is there any other way to configure an option 
>in alerts.cfg so that only alerts that are red and on the Critical 
>config page will trigger the action.
>
>
>
>I know I can use COLOR=RED but there doesn’t seem to be a PAGE option 
>that equates to the Critical page.
>
>
>
>Thanks,
>
>Neil SImmonds
>
>
>
>
>
>
>
>Studio is a trading name of Studio Retail Trading Limited (Company no. 
>03994833), which is an introducer of credit not a lender. Studio Pay is 
>provided by Frasers Group Financial Services Limited (Registered 
>Company no. 00718151), which is authorised and regulated by the 
>Financial Conduct Authority (FRN 311908) for consumer credit and 
>general insurance and a member of the Finance and Leasing Association. 
>Both companies are registered in England and their registered office 
>is: Church Bridge House Henry Street Accrington BB5 4EE.
>
>NOTE: This email and any information contained within or attached in a 
>separate file is confidential and intended solely for the Individual to 
>whom it is addressed. The information or data included is solely for 
>the purpose indicated or previously agreed. Any information or data 
>included with this e-mail remains the property of Studio Retail Trading 
>Ltd or Frasers Group Financial Services Ltd. The recipient will refrain 
>from utilising the information for any purpose other than that 
>indicated and upon request will destroy the information and remove it 
>from their records. Any views or opinions presented are solely those of 
>the author and do not necessarily represent those of Studio Retail 
>Trading Ltd or Frasers Group Financial Services Ltd. If you are not the 
>intended recipient, be advised that you have received this email in 
>error and that any use, dissemination, forwarding, printing, or copying 
>of this email is strictly prohibited. No warranties or assurances are 
>made in relation to the safety and content of this e-mail and any 
>attachments. No liability is accepted for any consequences arising from 
>it. Studio Retail Trading Ltd and Frasers Group Financial Services Ltd 
>reserve the right to monitor all e-mail communications through their 
>internal and external networks. If you have received this email in 
>error please let us know. You can find our available contact details by 
>going to help.studio.co.uk and clicking ‘Contact Us’.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20231216/dbf69376/attachment.htm>


More information about the Xymon mailing list