Project

General

Profile

Feature #52

Installing Nagios 3 on Debian/Ubuntu as ISPConfig3 Virtual Host

Added by Daniel Curtis over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Logging Server
Target version:
-
Start date:
01/23/2013
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:

Description

By default, Ubuntu will not configure Nagios upon installation. This guide will show how to install Nagios on an Ubuntu system running a common LAMP setup with ISPConfig 3

Install Nagios 3, Plugins, MySQL Support

sudo apt-get install nagios3 nagios-plugins nagios-nrpe-plugin ndoutils-nagios3-mysql
  • Set password for nagiosadmin user
  • Confirm password
  • Enter MySQL root password
  • Create Nagios database password

Setup host in ISPConfig

  • Navigate to the [Site] tab

Create a new site

[Domain]
  • Domain: monitor.example.com
  • Disable: CGI
  • Disable: SuExec
  • Enable: SSL
[Options]
  • Append to the following to the PHP basedir:
    :/usr/lib/cgi-bin/nagios3:/usr/share/nagios3/htdocs:/etc/nagios3/stylesheets
    
  • Add the following Apache directive (Taken from the /etc/nagios3/apache2.conf):
    # apache configuration for nagios 3.x
    
    ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
    
    # Where the stylesheets (config files) reside
    Alias /stylesheets /etc/nagios3/stylesheets
    
    # Where the HTML pages live
    # Changed "Alias" directive to "DocumentRoot" as Nagios 3 is installed via apt and is located outside the default web directory.
    DocumentRoot /usr/share/nagios3/htdocs
    
    <DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
        Options FollowSymLinks
    
        DirectoryIndex index.php index.html
    
        AllowOverride AuthConfig
        Order Allow,Deny
        Allow From All
    
        AuthName "Nagios Access" 
        AuthType Basic
        AuthUserFile /etc/nagios3/htpasswd.users
        require valid-user
    </DirectoryMatch>
    
    <Directory /usr/share/nagios3/htdocs>
        Options    +ExecCGI    
    </Directory>
    

At this point Nagios should work by going to monitor.example.com/.

#1

Updated by Daniel Curtis over 11 years ago

There was an issue where I was getting a 403 Forbidden error. The solution was simple, just reset the permissions of the web folder:

sudo chmod 755 /path/to/web

#2

Updated by Daniel Curtis over 11 years ago

I am getting an error stating:

DISK CRITICAL - /home/user/.gvfs is not accessible: Permission denied

This is an issue caused by the Gnome window manager, it is documented at Launchpad
The workaround to this is by adding -A -i '.gvfs' to the ends of the check_disk and check_all_disks commands in /etc/nagios-plugins/config/disk.cfg:

# 'check_disk' command definition
define command{
        command_name    check_disk
        command_line    /usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e -p '$ARG3$' -A -i '.gvfs'
        }

# 'check_all_disks' command definition
define command{
        command_name    check_all_disks
        command_line    /usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e  -A -i '.gvfs'
        }

#3

Updated by Daniel Curtis over 11 years ago

  • Tracker changed from Bug to Feature
#4

Updated by Daniel Curtis over 11 years ago

  • Description updated (diff)
#5

Updated by Daniel Curtis over 11 years ago

  • Description updated (diff)
  • Estimated time changed from 5.00 h to 1.00 h
  • Subject changed from Installing Nagios 3 on Ubuntu as ISPConfig 3 Host to Installing Nagios 3 on Ubuntu as ISPConfig 3 Virtual Host
#6

Updated by Daniel Curtis over 11 years ago

  • Private changed from Yes to No
#7

Updated by Daniel Curtis about 11 years ago

  • Project changed from GNet Solutions to 21
  • Subject changed from Installing Nagios 3 on Ubuntu as ISPConfig 3 Virtual Host to Installing Nagios 3 on Debian/Ubuntu as ISPConfig3 Virtual Host
#8

Updated by Daniel Curtis almost 11 years ago

  • Project changed from 21 to 57
#9

Updated by Daniel Curtis over 9 years ago

  • Project changed from 57 to GNU/Linux Administration
  • Category set to Logging Server

Also available in: Atom PDF