NagiosQL on Debian
Package Info
Distribution: Debian Lenny
Release:
NagiosQL 3.0.3
Package Maintainer:
Wolfgang Barth
Homepage:http://logfile.swobspace.net/archives/4

This is just a translated version of Wolfgangs blog post. To read the original german version of this document just follow the link above.

Installation
Add the following to your /etc/apt/sources.list:

# — debian.swobspace.net
deb http://debian.swobspace.net lenny main
deb-src http://debian.swobspace.net lenny main

If you want to download only NagiosQL from this repository you need to amend the Pin-Priority at /etc/apt/preferences (if it not exists, create a new file):

Package: *Pin: origin debian.swobspace.netPin-Priority: 200Package: nagiosqlPin: origin debian.swobspace.netPin-Priority: 600Pin-Priority 200 reduces the priority for all files of this repository. The priority of the official debian repositories are set to 500 (default) and therefore more important. So if you want to download NagiosQL from this repository, just set the priority to 600 only for this package. You can check your modifications by using apt-cache policy.

To avoid annoying key warnings, you should import the public key by using:

wget http://www.swobspace.net/wob@swobspace.net.pub.asc -O- | apt-key add -

Now you are ready to install NagiosQL via:

apt-get update && apt-get install nagiosql

Configuration
Note: The used paths are the defaults. Please amend to reflect your customized installation!

1.Activate the Web Installation Wizard:

touch /usr/share/nagiosql/htdocs/install/ENABLE_INSTALLER

2.Launch the Web Installer and initiate the database connection (Please note, the root password to your MySQL database is required during the installation!)
3.After a successful installation you need to remove the “Enabler”:

rm -f /usr/share/nagiosql/htdocs/install/ENABLE_INSTALLER

4.Login to the NagiosQL frontend and verify the paths at Administration => Domains => localhost (should work with a default Debian Nagios Installation).
5.Amend your Nagios configuration (nagios.cfg), so NagiosQL gets full control of the objects. Just insert one entry:

cfg_dir=/etc/nagiosql/domains/localhost

6.At this point you may import existing Nagios configurations by copying those files to /etc/nagios/import (including the configuration at /etc/nagios-plugins/config). Now you can use the Importer by navigating to Tools => Data import.
7.Check you configuration, Restart Nagios (both via Tools => Nagios Control) and feel well.
WARNING: This package is setting up readonly-Access to the nagios.cfg and cgi.cfg. If you want to amend those files via NagiosQL you need to amend the permissions manually.