[Check_mk (english)] Notification escalation, flexible notification

Hi folks!

I’ve been trying to implement escalation and flexible notification, but I’m obviously missing something.

I’ve added a “Pager address” in my WATO user profile, and I have changed my notification to “Flexible Custom Notifications” and added an Email notification and a “SMS via Email to SMS Gateway” (the default sms didn’t work for lack of smstools).

Right off the bat, I had no luck with the SMS Gateway script, but upon inspection, I found the version I had was using env variables that didn’t exist, so I fixed that.

Once I was able to get a page to come through (~/var/check_mk/notifiy/*.log are your friends), I tried enabling “Restrict to nth to mth notification (escalation)” to “2” to “3”.

I set up a failure state and watched the notify.log:

[1403924357] Got notification context with 37 variables

[1403924357] Preparing flexible notifications for showard

[1403924357] Plugin: mail

[1403924357] Executing /omd/sites/nm001/share/check_mk/notifications/mail

[1403924358] Plugin: email-sms-custom.sh

[1403924358] - Skipping: notification number 1 does not lie in range 2 … 3

OK, great! So, now I wait for the next check for escalation … err, it never fired again, so I obviously have something missing.

Looking around in WATO at the various configuration options, I see “Periodic notifications during service problems” … should I assume there is no default for this? if I set it to 120, is that seconds, minutes, check-cycles, ??? More importantly, will that cause the recheck notifications that I’m looking for or is there a better way to implement escalations?

BTW, I’m running on OMD out of the testing repo (1.11.20140402) on Ubuntu 12.04, if that helps …

Thanks!

… .- –

Sam Howard

… .- –

Hi Sam,

yes you must enable the “Periodic notifications during service problems” and the numbers are minutes if you dont change anything on the nagios core config (one check cycle = 60 seconds),

For testing it would be the best to set it to something like some minutes only.

br

Andreas

···

2014-06-28 23:24 GMT+02:00 Samuel P Howard sam.howard@gmail.com:

Hi folks!

I’ve been trying to implement escalation and flexible notification, but I’m obviously missing something.

I’ve added a “Pager address” in my WATO user profile, and I have changed my notification to “Flexible Custom Notifications” and added an Email notification and a “SMS via Email to SMS Gateway” (the default sms didn’t work for lack of smstools).

Right off the bat, I had no luck with the SMS Gateway script, but upon inspection, I found the version I had was using env variables that didn’t exist, so I fixed that.

Once I was able to get a page to come through (~/var/check_mk/notifiy/*.log are your friends), I tried enabling “Restrict to nth to mth notification (escalation)” to “2” to “3”.

I set up a failure state and watched the notify.log:

[1403924357] Got notification context with 37 variables

[1403924357] Preparing flexible notifications for showard

[1403924357] Plugin: mail

[1403924357] Executing /omd/sites/nm001/share/check_mk/notifications/mail

[1403924358] Plugin: email-sms-custom.sh

[1403924358] - Skipping: notification number 1 does not lie in range 2 … 3

OK, great! So, now I wait for the next check for escalation … err, it never fired again, so I obviously have something missing.

Looking around in WATO at the various configuration options, I see “Periodic notifications during service problems” … should I assume there is no default for this? if I set it to 120, is that seconds, minutes, check-cycles, ??? More importantly, will that cause the recheck notifications that I’m looking for or is there a better way to implement escalations?

BTW, I’m running on OMD out of the testing repo (1.11.20140402) on Ubuntu 12.04, if that helps …

Thanks!

… .- –

Sam Howard

… .- –


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Related question… Is it possible to define one period for critical notifications and another period for warning notifications? I’d like to be reminded of critical
issues often but may be ok with fewer notification reminders for warnings. I’m looking but can’t see a way to do this.

Thanks,

Lance Tost

Sr. Network Administrator

Keystone Automotive Operations, Inc.

On Behalf Of Andreas Döhler

···

Hi Sam,

yes you must enable the “Periodic notifications during service problems” and the numbers are minutes if you dont change anything on the nagios core config (one check cycle = 60 seconds),

For testing it would be the best to set it to something like some minutes only.

br

Andreas

2014-06-28 23:24 GMT+02:00 Samuel P Howard sam.howard@gmail.com:

Hi folks!

I’ve been trying to implement escalation and flexible notification, but I’m obviously missing something.

I’ve added a “Pager address” in my WATO user profile, and I have changed my notification to “Flexible Custom Notifications” and added an Email notification and a “SMS via Email to SMS Gateway” (the default sms didn’t work for lack of smstools).

Right off the bat, I had no luck with the SMS Gateway script, but upon inspection, I found the version I had was using env variables that didn’t exist, so I fixed that.

Once I was able to get a page to come through (~/var/check_mk/notifiy/*.log are your friends), I tried enabling “Restrict to nth to mth notification (escalation)” to “2” to “3”.

I set up a failure state and watched the notify.log:

[1403924357] Got notification context with 37 variables

[1403924357] Preparing flexible notifications for showard

[1403924357] Plugin: mail

[1403924357] Executing /omd/sites/nm001/share/check_mk/notifications/mail

[1403924358] Plugin: email-sms-custom.sh

[1403924358] - Skipping: notification number 1 does not lie in range 2 … 3

OK, great! So, now I wait for the next check for escalation … err, it never fired again, so I obviously have something missing.

Looking around in WATO at the various configuration options, I see “Periodic notifications during service problems” … should I assume there is no default for this? if I set it to 120, is that seconds, minutes, check-cycles, ??? More importantly,
will that cause the recheck notifications that I’m looking for or is there a better way to implement escalations?

BTW, I’m running on OMD out of the testing repo (1.11.20140402) on Ubuntu 12.04, if that helps …

Thanks!

… .- –

Sam Howard

… .- –


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

#0751
checks: New localcheck for Linux that makes sure that filesystems in /etc/fstab are mounted

I was looking at the local check added recently to check_mk-1.2.5i4 (check_fstab_mounts)
and ran into a problem. We have NFS mounted filesystems in /etc/fstab with only 4 parameters per line
which generated runtime errors.

To work around this I changed the line in check_fstab_mounts
from:
device, mountpoint, fstype, options, rest = line.split(None, 4)
to:
if len(line.split()) > 4:
device, mountpoint, fstype, options, rest = line.split(None, 4)
else:
device, mountpoint, fstype, options = line.split(None, 3)

There may be a simpler way to do it, but I’m not a python expert. I’m not sure exactly where to
submit a change so I thought I’d put it out here first.

It also gave a false alert for swap entries, so I changed it to:

if len(line.split()) > 4:
    device, mountpoint, fstype, options, rest = line.split(None, 4)
else:
    device, mountpoint, fstype, options = line.split(None, 3)
if mountpoint == "swap":
    continue
···

From: “Jim Welch” jim.welch@oit.gatech.edu
To: checkmk-en@lists.mathias-kettner.de
Sent: Monday, June 30, 2014 2:47:55 PM
Subject: [Check_mk (english)] check_fstab_mounts: runtime error in local check

#0751
checks: New localcheck for Linux that makes sure that filesystems in /etc/fstab are mounted

I was looking at the local check added recently to check_mk-1.2.5i4 (check_fstab_mounts)
and ran into a problem. We have NFS mounted filesystems in /etc/fstab with only 4 parameters per line
which generated runtime errors.

To work around this I changed the line in check_fstab_mounts
from:
device, mountpoint, fstype, options, rest = line.split(None, 4)
to:
if len(line.split()) > 4:
device, mountpoint, fstype, options, rest = line.split(None, 4)
else:
device, mountpoint, fstype, options = line.split(None, 3)

There may be a simpler way to do it, but I’m not a python expert. I’m not sure exactly where to
submit a change so I thought I’d put it out here first.


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

At the moment it is not possible but with the rules based notification which comes with the next stable release it should be possible i think.
If you have a test system you can have a look with the innovation release 1.2.5i4 at the moment.

br

Andreas

···

2014-06-30 20:25 GMT+02:00 Lance Tost Lance.Tost@key-stone.com:

Related question… Is it possible to define one period for critical notifications and another period for warning notifications? I’d like to be reminded of critical
issues often but may be ok with fewer notification reminders for warnings. I’m looking but can’t see a way to do this.

Thanks,

Lance Tost

Sr. Network Administrator

Keystone Automotive Operations, Inc.

From: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
On Behalf Of Andreas Döhler
Sent: Sunday, June 29, 2014 11:54 AM
To: Samuel P Howard
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Notification escalation, flexible notification

Hi Sam,

yes you must enable the “Periodic notifications during service problems” and the numbers are minutes if you dont change anything on the nagios core config (one check cycle = 60 seconds),

For testing it would be the best to set it to something like some minutes only.

br

Andreas

2014-06-28 23:24 GMT+02:00 Samuel P Howard sam.howard@gmail.com:

Hi folks!

I’ve been trying to implement escalation and flexible notification, but I’m obviously missing something.

I’ve added a “Pager address” in my WATO user profile, and I have changed my notification to “Flexible Custom Notifications” and added an Email notification and a “SMS via Email to SMS Gateway” (the default sms didn’t work for lack of smstools).

Right off the bat, I had no luck with the SMS Gateway script, but upon inspection, I found the version I had was using env variables that didn’t exist, so I fixed that.

Once I was able to get a page to come through (~/var/check_mk/notifiy/*.log are your friends), I tried enabling “Restrict to nth to mth notification (escalation)” to “2” to “3”.

I set up a failure state and watched the notify.log:

[1403924357] Got notification context with 37 variables

[1403924357] Preparing flexible notifications for showard

[1403924357] Plugin: mail

[1403924357] Executing /omd/sites/nm001/share/check_mk/notifications/mail

[1403924358] Plugin: email-sms-custom.sh

[1403924358] - Skipping: notification number 1 does not lie in range 2 … 3

OK, great! So, now I wait for the next check for escalation … err, it never fired again, so I obviously have something missing.

Looking around in WATO at the various configuration options, I see “Periodic notifications during service problems” … should I assume there is no default for this? if I set it to 120, is that seconds, minutes, check-cycles, ??? More importantly,
will that cause the recheck notifications that I’m looking for or is there a better way to implement escalations?

BTW, I’m running on OMD out of the testing repo (1.11.20140402) on Ubuntu 12.04, if that helps …

Thanks!

… .- –

Sam Howard

… .- –


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en


Please consider the environment before printing