Nagios - NagiosQL Install

From wiki.kungfootek.net
Jump to: navigation, search

You installed according to the Centos - Minimal Install and Post config right?

pecl install -f ssh2
touch /etc/php.d/ssh2.ini
echo extension=ssh2.so > /etc/php.d/ssh2.ini
/etc/init.d/httpd graceful

Install Mysql-server if you're not using a separate server for SQL

yum install mysql-server

You will need mysql though.

yum install mysql php-mysql

Create database, user and grant permissions.

mysql> create database nagiosql1;
mysql> create user 'nagiosql1uzr'@'localhost' identified by 'rzullqsoigan';
mysql> grant all privileges on nagiosql1.* to 'nagiosql1uzr'@'localhost' identified by 'rzullqsoigan';
mysql> flush privileges;

Save the account information. You will need it later. Edit php.ini and set Timezone to America/Chicago

Unpack the archive into a folder on your webserver and visit the install page. Check and satisfy requirements. Here's a few things you will need. You should know how to do this...

Create nagiosql user, and include that user in the nagios group, include nagios in the nagiosql group as well. You should know how to do this too.

make /etc/nagiosql folder - Set owner, and perms 0777

Nagios base folder:

/usr/local/nagios/etc

In NagiosQL Define Config Targets as follows. Some of these may need work.

Base directory /etc/nagiosql/	
Host directory /usr/local/nagios/etc/hosts/		
Service directory /usr/local/nagios/etc/services/		
Backup directory /usr/local/nagios/etc/backup/		
Host backup directory /usr/local/nagios/etc/backup/hosts/	
Service backup directory /usr/local/nagios/etc/backup/services/		
Nagios base directory /usr/local/nagios/etc/	
Import directory /usr/local/nagios/etc/objects/		
Picture base directory	/usr/local/nagios/share/images/logos/	

Nagios command file /usr/local/nagios/var/rw/nagios.cmd	
Nagios binary file /usr/local/nagios/bin/nagios
Nagios process file /usr/local/nagios/var/nagios.lock	
Nagios config file /usr/local/nagios/etc/nagios.cfg		


Permissions

chmod 775 /usr/local/nagios/etc/nagios
chmod 664 /usr/local/nagios/etc/nagios.cfg
chmod 664 /usr/local/nagios/etc/cgi.cfg
chown apache.nagios /usr/local/nagios/etc/* -R


NagiosQL Configuration

chmod 6755 /etc/nagiosql
chmod 6755 /usr/local/nagios/etc/hosts -R
chmod 6755 /usr/local/nagios/etc/services -R
chown apache.nagios /etc/nagiosql -R


NagiosQL Backup Configuration

chmod 6755 /usr/local/nagios/etc/backup -R
chown apache.nagios /etc/nagiosql/backup -R

Amend already existing files

chmod 644 /usr/local/nagios/etc/*.cfg
chown nagios.apache /usr/local/nagios/var/rw/nagios.cmd 


The Nagios binary must be executable by the Apache user:

chown nagios.apache /usr/local/nagios/bin/nagios
chmod 750 /usr/local/nagios/bin/nagios


POST INSTALL NOTES:

NagiosQL has the ability to import functional configuration files. Pay attention to the command import folder. This makes a transition to NagiosQl very easy to do. I keep backups of my config files for these cases. Things like Alerting periods, basic commands etc.