Re: [Nagios-devel] Using utils.h within executables written in

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Using utils.h within executables written in

Post by Guest »

Hey Marc et al,

Thanks for the speedy response. I should start by saying I am running
the latest VM trial release of NagioXI. I do not know if that is
significant or not but I can say that in the libexec folder (which I
think you were referring to) which contains all the plugins, there is no
plugins folder. In the libexec folder itself, I have only utils.sh (not
sure what language this is) and utils.pm (php file I think). But
definately no utils.h file (nor utils.c nor utils.o etc for that
matter). Is there somewhere I could just download them from?

Also, for the second point, if I am just "including" utils.h from my C
application source code, does that mean I need to upload my source code
to Nagios and compile it on the Nagios server (so that utils.h is
accessible)? Apologies if this is a novice question.

Thanks Marc in particular, all your responses have been helpful to me.

Marc Powell wrote:
>
>
> On Tue, Mar 16, 2010 at 8:57 AM, Mohammed Murphy
> >
> wrote:
>
> One of the points mentioned is that the use of utils.h
> (for C-written plugins) was encouraged (perhaps even expected). I was
> unable to locate this file anywhere (neither on the Nagios server
> instance I am running nor on the Nagios help pages,/documentation
> etc).
> So firstly, I was hoping that I could be directed to where I could
> get a
> copy of it.
>
>
> It's in the plugins source code --
> /path/to/plugins-source/plugins/utils.h
>
> Secondly, I would like to know how a C application is supposed to link
> to it. Are we expected to use a static linking technique (i.e.
> copy and
> paste the utils.h/c source into our own C plugin and then compile)?
>
>
> Nobody does this that I've seen. Look at the source of the standard
> plugins. They all just '#include "utils.h"'.
>
> --
> Marc
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ------------------------------------------------------------------------
>
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked