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
is it possible to serialize some checks?
-
- Posts: 2
- Joined: Thu Nov 09, 2017 4:49 am
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: is it possible to serialize some checks?
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.
You could run the two heavyweight checks through the plugin and have all the other checks run unserialized.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 2
- Joined: Thu Nov 09, 2017 4:49 am
Re: is it possible to serialize some checks?
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
Re: is it possible to serialize some checks?
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
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
https://www.mcapra.com/
https://www.mcapra.com/
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: is it possible to serialize some checks?
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.mcapra wrote:I don't know of anything in Nagios Core that would support this.