[Nagiosplug-devel] Auxiliary files required by plugins and other questions

sean finney seanius at seanius.net
Fri Jul 22 08:41:40 CEST 2005

hi paul,

On Tue, Jul 19, 2005 at 10:58:56PM +0100, Paul L. Allen wrote:
> The first question arises from the fact that I need an auxiliary file
> and I don't know of any officially-sanctioned place to put it.
> Specifically, I want the eicar test 'virus' so that I can run clamdscan
> on it and check that it is identified as a virus.  So where to put it?
> If the plugin makes it into the standard distribution then configure can
> create a directory for it, such as /usr/local/nagios/share, or
> /opt/nagios/share, or whatever, in a way that accommodates custom and
> practise on various distros.  But until that happens I'd like to know
> where to put the eicar file. 

i'd say ditch a default place and provide a cmdline flag to specify the file.

> So far this is the only plugin or plugin-to-be that I know of that
> requires something like this, but I'd rather the developers make a de
> jure decision rather than me set a de facto precedent.  "Shove it in
> libexec" or "we'll have configure create a share/plugins sub-dir if
> needed" or "shove it here" or "$%#! off" are the alternative answers.
> Decide amongst yourselves and let me know. 

yeah, there are a couple ones close to this, like check_rrd, which
i believe has the rrd location specified via cmdline.  i think others
have been written that are more stateful and not accepted because of it.

> The third question is not relevant to my check_clamav plugin-to-be but
> I can see that the question might arise in the future and it is related
> to my previous questions.  What if a plugin needs some sort of
> configuration file?  What I'm thinking of is a plugin that requires
> multiple options for each host it checks, so many options that it's
> impractical to specify them individually in service definitions, so that
> the plugin refers to the config file and uses host X service Y to pick up
> the required info.  We pretty much have this situation with one of the
> contributed MS SQL checks which uses freetds - you specify a server in
> the check and freetds looks up the details of the server.  If this were
> converted to some sort of native check then for people checking many
> servers it would be sensible to have a configuration file similar to the
> freetds one. 

if either freetds or ms sql has a standard configuration file format
(for example, like mysql has my.cnf format files)  i think providing a
cmdline option to use it is fairly acceptable for situations where you
don't want to specify all the info via the cmdline.  

> The obvious place to put such a config file would be
> /usr/local/nagios/etc (can I stop mentioning 'or equivalent on exotic
> flavours of *nix' yet?) but I really dislike the idea of polluting that
> directory with stuff specific to individual plugins.  There's no rush in
> answering this one because (as far as I know) the need has yet to arise.
> But maybe it would be a good idea to come up with an answer in advance
> while dealing with related issues (like where do I put my eicar file). 

i really think the best approach is to not have a hardcoded location
(most distributions providing nagios plugins use different locations
anyway) and instead provide a way via the cmdline to specify said

> The fourth question is what do I do with a readme that is essential to
> the plugin?  The easiest, and most sensible, and most accurate, way of

i guess put it in the documentation somewhere :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20050722/1c77d6e5/attachment.sig>

More information about the Devel mailing list