Page 1 of 1

Nagios - on OSX Mountain lion server (10.8)

Posted: Sat Dec 15, 2012 12:22 pm
by Nosferatu
Hi folks,

I've been using splunk on OSX for some time and I came across the Nagios addon for Splunk. After I read up on what Nagios actually was I became interested in adding it to my tools.

I used to use macports for unix conversions but after reading up on Nagios in homebrew, wiped ports for homebrew. I've installed homebrew and tested by installing the old wget.

I'm still having issues getting this setup and with some major changes in revisions of server I think I've become confused with the tutorials found around the internets.

Does anyone know of a 10.8 server tutorial for getting nagios up and running either using homebrew or some other method?

I've created the command dir
and set launchctl to load on startup
I uncommented the php module in httpd.conf
and symlinked the sample config

This is where the problem appears to start... On OSX you have the 'Personal web sharing' that's fine, but on server server.app takes this over. I've tried getting around this, turning wikis off and even putting the wizard scripts on the web folder and running those..

http://labs.nagios.com/category/wizards-2/

I cant seem to get an interface to configure nagios. but when I run the following command the core does appear exist

Code: Select all

4development:~ ian$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nagios.plist
Password:
homebrew.mxcl.nagios: Already loaded
4development:~ ian$ 
I think I may have got myself confused with all this and the multiple tiger, lion tutorials floating about but does anyone have a clearer picture of this and can point me in the right direction?

cheers,
Ian.


Code: Select all

4development:~ ian$ brew install nagios
==> Downloading http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagio
Already downloaded: /Library/Caches/Homebrew/nagios-3.4.3.tar.gz
==> ./configure --prefix=/usr/local/Cellar/nagios/3.4.3 --sbindir=/usr/local/Cel
==> make all
==> make install
==> make install-config
==> make install-webconf
==> Caveats
First we need to create a command dir using superhuman powers:

  mkdir -p /usr/local/var/lib/nagios/rw
  sudo chgrp _www /usr/local/var/lib/nagios/rw
  sudo chmod 2775 /usr/local/var/lib/nagios/rw

Then install the Nagios web frontend into Apple's build-in Apache:

  1) Turn on Personal Web Sharing.

  2) Load the php module by patching /etc/apache2/httpd.conf:

    -#LoadModule php5_module        libexec/apache2/libphp5.so
    +LoadModule php5_module        libexec/apache2/libphp5.so

  3) Symlink the sample config and create your web account:

    sudo ln -sf /usr/local/Cellar/nagios/3.4.3/share/nagios.conf /etc/apache2/other/
    htpasswd -cs /usr/local/etc/nagios/htpasswd.users nagiosadmin
    sudo apachectl restart

Log in with your web account (and don't forget to RTFM :-)

  open http://localhost/nagios

==> Caveats
To load nagios:
    sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nagios.plist
==> Summary
/usr/local/Cellar/nagios/3.4.3: 371 files, 5.8M, built in 33 seconds
4development:~ ian$ 

Re: Nagios - on OSX Mountain lion server (10.8)

Posted: Tue Dec 18, 2012 5:19 pm
by slansing
Can you show us what documentation you were using I'd like to breeze over it and see what may be missing, or what could have gone wrong. Though OSX is not in our supported OS list we can try to help you.