[Nagiosplug-devel] [RFC] Plugins config file
sean finney
seanius at seanius.net
Wed Oct 18 18:11:12 CEST 2006
hey ton,
On Wed, 2006-10-18 at 16:20 +0100, Ton Voon wrote:
> Agreed. I want to deprecate utils.pm as soon as possible in favour of
> Nagios::Plugin. There's not a huge amount of functionality in there
> anyway, as most people have already noted.
>
> > i've also always felt that some of the information in these files
> > really
> > ought to be treated more as configuration options as opposed to
> > library
> > settings. for example $PATH_TO_FOO is something that the local
> > admin
> > might want to change.
> >
> >
> > so if most of the utils.pm functions are going into Nagios::Plugin,
> > my
> > thinking was that the other stuff could be incorporated into this
> > scheme.
>
>
> I never saw the point of $PATH_TO_FOO variables. I would just call
> system() without the full path, no?
ideally if you have the path, you can avoid system in favor of execle()
or similar, which saves you a fork/exec call. i *think* the np_runcmd
functions do this, for example.
> Otherwise, if we have this ini configuration file, we could have a
> stanza like:
>
>
> [main]
> path_to_rpcinfo=/usr/sbin/rpcinfo
> path_to_lmstat=
> path_to_smbclient=/usr/bin/smbclient
> path_to_mailq=/usr/bin/mailq
> path_to_qmail_qstat=
>
> Values added by configure, of course.
i was thinking something along those lines. at risk of exploding
"feature creep", i could also suggest some other stuff we could
throw in there, such as default paths, environment variables, etc.
but maybe we should nip this in the bud for now and decide if its
the way we want to go, and implement the meat of it for the reason
that we really want it first.
> I've just thought, if this ini file is created by the
> nagios-plugins ./configure, how does Nagios::Plugin know where it
> resides? Would it have to check various possible locations?
i would suggest a using couple reasonable defaults, and then provide
some way to specify an override from this at build-time. i'm not too
familiar with CPAN but i imagine there must be a way to do that :)
sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <http://nagios-plugins.org/archive/devel/attachments/20061018/bf661d1c/attachment.sig>
More information about the Devel
mailing list