Using utils.h within executables written in the C language

Michael Friedrich michael.friedrich at univie.ac.at
Tue Mar 16 17:50:50 CET 2010


Hi,

-------- Original Message  --------
Subject: Re: [Nagios-devel] Using utils.h within executables written in	the	C language
From: Mohammed Murphy <mohammed.murphy at tandberg.com>
To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
Date: 2010-03-16 17:19
> 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?

utils.sh - (ba)sh, shell script
utils.pm - perl library
utils.h - header file, can be found in the source of e.g. ndoutils, nagiosplugins

if you mean the one for the plugins, get nagiosplugins src instead or check git repo.

the vm trial of nagios xi does not contain the sources (maybe somewhere else but you might have to ask nagios enterprises support for that). if you need direct access to all sources, check on cvs of 
the oss components:

http://nagios.cvs.sourceforge.net/viewvc/nagios/
http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=tree;f=plugins;hb=HEAD

> 
> 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.

Depends how you want to distribute your application. If you consider compiling everything from scratch and then install it on the machine, you'll have to make sure to specify the location of utils.h 
during configure.
If you like to build your own packages (rpm/deb) you'll only need that on your package building host and then deploying and installing on the machine you want to. but you'll have to make sure then, 
that you are using the right version of e.g. utils.h when building the package.
If you depend on let's say another plugin like check_tcp best thing would be to patch existing nagiosplugins, test that and propose your patch to the upstream (if you like to or are allowed to).

Maybe you'll explain a bit what exactly you are thinking of regarding your plugin/application.

Kind regards,
Michael

-- 
DI (FH) Michael Friedrich
michael.friedrich at univie.ac.at
Tel: +43 1 4277 14359

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

------------------------------------------------------------------------------
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




More information about the Developers mailing list