Time based WARN/CRIT values
Subhendu Ghosh
sghosh at sghosh.org
Sat Sep 7 05:41:40 CEST 2002
On 6 Sep 2002, Karl DeBisschop wrote:
> On Fri, 2002-09-06 at 12:07, Furnish, Trever G wrote:
> >
> > > From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
> > > On Thu, 5 Sep 2002, Jeremy Tinley wrote:
> > >
> > > > Is there a way to change parameters based on time of day without
> > > > hardcoding it into the script.
> > > >
> > > > I have a process that's allowed to get a little more
> > > > out-of-control at
> > > > night. I don't want the pager going off with the same
> > > > thresholds that
> > > > it does during the day, while I'm at work.
> > > >
> > > > Currently, I have 2 service checks, process and process-night.
> > > > Process-night has higher critical and warning values. It's also
> > > > configured to check and notify during nonworkhours. Same
> > > > is true for
> > > > the process service check.
> > > >
> > > > Did I pretty much hit the workaround, or is there something
> > > > more obvious
> > > > I'm missing?
> > >
> > > You are pretty much on target. The plugins have no concept
> > > of time. so
> > > two different definitions would be needed...
> > >
> > > -sg
> >
> > That's right, of course, but IMHO it's less than optimal conceptually
> > because you end up with "two" services instead of one, which throws off both
> > the user interface and the reporting ability. What might be the best way to
> > change nagios to deal with that? Are there any related changes in CVS?
> > Here's an idea - I wish I had the time and skill to code it. :-(
> >
> > Perhaps the template-based config file format could be extended such that
> > services can have properties grouped by timeperiods
> >
> > So an example would be:
> >
> > define service{
> > use mytemplate
> > hostname host1,host2,host3
> > service_description PING
> > check_command check_ping
> > define optgroup_period{
> > valid-periods workhours
> > notification_interval 10
> > notification_options wucr
> > contact_groups unixadmins
> > }
> > define optgroup_period{
> > valid-periods nonworkhours
> > notification_interval 60
> > notification_options cr
> > contact_groups operators
> > }
> > }
>
> I'm trying to code a negation wrapper plugin right now, so every hammer
> I see sort of looks like a plugin wrapper. But here goes...
>
> There is really no reason why a plugin couldn't understand time. But
> none of us have enough time as is. A single wrapper could be defined to
> take lists of time periods and arguments. A little kludgey, but it
> probably can be made to work.
>
> Now it's time for people to call me crazy...
>
> --
> Karl
>
Crazy.
So what are the input - a timeperiod within which a real check is made,
otherwise returns an OK - with verbiage about no checks scheduled for
current timeperiod?
Glad you mentioned the negation wrapper - I was fleshing out one as well
in perl and trying to get handle around the "spaces in arguments" issue
with perl at the same time.
I'll let you work on that while I take a look at the memory leakge in
check_snmp.
--
-sg
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
More information about the Users
mailing list