Discussion:
[Nagios-users] Monitoring in different time periods
Seth Simmons
2008-04-03 18:34:32 UTC
Permalink
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way to
accomplish this?
Christian Schneemann
2008-04-03 18:46:47 UTC
Permalink
Post by Seth Simmons
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way to
accomplish this?
You can define timeperiods in the contacts definition. If I understood the
manual right, than a notification will only be sent to an contact if it's in
the timeperiod defined for this contact.
Have a look at [0].
Keep in mind that you have to set the timeperiods of the indian group
according to the timezone your nagios-server is in.




Greetings,
--
Christian Schneemann

-------------------------------------
SUSE LINUX Products GmbH,
Maxfeldstr. 5, D - 90409 Nürnberg

Phone:  +49 (0)911 - 740 53 0
e-mail: ***@suse.de
-------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex
HRB 16746 (AG Nürnberg)
Christian Schneemann
2008-04-03 18:48:27 UTC
Permalink
Post by Christian Schneemann
Post by Seth Simmons
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way to
accomplish this?
You can define timeperiods in the contacts definition. If I understood the
manual right, than a notification will only be sent to an contact if it's
in the timeperiod defined for this contact.
Have a look at [0].
Keep in mind that you have to set the timeperiods of the indian group
according to the timezone your nagios-server is in.
Greetings,
[0] = http://nagios.sourceforge.net/docs/3_0/timeperiods.html


Sorry for that...
Wojciech Kocjan
2008-04-03 18:44:20 UTC
Permalink
Post by Seth Simmons
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way to
accomplish this?
Hi,

You can simply add both India and non-India users to the same contact
groups you're currently using. India team will have their notification
timeperiod set to their working hours whereas the other team would have
the remaining hours as their notification timeperiod.
--
Wojciech Kocjan
Seth Simmons
2008-04-03 19:12:21 UTC
Permalink
I understand the first part about adding all to the same contact groups.
The second part I can't see how they would have their own hours, unless
I have a separate service defined? For example if I have this (below)
what line(s) would I need to add/modify? I'm thinking I would have to
have a different service defined for each check/notification period?

define service{
use generic-service
host_name servername
service_description Free Space on /
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 3
retry_check_interval 5
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options u,r
check_command check_nrpe!check_root
}

-----Original Message-----
From: Wojciech Kocjan [mailto:***@kocjan.org]
Sent: Thursday, April 03, 2008 2:44 PM
To: Seth Simmons; nagios-***@lists.sourceforge.net
Subject: Re: [Nagios-users] Monitoring in different time periods
Post by Seth Simmons
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way
to accomplish this?
Hi,

You can simply add both India and non-India users to the same contact
groups you're currently using. India team will have their notification
timeperiod set to their working hours whereas the other team would have
the remaining hours as their notification timeperiod.

--
Wojciech Kocjan
Yost, Karl
2008-04-03 19:21:06 UTC
Permalink
Post by Seth Simmons
-----Original Message-----
Sent: Thursday, April 03, 2008 3:12 PM
Subject: Re: [Nagios-users] Monitoring in different time periods
I understand the first part about adding all to the same contact groups.
The second part I can't see how they would have their own hours, unless
I have a separate service defined? For example if I have this (below)
what line(s) would I need to add/modify? I'm thinking I would have to
have a different service defined for each check/notification period?
define service{
use generic-service
host_name servername
service_description Free Space on /
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 3
retry_check_interval 5
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options u,r
check_command check_nrpe!check_root
}
You don't need multiple service checks, you need multiple contact
groups.
Group 1 - Hours 9-5
Group 2 - Hours 5-9

Thanks,
Karl
Post by Seth Simmons
-----Original Message-----
Sent: Thursday, April 03, 2008 2:44 PM
Subject: Re: [Nagios-users] Monitoring in different time periods
On Thu, 03 Apr 2008 20:34:32 +0200, Seth Simmons
Post by Seth Simmons
Currently I'm using the default 24x7 time for monitoring. We have a
support group in India where we want to shift monitoring there during
off hours. Since service definition is currently using 24x7, would I
have to create separate services for each time period since the
notifications would go to two different groups? What is the best way
to accomplish this?
Hi,
You can simply add both India and non-India users to the same contact
groups you're currently using. India team will have their notification
timeperiod set to their working hours whereas the other team would have
the remaining hours as their notification timeperiod.
--
Wojciech Kocjan
-----------------------------------------------------------------------
Post by Seth Simmons
--
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/market
Post by Seth Simmons
place
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Wojciech Kocjan
2008-04-03 19:23:33 UTC
Permalink
Post by Seth Simmons
I understand the first part about adding all to the same contact groups.
The second part I can't see how they would have their own hours, unless
I have a separate service defined? For example if I have this (below)
what line(s) would I need to add/modify? I'm thinking I would have to
have a different service defined for each check/notification period?
No,

I assume what you actually want is to:

1/ Monitor the service 24x7
2/ For India working hours, notify India
3/ For remaining hours, notify someone else

So, define single service, two contact groups and for India group members
configure them for Indiaworkinghours time period and for "someone else"
configure them for a timeperiod defining remaining hours.

Then if a problem comes in during Indiaworkinghours, India staff will get
the message. On remaining hours "someone else" will get the message.
--
Wojciech Kocjan
Seth Simmons
2008-04-03 19:57:20 UTC
Permalink
Ok I understand now.
I'm looking at this in the wrong place. I'm thinking I need to modify
the actual services, (which I will have to to some extent) though the
solution is in the contacts and timeperiods cfg. I just stumbled across
p.234 of the manual on adding the host/service notification_period. It
makes sense now.

-----Original Message-----
From: Wojciech Kocjan [mailto:***@kocjan.org]
Sent: Thursday, April 03, 2008 3:24 PM
To: Seth Simmons; nagios-***@lists.sourceforge.net
Subject: Re: [Nagios-users] Monitoring in different time periods
Post by Seth Simmons
I understand the first part about adding all to the same contact groups.
The second part I can't see how they would have their own hours,
unless I have a separate service defined? For example if I have this
(below) what line(s) would I need to add/modify? I'm thinking I would
have to have a different service defined for each check/notification
period?

No,

I assume what you actually want is to:

1/ Monitor the service 24x7
2/ For India working hours, notify India 3/ For remaining hours, notify
someone else

So, define single service, two contact groups and for India group
members configure them for Indiaworkinghours time period and for
"someone else"
configure them for a timeperiod defining remaining hours.

Then if a problem comes in during Indiaworkinghours, India staff will
get the message. On remaining hours "someone else" will get the message.

--
Wojciech Kocjan

Loading...