Automatically generating multiple service definitions

Subhendu Ghosh sghosh at sghosh.org
Thu Nov 6 02:15:09 CET 2003


On Tue, 4 Nov 2003, Sam Stickland wrote:

> Hi,
> 
> I'd like to be able generate service definations from an external program
> when nagios starts and also while it is running.
> 
> For example, I have an external program that creates SMPP connections to
> other servers on demamd. Currently I have a nagios plugin that contacts the
> external program and checks that all the SMPP connections that it is using
> are bound correctly.
> 
> But it exists only as a single service. This causes problems if one
> connection drops, and then another some time afterwards. The service will go
> into the critical state on the first drop, so the second one doesn't issue
> an alert. Also, as a single service there's only one location for comments,
> scheduled downtime, disabling of notifications etc.

Have you considered state stalking?
http://nagios.sourceforge.net/docs/1_0/stalking.html

> 
> I'd like to be able to write an external program that regulary scans for how
> many connections there are, and inserts and removes service definations as
> appropiate.

How are you sure that the SMPP connectiosn are all authorized - perhaps 
you should consider a min/max threshold on the number of open connections 
by time of day - or other criteria that makes sense.


> 
> This would be useful for a variety of other services, eg. BGP session state,
> switch port status etc.
> 
> How should I go about this? The solution that comes to mind is a
> cron-scheduled script that checks the number of services, compares it to
> previous state and if it's changed, regenerates a configuration file and
> issues a "nagios reload".
> 
> It seems like a fairly generic solution should be possible. Does this
> already exist? Would there be interest in it if I wrote one?
> 
> Sam

-- 

-sg



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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