build custom rpm with nagios-plugins and nagios-plugins-extras

Sean Dilda agrajag at dragaera.net
Fri May 7 15:24:24 CEST 2004


On Fri, 2004-05-07 at 08:44, Chris Armstrong wrote:
> Hi all
> 
> I'm trying to build a custom nagios-plugins rpm package for RedHat but there are some things i can't figure out.
> Don't tell me to use the existing RPM packages. My company won't allow it :-|
> 
> I have seen, that two packages are needed. One is nagios-plugins that contains the basic plugins and one is nagios-plugins-extras that contains the custom plugins like check_snmp.
> 
> I have seen, that check_snmp.c is also in the plugins directory of the nagios-plugins source and i can't find any nagios-plugins-extras tar.gz file anywhere on google or nagios.org.
> 
> Questions:
> -------------------------------------------------
> -> Does this mean that check_snmp and all of these plugins got included in to the nagios-plugins tar.gz file?

Yes

> 
> -> What do i need to build these extra plugins?

The reason for the extra plugins package is that these plugins have
special dependencies (snmpget, fping, mysql libs, etc).  So, they put
them all in a special package so that people could install all the other
plugins without having to worry about uncommon dependencies.  If you're
building your own package for only your use, I'd suggest just making one
package, and leaving out the plugins you don't need.

> 
> When i use the nagios-plugins.spec file that is included in the nagios-plugins source, then i get following error:
> 
> + umask 022
> + cd /usr/src/redhat/BUILD
> + cd nagios-plugins-1.3.0
> + DOCDIR=/var/tmp/nagios-plugins-buildroot/usr/share/doc/nagios-plugins-1.3.0
> + export DOCDIR
> + rm -rf /var/tmp/nagios-plugins-buildroot/usr/share/doc/nagios-plugins-1.3.0
> + /bin/mkdir -p
>  /var/tmp/nagios-plugins-buildroot/usr/share/doc/nagios-plugins-1.3.0
> + cp -pr INSTALL README REQUIREMENTS COPYING ChangeLog command.cfg /var/tmp/nagios-plugins-buildroot/usr/share/doc/nagios-plugins-1.3.0
> + exit 0
> Processing files: nagios-plugins-extras-1.3.0-1.9
> error: File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_mysql
> error: File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_pgsql
> error: File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_snmp
> error: File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_hpjd
> 
> 
> RPM build errors:
>     File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_fping
>     File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_mysql
>     File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_pgsql
>     File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_snmp
>     File not found: /var/tmp/nagios-plugins-buildroot/usr/lib/nagios/plugins/check_hpjd
> 
> When i read the INSTALL file from the source of nagios-plugins i see that you can specify different extras by using ./configure --enable-<something>. So i have tried to compile manually as following: ./configure --enable-check_snmp but this didn't work.
> I have additionally read that the enable options are documentated in the README file but couldn't find a description about this options.
> 
> Can you give me some hints on this?

IIRC the configure for building the plugins checks for the requirements
for those plugins, and doesn't build them if they're not there.  So, if
you want snmp, make sure net-snmp-utils is installed.  For the ones you
don't need, I'd recommend just removing them from your spec file.



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
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