Nagios NSCA

From SME Server
Revision as of 15:45, 10 May 2010 by Timn (talk | contribs)
Jump to navigationJump to search


Edit-find-replace.png Not reviewed:
This howto or contrib has not been reviewed and might contain code that could harm your installation. For more information on the review process have a look at the Development Review page.


Maintainer

Michael Weinberger


Introduction

This document describes the installation of Nagios Distributed Monitoring (NSCA).


Warning.png Warning:
This is untested and may not work as expected


Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page


Download

Download the packages and files from http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/Nagios3/packages/ manually or run the the script wgetall to download all in one go.

bash < wgetall

Installation

Configure the dag repositoy

The following command will configure the dag repository on SME Server. EDIT NOT COMPLETE!


To create an entry in the database for the epel repository we open put the following commands in a terminal window or in a shell window:

/sbin/e-smith/db yum_repositories set epel repository \

Name 'SME Server - epel' \
BaseURL 'http://<http://download.fedoraproject.org/pub/epel/7/$basearch' \
EnableGroups yes \
GPGCheck yes \
Visible no \
status disabled

To enable the changes:

    signal-event yum-modify

Just to be sure, give yum a fresh start:

    yum clean all

After adding it to the database we have to update the changes to the configuration file:

signal-event yum-modify


NSCA installation (Distributed Monitoring)

Installation of a distributed server
/usr/bin/yum --enablerepo=dag install \
 nagios-plugins \
 nagios-plugins-nrpe \
 nagios-plugins-setuid \
 perl-Config-Tiny
/usr/bin/yum --enablerepo=dag localinstall \
 smeserver-nagios-nsca-*.noarch.rpm \
 smeserver-nagios-backup-*.noarch.rpm \
 perl-Nagios-Plugin-*.noarch.rpm \
 smeserver-nagios-plugins-*.noarch.rpm \
 nagios-plugins-generic-*.noarch.rpm \
 nagios-plugins-temptrax-*.el4.rf.i386.rpm \
 nagios-of-plugins-*.noarch.rpm
Configuration of a distributed server

Configure the distributed server by editing the client config file /etc/nagios/send_nsca.cfg. Read more here.

Required installation on the central Nagios server
/usr/bin/yum --enablerepo=dag localinstall smeserver-nagios-nsca-*.noarch.rpm
NSCA configuration on the central Nagios server

Configure the TCP wrapper.

config set nsca service
config setprop nsca HostsAllow "127.0.0.1 DISTRIBUTED_SERVER_IP"
expand-template /etc/hosts.allow

Configure the NSCA service by editing the config file /etc/nagios/nsca.cfg. Read more here. Restart the service to make the configuration effective:

service nsca restart

Uninstall

This removes the installed Nagios packages.

service nsca stop
rpm -e \
 nagios \
 nagios-nsca \
 nagios-plugins-nrpe \
 smeserver-nagios-nsca \
 smeserver-nagios-backup \
 nagios-of-plugins \
 nagios-plugins-generic \
 nagios-plugins-setuid \
 nagios-plugins-temptrax \
 perl-Nagios-Plugin \
 smeserver-nagios-plugins-mysql
expand-template /etc/hosts.allow