Xymon Mailing List Archive search

Configuring alerts

4 messages in this thread

list David Smith · Thu, 4 Jul 2013 12:02:18 +0100 ·
Hi

I am using the latest version of xymon and I would like to achieve the following in the alerts.

For alerts that I send to our service desk, I only want to send weekdays between 7am and 6pm, I would like to delay sending for 5 minutes but never send a repeat alert to them.

MAIL $SERVICEDESK DURATION>5 COLOR=red  REPEAT=0 TIME=W:0700:1800

In addition to this I want to send alert to servicedesk manager, weekdays between 7am and 6pm, I would like to delay sending for 1 hour, send a repeat alert to them every 30 mins but then stop  sending after 4 hours. Is this possible?

MAIL $SERVICEMGR DURATION>5 COLOR=red  TIME=W:0700:1800


regards


David


**********************************************************************

Renfrewshire Council Website - http://www.renfrewshire.gov.uk

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they  are addressed. If you have received this email in error please notify the system manager.

Renfrewshire Council may, in accordance with  the Telecommunications(Lawful Business Practice) (Interception of Communications) Regulations 2000, intercept e-mail messages for the purpose of monitoring or keeping a record of communications on the Council's system. If a message contains inappropriate dialogue it will automatically be intercepted by the Council's Internal Audit section who will decide whether or not the e-mail should be onwardly transmitted to the intended recipient(s).

This footnote also confirms that this email message has been swept by Sophos for the presence of computer viruses.

**********************************************************************
list Even Hauge Juberg · Mon, 19 Feb 2018 14:53:30 +0000 ·
Hi!

I've been trying a few things to get the correct alerts to the correct staff-member, but for some reason I cannot get it to work. In order to find out if I'm doing something wrong within the configuration of Xymon, or if I have to search somewhere else, I'm reaching out here to see if anyone can give me any pointers.

The scenario is that I have one particular host, that should be running a specific process. Let's say this process is "notepad.exe" - if "notepad.exe" is not running, John should get an email.

What I have done so far is this:

1.       Edited the configuration file on my host as follows in the "procs section": <setting name="notepad.exe" rule="=1" comment="Notepad" alarmcolor="red" />

a.       My goal here is to check if there is one instance of notepad.exe running - if not, give a "red alert".

b.       This seems to be working.  The host in the web-view of Xymon turns red in the procs column, and notepad.exe is shown as running -1 instance if there is not one running. So far so good!

2.       Now I want John to be alerted if notepad is not running so I have edited the alert.cfg in the following way:

a.       HOST=myhostname(the same as in hosts.cfg NAME:myhostname) SERVICE=notepad.exe MAIL user-0c5490feca90@xymon.invalid<mailto:user-0c5490feca90@xymon.invalid> DURATION>10 COLOR=red

b.       As "notepad.exe is not a service, but a process this is not working. AS "procs" is not a valid argument(at least not listed in the documentation, SERVICE was the closest thing that came to mind. So my question is simply, is there a way to filter alerts by the procs column or will I have to attack this in another way?

c.       I would like to avoid John getting nagged by any other red-alerts from this host, as his responsibility is notepad. :)

Any pointers would be highly appreciated!

Sicnerely,
Even Hauge Juberg
Senior Engineer
Norwegian Biodiversity Information Centre
list Jonathan Trott · Tue, 20 Feb 2018 09:12:21 +1100 ·
HOST=myhostname(the same as in hosts.cfg NAME:myhostname SERVICE=procs
MAIL user-0c5490feca90@xymon.invalid DURATION>10 COLOR=red

The SERVICE refers to the column header that you want to alert on.
You can't alert on a specific process or service name, only on a column colour change.
If you have two different procs you want different alerts on, you will need a custom alert script that sorts that out, or make the second process check a custom extension script on the client end with a corresponding different column name.

Thanks,
JT


From:   Even Hauge Juberg <user-f6195ab0f637@xymon.invalid>
To:     "xymon at xymon.com" <xymon at xymon.com>
Date:   20/02/18 07:59
Subject:        [Xymon] Configuring alerts
Sent by:        "Xymon" <xymon-bounces at xymon.com>
quoted from Even Hauge Juberg


Hi!
 I’ve been trying a few things to get the correct alerts to the correct staff-member, but for some reason I cannot get it to work. In order to find out if I’m doing something wrong within the configuration of Xymon, or if I have to search somewhere else, I’m reaching out here to see if anyone can give me any pointers.
 The scenario is that I have one particular host, that should be running a specific process. Let’s say this process is “notepad.exe” – if “notepad.exe” is not running, John should get an email.  What I have done so far is this:
1.       Edited the configuration file on my host as follows in the “procs section”: <setting name="notepad.exe" rule="=1" comment="Notepad" alarmcolor="red" />
a.       My goal here is to check if there is one instance of notepad.exe running – if not, give a “red alert”. b.       This seems to be working.  The host in the web-view of Xymon turns red in the procs column, and notepad.exe is shown as running -1 instance if there is not one running. So far so good!
2.       Now I want John to be alerted if notepad is not running so I have edited the alert.cfg in the following way:

a.       HOST=myhostname(the same as in hosts.cfg NAME:myhostname) SERVICE=notepad.exe MAIL user-0c5490feca90@xymon.invalid DURATION>10 COLOR=red
b.       As “notepad.exe is not a service, but a process this is not working. AS “procs” is not a valid argument(at least not listed in the documentation, SERVICE was the closest thing that came to mind. So my question is simply, is there a way to filter alerts by the procs column or will I have to attack this in another way? c.       I would like to avoid John getting nagged by any other red-alerts from this host, as his responsibility is notepad. J
quoted from Even Hauge Juberg
 Any pointers would be highly appreciated!  Sicnerely,
Even Hauge Juberg
Senior Engineer
Norwegian Biodiversity Information Centre
list Dominique Frise · Tue, 20 Feb 2018 07:51:55 +0000 ·
Extract from analysis.cfg(5) man page :


DIRECTING ALERTS TO GROUPS
       For some tests - e.g. "procs" or "msgs" - the right group of people  to
       alert  in case of a failure may be different, depending on which of the
       client rules actually detected a problem. E.g. if you have PROCS  rules
       for  a  host  checking  both "httpd" and "sshd" processes, then the Web
       admins should handle httpd-failures, whereas "sshd" failures  are  han-
       dled by the Unix admins.

       To handle this, all rules can have a "GROUP=groupname" setting.  When a
       rule with this setting triggers a yellow or red status,  the  groupname
       is passed on to the Xymon alerts module, so you can use it in the alert
       rule definitions in alerts.cfg(5) to direct alerts to the correct group
       of people.


For example, in alerts.cfg, you would have:


HOST=myhostname

    PROC notepad.exe 1 GROUP=admins


And this in alerts.cfg:


HOST=myhostname SERVICE=procs GROUP=admins

    MAIL user-0c5490feca90@xymon.invalid


HTH,


Dominique

UNIL - University of Lausanne
quoted from Even Hauge Juberg

De : Xymon <xymon-bounces at xymon.com> de la part de Even Hauge Juberg <user-f6195ab0f637@xymon.invalid>
Envoyé : lundi 19 février 2018 15:53
À : xymon at xymon.com
Objet : [Xymon] Configuring alerts

Hi!

I've been trying a few things to get the correct alerts to the correct staff-member, but for some reason I cannot get it to work. In order to find out if I'm doing something wrong within the configuration of Xymon, or if I have to search somewhere else, I'm reaching out here to see if anyone can give me any pointers.

The scenario is that I have one particular host, that should be running a specific process. Let's say this process is "notepad.exe" - if "notepad.exe" is not running, John should get an email.

What I have done so far is this:

1.       Edited the configuration file on my host as follows in the "procs section": <setting name="notepad.exe" rule="=1" comment="Notepad" alarmcolor="red" />

a.       My goal here is to check if there is one instance of notepad.exe running - if not, give a "red alert".

b.       This seems to be working.  The host in the web-view of Xymon turns red in the procs column, and notepad.exe is shown as running -1 instance if there is not one running. So far so good!

2.       Now I want John to be alerted if notepad is not running so I have edited the alert.cfg in the following way:

a.       HOST=myhostname(the same as in hosts.cfg NAME:myhostname) SERVICE=notepad.exe MAIL user-0c5490feca90@xymon.invalid<mailto:user-0c5490feca90@xymon.invalid> DURATION>10 COLOR=red

b.       As "notepad.exe is not a service, but a process this is not working. AS "procs" is not a valid argument(at least not listed in the documentation, SERVICE was the closest thing that came to mind. So my question is simply, is there a way to filter alerts by the procs column or will I have to attack this in another way?

c.       I would like to avoid John getting nagged by any other red-alerts from this host, as his responsibility is notepad. :)

Any pointers would be highly appreciated!

Sicnerely,
Even Hauge Juberg
Senior Engineer
Norwegian Biodiversity Information Centre