service checks and timeperiods
Lori Adams
ladams at cloudmark.com
Wed Jun 8 21:26:41 CEST 2005
Below are my configurations, and the error I get when doing a verify.
define service {
use generic-service-template
host_name bar
service_description doneQ
#service_description doneQ-morn
check_command check_doneq!500
contact_groups r2-admins
check_period 5am-to-10am
normal_check_interval 5
}
define service {
use generic-service-template
host_name bar
service_description doneQ
check_command check_doneq!200
contact_groups r2-admins
check_period all-but-5am-to-10am
normal_check_interval 5
}
Error: Service 'doneQ' on host 'bar' has already been defined
Error: Could not register service (config file
'/srv/http/nagios/etc/services.cfg', line 467)
What I want is for in the UI, there should be one visible check.
Currently in the UI, it says doneQ, and doneQ-morn (see comment in first
config), as I have to prepare two different checks because of the
different thresholds.
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Andreas
Ericsson
Sent: Wednesday, June 08, 2005 11:44 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] service checks and timeperiods
Lori Adams wrote:
> Sometimes there is a need to run the same check but with different
> thresholds depending on time of day.
>
> Currently, I have to create two separate checks with a different name
> for each. What would be nice would be the ability to do something
like
> this:
>
You can. Just s/timeperiod/check_period/ and you're good to go.
notification_period is also a viable option.
> define service {
>
> use generic-service-template
>
> host_name bar
>
> service_description check
>
> check_command do_check!10!20
>
> timeperiod workhours
>
> contact_groups foo
>
> }
>
> define service {
>
> use generic-service-template
>
> host_name bar
>
> service_description check
>
> check_command do_check!100!200
>
> timeperiod nonworkhours
>
> contact_groups foo
>
> }
>
>
>
> Then in the web interface, it would only display "check", and then run
> the correct check based on time.
>
> Currently I have to create checkA and checkB, and both are displayed
in
> the UI, even though one won't be checked for the next 10 hours or so.
>
> Does anyone know of a way to do this?
>
>
>
> Thanks,
>
> Lori
>
>
>
>
>
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you
shotput
a projector? How fast can you ride your desk chair down the office luge
track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
More information about the Users
mailing list