is it possible to serialize some checks?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

is it possible to serialize some checks?

Postby ilsuonogiallo » Fri Nov 10, 2017 10:39 am

Hi all,

I am trying to find out whether it is possible to tell Nagios to serialize only *some* service checks.

I am running Nagios® Core™ Version 4.3.2 to monitor different hosts and services; a few service checks are quite "heavy" (they run some fairly complex powershell scritps on the same remote host), hence I would like to serialize only these checks.

Is it possible to tell Nagios that some service checks must be run serially, without forcing Nagios to seralize *all* service checks?
If not, is it possible to tell Nagios that any service checks *on a certain host* must be run serially?

Thanks
Andrea
ilsuonogiallo
 
Posts: 2
Joined: Thu Nov 09, 2017 4:49 am

Re: is it possible to serialize some checks?

Postby npolovenko » Fri Nov 10, 2017 3:54 pm

Hello, @ilsuonogiallo. MAXIMUM CONCURRENT SERVICE CHECKS can only be set to a certain number but you can't define it for separate services as far as I know. Take a look at this plugin: https://exchange.nagios.org/directory/P ... ti/details
You could run the two heavyweight checks through the plugin and have all the other checks run unserialized.
User avatar
npolovenko
 
Posts: 354
Joined: Mon May 15, 2017 5:00 pm

Re: is it possible to serialize some checks?

Postby ilsuonogiallo » Mon Nov 13, 2017 5:51 am

unfortunatly, that does not match completely my environment: these plugin output is quite long, hence folding all the checks in a single "service" and having the output truncated would be misleading and confusing
ilsuonogiallo
 
Posts: 2
Joined: Thu Nov 09, 2017 4:49 am

Re: is it possible to serialize some checks?

Postby mcapra » Mon Nov 13, 2017 11:10 am

I don't know of anything in Nagios Core that would support this.

I would think a trivial lockfile would be sufficient for this use case, but it would have to be implemented in the respective plugins' code. You'd also need to be mindful of waits in your code due to the service_check_timeout and host_check_timeout settings in the main nagios.cfg file. Assuming locking exists among the "special" plugins, If you wanted checks using those "special" plugins to completely lock Nagios Core, eg put everything else "on hold" until those checks resolve, there's some back-end commands you could leverage:

https://old.nagios.org/developerinfo/ex ... mand_id=67
https://old.nagios.org/developerinfo/ex ... mand_id=41
https://old.nagios.org/developerinfo/ex ... mand_id=68
https://old.nagios.org/developerinfo/ex ... mand_id=42

Though fail-tolerant locking is, in general, a non-trivial problem to solve :)
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2891
Joined: Thu May 05, 2016 3:54 pm

Re: is it possible to serialize some checks?

Postby dwhitfield » Mon Nov 13, 2017 1:54 pm

mcapra wrote:I don't know of anything in Nagios Core that would support this.


On the note above, it may be possible to get something like this in Core 5. You can submit a feature request at https://github.com/NagiosEnterprises/na ... issues/new . Make sure you like to this thread so that the developers have a full picture of what you are trying to do.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3952
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 6 guests