[Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios
and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment: http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny

OK my question wasn’t that clear, so I’ll start over …

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails. I my case I’ll use sms only in special cases (internet connection
fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

command_name notify-by-sms

command_line /usr/bin/smssend $CONTACTEMAIL$ ‘$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$ @$DATETIME$ Info: $OUTPUT$’

}

‘host-notify-by-sms’ command definition

define command{

command_name host-notify-by-sms

command_line /usr/bin/smssend $CONTACTEMAIL$ “Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$”

}

and the contact:

···
# sms contact definition

define contact{

contact_name                    admin_sms

alias Admins SMS

service_notification_period     24x7

host_notification_period 24x7

service_notification_options    w,u,c,r

host_notification_options d,u,r

service_notification_commands   notify-by-sms

host_notification_commands host-notify-by-sms

email                           49118999xxx

}

Question is can/should some of these definition be done in WATO, or doI have to do it all with main.mk “extra_nagios_conf +=” mechanism ?

Von: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios
and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group sms via the pager number of these users. This spares me
from editing every users contact for the use of sms.

···

Von: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over …

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails. I my case I’ll use sms only in special cases (internet connection
fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

command_name notify-by-sms

command_line /usr/bin/smssend $CONTACTEMAIL$ ‘$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$ @$DATETIME$ Info: $OUTPUT$’

}

‘host-notify-by-sms’ command definition

define command{

command_name host-notify-by-sms

command_line /usr/bin/smssend $CONTACTEMAIL$ “Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$”

}

and the contact:

# sms contact definition

define contact{

contact_name                    admin_sms

alias Admins SMS

service_notification_period     24x7

host_notification_period 24x7

service_notification_options    w,u,c,r

host_notification_options d,u,r

service_notification_commands   notify-by-sms

host_notification_commands host-notify-by-sms

email                           49118999xxx

}

Question is can/should some of these definition be done in WATO, or doI have to do it all with main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios
and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny

Hi,

While not directly related, I am trying to work out how to do alerting that will send emails 24/7 and then sms only out side business hours. I have read over flexible notification but it only looks like its one OR the other.

We are also trying to set up what you are describing but for now its in the too hard basket.

Cheers

···

On 23/01/2013 9:49 PM, “Lienhard, Frank” Frank.Lienhard@neos-it.de wrote:

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group sms via the pager number of these users. This spares me
from editing every users contact for the use of sms.

Von: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over …

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails. I my case I’ll use sms only in special cases (internet connection
fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms
    command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$  @$DATETIME$ Info: $OUTPUT$'
    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms
    command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$"
    }

and the contact:

# sms contact definition
define contact{
        contact_name                    admin_sms
        alias                           Admins SMS
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-sms
        host_notification_commands      host-notify-by-sms
        email                           49118999xxx
        }

Question is can/should some of these definition be done in WATO, or doI have to do it all with main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios
and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

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

To your second posting - the contact definition can be done completely inside wato.
What i do for SMS notification is - create a contact for SMS put it inside a group and assign the group to the wanted services/hosts.

The notify-by-sms command is inserted at the user definition and that’s it.

Negative point you need two contacts one for normal notification and one for sms.

If you write some notification scripts it is possible to do this all with one contact.

br

Andreas

···

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group sms via the pager number of these users. This spares me
from editing every users contact for the use of sms.

Von: checkmk-en-bounces@lists.mathias-kettner.de
[mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over …

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails. I my case I’ll use sms only in special cases (internet connection
fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms
    command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$  @$DATETIME$ Info: $OUTPUT$'
    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms
    command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$"
    }

and the contact:

# sms contact definition
define contact{
        contact_name                    admin_sms
        alias                           Admins SMS
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-sms
        host_notification_commands      host-notify-by-sms
        email                           49118999xxx
        }

Question is can/should some of these definition be done in WATO, or doI have to do it all with main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios
and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

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

Look at the screenshot, I think that this is setup which you want.

···

--
Jan Krajdl

Dne 23.1.2013 12:00, Alex Broad napsal(a):

Hi,

While not directly related, I am trying to work out how to do alerting
that will send emails 24/7 and then sms only out side business hours. I
have read over flexible notification but it only looks like its one OR
the other.

We are also trying to set up what you are describing but for now its in
the too hard basket.

Cheers

OK, even tough it’s not mentioned in the changelog, I guess that’s something 1.2.0p2 hasn’t implemented. (that’s my version, which came with OMD
0.56 for centos)

At least I have to upgrade that, I think.

···

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 14:24
An: Lienhard, Frank
Betreff: Re: [Check_mk (english)] sms notification

With version 1.2.0p3 it looks like the following way.

Define your own command inside one of you manually generated config files → misccommand.cfg or something else.

Then go to the “Users & Contacts” there you will find in the section “Notifications” of every user the point “Notification Command for Hosts” and the same with Services.

There you have to insert the notification command defined before in the config file.

That’s the easiest way but you have to make two users one for notification with email and one for sms.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

The notify-by-sms command is inserted at the user definition
and that’s it.

Didn’t get this one. Which version of check_mk do you use?

Or is that done directly in contact file wato has generated?

Thanks

Frank

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 12:05
An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de

Betreff: Re: [Check_mk (english)] sms notification

To your second posting - the contact definition can be done completely inside wato.

What i do for SMS notification is - create a contact for SMS put it inside a group and assign the group to the wanted services/hosts.

The notify-by-sms command is inserted at the user definition and that’s it.

Negative point you need two contacts one for normal notification and one for sms.

If you write some notification scripts it is possible to do this all with one contact.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other
way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for
that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group
sms via the pager number of these users. This spares me from editing every users contact for the use of sms.

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over ..

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails.
I my case I’ll use sms only in special cases (internet connection fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$ 

@$DATETIME$ Info: $OUTPUT$’

    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info:

$OUTPUT$"

    }

and the contact:

# sms contact definition

define contact{

        contact_name                    admin_sms

    alias                           Admins SMS
        service_notification_period     24x7

    host_notification_period        24x7
        service_notification_options    w,u,c,r

    host_notification_options       d,u,r
        service_notification_commands   notify-by-sms

    host_notification_commands      host-notify-by-sms
        email                           49118999xxx

    }

Question is can/should some of these definition be done in WATO, or doI have to do it all with
main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail
notification is useless. I did that all directly into nagios and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel.
+49 5361 83494-32

Fax
+49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


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

OK this is only inderectly part of the problem, but I’m somewhat stucked here:

The smstools daemon can be configured to be started as a certain user (in /etc/smsd.conf). But I can’t get it working for a group of users.

That’s e.g. when you have more than one OMD instance/ site running or (in my case apcupsd) another user outsite of OMD needs the smstools to be
used.

All queueing is done several subdirectories in /var/spool/sms, which by inherit the rights of the user, which starts the daemon.

Adding all users in the smstools group won’t help because each user generates the send file (of course) with their primary group, which leaves
the send file (which is the queued message to send) unreadable for the sms-daemon user.

How do you manage that? Or do you use the smstools only with one user (the OMD site user) ant start the smsd with that user?

···

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 14:24
An: Lienhard, Frank
Betreff: Re: [Check_mk (english)] sms notification

With version 1.2.0p3 it looks like the following way.

Define your own command inside one of you manually generated config files → misccommand.cfg or something else.

Then go to the “Users & Contacts” there you will find in the section “Notifications” of every user the point “Notification Command for Hosts” and the same with Services.

There you have to insert the notification command defined before in the config file.

That’s the easiest way but you have to make two users one for notification with email and one for sms.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

The notify-by-sms command is inserted at the user definition
and that’s it.

Didn’t get this one. Which version of check_mk do you use?

Or is that done directly in contact file wato has generated?

Thanks

Frank

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 12:05
An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de

Betreff: Re: [Check_mk (english)] sms notification

To your second posting - the contact definition can be done completely inside wato.

What i do for SMS notification is - create a contact for SMS put it inside a group and assign the group to the wanted services/hosts.

The notify-by-sms command is inserted at the user definition and that’s it.

Negative point you need two contacts one for normal notification and one for sms.

If you write some notification scripts it is possible to do this all with one contact.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other
way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for
that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group
sms via the pager number of these users. This spares me from editing every users contact for the use of sms.

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over ..

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails.
I my case I’ll use sms only in special cases (internet connection fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$ 

@$DATETIME$ Info: $OUTPUT$’

    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info:

$OUTPUT$"

    }

and the contact:

# sms contact definition

define contact{

        contact_name                    admin_sms

    alias                           Admins SMS
        service_notification_period     24x7

    host_notification_period        24x7
        service_notification_options    w,u,c,r

    host_notification_options       d,u,r
        service_notification_commands   notify-by-sms

    host_notification_commands      host-notify-by-sms
        email                           49118999xxx

    }

Question is can/should some of these definition be done in WATO, or doI have to do it all with
main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail
notification is useless. I did that all directly into nagios and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel.
+49 5361 83494-32

Fax
+49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


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

Still no success. I did this:

Define a command in check_mk/conf.d/sms.mk, which results in these lines in :~/etc/nagios/conf.d/check_mk_objects.cfg:

# sms service command

define command {

command_name notify-service-sms

command_line /usr/bin/smssend $CONTACTPAGER$ ‘$SERVICEDESC$ auf $HOSTALIAS$ State: $SERVICESTATE$ @$DATETIME$ Info: $OUTPUT$’

}

# sms host command

define command {

command_name notify-host-sms

command_line /usr/bin/smssend $CONTACTPAGER$ ‘$HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$’

I created a sms contact, a contact group, assigned the host to the sms contact group.

I set a CRITICAL to the host via the multisite interface and had a lock in ~/var/log/nagios.log:

[1359382169] SERVICE ALERT: internet_dummy;Internet;CRITICAL;HARD;1;Manually set to Critical by omdadmin

[1359382169] SERVICE NOTIFICATION: fli_sms;internet_dummy;Internet;CRITICAL;notify-service-sms;Manually set to Critical by omdadmin

[1359382169] SERVICE ALERT: internet_dummy;PING;CRITICAL;HARD;1;Manually set to Critical by omdadmin

[1359382169] SERVICE NOTIFICATION: fli_sms;internet_dummy;PING;CRITICAL;notify-service-sms;Manually set to Critical by omdadmin

[1359382194] SERVICE ALERT: internet_dummy;PING;OK;HARD;1;OK - 172.16.1.121: rta 0.027ms, lost 0%

[1359382194] SERVICE NOTIFICATION: fli_sms;internet_dummy;PING;OK;notify-service-sms;OK - 172.16.1.121: rta 0.027ms, lost 0%

[1359382225] SERVICE ALERT: internet_dummy;Internet;OK;HARD;1;OK: The Internet seems to be reachable

[1359382225] SERVICE NOTIFICATION: fli_sms;internet_dummy;Internet;OK;notify-service-sms;OK: The Internet seems to be reachable

So the notifications seem to work, but no SMS is sent (the smsd.log gets no entries).

The OMD site user is able to send sms from CLI using the command: /usr/bin/smssend 4917xxxxxxxxx ‘some text’

Then I must have made a mistake in the command definition, which I’m unable to see/understand.

···

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 14:24
An: Lienhard, Frank
Betreff: Re: [Check_mk (english)] sms notification

With version 1.2.0p3 it looks like the following way.

Define your own command inside one of you manually generated config files → misccommand.cfg or something else.

Then go to the “Users & Contacts” there you will find in the section “Notifications” of every user the point “Notification Command for Hosts” and the same with Services.

There you have to insert the notification command defined before in the config file.

That’s the easiest way but you have to make two users one for notification with email and one for sms.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

The notify-by-sms command is inserted at the user definition
and that’s it.

Didn’t get this one. Which version of check_mk do you use?

Or is that done directly in contact file wato has generated?

Thanks

Frank

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 12:05
An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de

Betreff: Re: [Check_mk (english)] sms notification

To your second posting - the contact definition can be done completely inside wato.

What i do for SMS notification is - create a contact for SMS put it inside a group and assign the group to the wanted services/hosts.

The notify-by-sms command is inserted at the user definition and that’s it.

Negative point you need two contacts one for normal notification and one for sms.

If you write some notification scripts it is possible to do this all with one contact.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other
way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for
that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group
sms via the pager number of these users. This spares me from editing every users contact for the use of sms.

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over ..

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails.
I my case I’ll use sms only in special cases (internet connection fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$ 

@$DATETIME$ Info: $OUTPUT$’

    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms

     command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info:

$OUTPUT$"

    }

and the contact:

# sms contact definition

define contact{

        contact_name                    admin_sms

    alias                           Admins SMS
        service_notification_period     24x7

    host_notification_period        24x7
        service_notification_options    w,u,c,r

    host_notification_options       d,u,r
        service_notification_commands   notify-by-sms

    host_notification_commands      host-notify-by-sms
        email                           49118999xxx

    }

Question is can/should some of these definition be done in WATO, or doI have to do it all with
main.mk “extra_nagios_conf +=” mechanism ?

Von:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail
notification is useless. I did that all directly into nagios and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment:
http://www.monitoring-portal.org)

Frank Lienhard

N­eos**IT GmbH

Schachtweg 1

38440 Wolfsburg

Tel.
+49 5361 83494-32

Fax
+49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny


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

Still no success. I did this:

Define a command in check_mk/conf.d/sms.mk, which results in these lines in :~/etc/nagios/conf.d/check_mk_objects.cfg:

# sms service command

define command {

  • command_name    notify-service-sms*
    
  • command_line    /usr/bin/smssend $CONTACTPAGER$ '$SERVICEDESC$ auf $HOSTALIAS$ State: $SERVICESTATE$  @$DATETIME$ Info: $OUTPUT$'*
    

}

···

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 14:24
An: Lienhard, Frank
Betreff: Re: [Check_mk (english)] sms notification

With version 1.2.0p3 it looks like the following way.

Define your own command inside one of you manually generated config files → misccommand.cfg or something else.

Then go to the “Users & Contacts” there you will find in the section “Notifications” of every user the point “Notification Command for Hosts” and the same with Services.

There you have to insert the notification command defined before in the config file.

That’s the easiest way but you have to make two users one for notification with email and one for sms.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

The notify-by-sms command is inserted at the user definition and that’s it.

Didn’t get this one. Which version of check_mk do you use?

Or is that done directly in contact file wato has generated?

Thanks

Frank

Von: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Gesendet: Mittwoch, 23. Januar 2013 12:05
An: Lienhard, Frank
Cc: checkmk-en@lists.mathias-kettner.de

                        **Betreff:** Re: [Check_mk (english)] sms notification

To your second posting - the contact definition can be done completely inside wato.

What i do for SMS notification is - create a contact for SMS put it inside a group and assign the group to the wanted services/hosts.

The notify-by-sms command is inserted at the user definition and that’s it.

Negative point you need two contacts one for normal notification and one for sms.

If you write some notification scripts it is possible to do this all with one contact.

br

Andreas

2013/1/23 Lienhard, Frank Frank.Lienhard@neos-it.de

I just read through the check_mk flexible notification document:

http://mathias-kettner.de/checkmk_flexible_notifications.html

From what I understand is, that I get flexible notification on “per user” basis. But in some cases it would be nicer to have it the other way round e.g.:

I have some host/service that should notify send the notification ALLWAYS as sms (network down or similar). So the CRIT notification for that host should pass the way of notification to the user.

That way I would be able to define a usergroup sms, a host tag sms and any host going critical with this tag notifies all users of the group sms via the pager number of these users. This spares me from editing every users contact for the use of sms.

**Von:**checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Mittwoch, 23. Januar 2013 09:14
An: checkmk-en@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] sms notification

OK my question wasn’t that clear, so I’ll start over ..

I installed the smstools on my server (yum install smstools for a centOS/RedHat system)

This howto (german):

http://www.nagios-wiki.de/nagios/howtos/smstools

descripes how to use it with nagios directly (using some additional perl scripts to avoid mass-sending of sms in case of massive fails. I my case I’ll use sms only in special cases (internet connection fail/ powerfail). So basicly needed are the command definitons

‘notify-by-sms’ command definition

define command{

    command_name    notify-by-sms

    command_line    /usr/bin/smssend $CONTACTEMAIL$ '$SERVICEDESC$ auf $HOSTNAME$ State: $SERVICESTATE$  @$DATETIME$ Info: $OUTPUT$'

    }

‘host-notify-by-sms’ command definition

define command{

    command_name    host-notify-by-sms

    command_line    /usr/bin/smssend $CONTACTEMAIL$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$DATETIME$ Info: $OUTPUT$"

    }

and the contact:

# sms contact definition

define contact{

        contact_name                    admin_sms

    alias                           Admins SMS
        service_notification_period     24x7

    host_notification_period        24x7
        service_notification_options    w,u,c,r

    host_notification_options       d,u,r
        service_notification_commands   notify-by-sms

    host_notification_commands      host-notify-by-sms
        email                           49118999xxx

    }

Question is can/should some of these definition be done in WATO, or doI have to do it all with main.mk “extra_nagios_conf +=” mechanism ?

**Von:**checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de] Im Auftrag von Lienhard, Frank
Gesendet: Dienstag, 22. Januar 2013 14:40
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] sms notification

On my old nagios installation I once configured notification via sms, which was used to notify me if the internet link was down and similar cases in which mail notification is useless. I did that all directly into nagios and its config files. Now I’d like to integrate this, but using check_mk/wato as much as possible.

I’m not sure if this is doable. Is the “pager” row in the contacts menu of WATO mend for this?

(my main source/starting point is down at the moment: http://www.monitoring-portal.org)

Frank Lienhard

N­eosITGmbH

Schachtweg 1

38440 Wolfsburg

Tel. +49 5361 83494-32

Fax +49 5361 83494-94

mailto:frank.lienhard@neos-it.de

http://www.neos-it.de/

Handelsregister: Amtsgericht Braunschweig, HRB 203557

Geschäftsführer: Sven Wosny

_______________________________________________

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