Re: [Nagios-devel] External Command Ideas

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] External Command Ideas

Post by Guest »

On 02/28/2013 10:40 AM, Jochen Bern wrote:
> Hello everyone,
>
> in a current project, I have a need to override Nagios' check scheduling
> on specific occasions (*). Hence, I'm looking at what I can or (relevant
> point here) cannot do with external commands, as documented for 3.x.
> Since there's a new major version upcoming, I thought I might toss a
> couple thoughts this list's way, just in case you're taking suggestions ...
>
> -- I can CHANGE_NORMAL_SVC_CHECK_INTERVAL to have a service checked
> as often as interval_length and/or the scheduler permits, but I
> cannot tell Nagios to return to whatever the config files had set
> initially.
> -- I can SCHEDULE_* (or SCHEDULE_FORCED_*) single services or all
> services of a host, but not the members of a service group.
> (I guess that filtering for services in a non-OK state only is
> really a job for livestatus or the like, not Nagios.)
> -- I cannot touch a service's ATTEMPT counter ~= SOFT/HARD distinction,
> to possibly have Nagios' scheduler go through the retry_interval
> routine for me, unless I PROCESS_SERVICE_CHECK_RESULT an
> all-out-fake OK state.
> (I guess that incrementing via CHANGE_MAX_SVC_CHECK_ATTEMPTS *might*
> have the side effect of returning the service to SOFT non-OK, but
> again, there's no "return to config file value" available.)
>
> (*) Basically, I want all SLA relevant services that are still non-OK at
> the end of the standard maintenance window to be rechecked so that the
> non-OK state doesn't check_interval into the SLA relevant time more than
> necessary. Note that I intend to use avail.cgi to produce reports on SLA
> fulfilment, so I'll have to define a matching service group, anyway.
> FWIW, it's a 3.4.4 installed from repos.
>

Write an eventbroker module. It's not so hard, and since you're only
filling a very specific need with one or more very specific times you
shouldn't run into many problems. Object iteration is done more or
less the same in Nagios 4 as it's done in Nagios 3 btw, so you won't
run into huge issues if/when you decide to migrate.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked