You are not logged in.

#1 2005-09-14 22:52:28

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Need help with Nagios package

I'm attempting to build a Nagios package, and I'm pretty close, actually have it installed and running, BUT...

when I run the web interface, it calls some CGI files, and I get an error that it can't find them.  It can't find them because it's looking for them in /repo/packages/nagios/usr/sbin/nagios/sbin  (with '/repo/packages/nagios' being our local repo where the package was built, and '/usr/sbin/nagios/sbin' being where it should be looking for the CGI files.)

I cheated by setting up that path and copying the files over, just to get it working, but obviously my PKGBUILD needs some help.  I think the problem is pretty simple (just like me) and probably has to do with a configure prefix (with 'cgiurl' being the likely culprit.)

Here's my package build, any help would be greatly and fantasticly appreciated.

pkgname=nagios
pkgver=1.2
pkgrel=6
pkgdesc="host and service monitor designed to inform of network problems"
url="http://nagios.org/"
license=()
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
source=('http://internap.dl.sourceforge.net/sourceforge/nagios/nagios-1.2.tar.gz')
md5sums=('414d70e5269d5b8d7c21bf3ee129309f')

build() {
  mkdir $startdir/pkg/usr
  mkdir $startdir/pkg/usr/sbin
  mkdir $startdir/pkg/usr/sbin/nagios
  mkdir $startdir/pkg/etc
  mkdir $startdir/pkg/etc/rc.d
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=$startdir/pkg/usr/sbin/nagios --with-cgiurl=/nagios/cgi-bin --with-html=/nagios/ --with-nagios-user=nagios --with-nagios-grp=nagios --with-init-dir=$startdir/pkg/etc/rc.d
  make all
  make install
  make install-init
  make install-config
}

Thanks much

Offline

#2 2005-09-14 23:03:31

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Need help with Nagios package

grep -Rl "{$startdir}/usr/sbin/nagios/sbin" $startdir/pkg | xargs sed -i "s#{$startdir}/usr/sbin/nagios/sbin#/usr/sbin/nagios/sbin#g"

maybe try adding the above to the end of the pkgbuild..right after make install-config

/me shrugs


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-09-15 18:57:16

manica
Member
Registered: 2004-11-20
Posts: 28

Re: Need help with Nagios package

When you have a Nagios PKGBUILD ready, could you please make it available to others?  That would be great.

Thank you,
Darin

Offline

#4 2005-09-16 04:15:33

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Need help with Nagios package

Nagios is a damn hard thing. Kept me ages to configure and keep up to date in a large network environment.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#5 2005-09-19 16:33:50

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Re: Need help with Nagios package

manica wrote:

When you have a Nagios PKGBUILD ready, could you please make it available to others?  That would be great.

Thank you,
Darin

Definitely, if I ever get it working properly.  However, since I have it working it working well enough for our purposes, I won't be putting a whole lot of time in the PKGBUILD.

Thanks to Cactus for the advice above, but the build failed (don't have the error message handy.)

This was for Nagios 1.2, I may try building a package for Nagios 2.0b4 and see if I have any luck.

Offline

#6 2005-10-19 21:19:26

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Re: Need help with Nagios package

OK, I'm real close -- I think I've got a working PKGBUILD, but still need to test it some more.  I'm working with the version 2 beta (which should become an RC real soon) but I think it should work with the stable release (1.2.)

I have a stupid question though - nagios requires a webserver of some kind to be of any use.  It doesn't necessarily have to be apache, although that's probably what's easiest and what I'm using. Should I include apache as a dependency? I'm thinking not.

Offline

Board footer

Powered by FluxBB