Obsolete Releases > SME 8.x Contribs

Nagios NRPE configuration

<< < (2/3) > >>

Gary Douglas:
NRPE SME8 Installation
Configure the dag repositoy

The following command will configure the dag repository on SME Server.

/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled


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

signal-event yum-modify

/usr/bin/yum --enablerepo=dag install \
 nagios-plugins \
 nagios-plugins-setuid \
 perl-Config-Tiny \
 perl-Class-Accessor


Copy nrpe rpm's and install

yum localinstall nagios-3.2.1-5.el5.rf.i386.rpm
yum localinstall nagios-nrpe-2.5.2-1.el5.rf.i386.rpm
yum localinstall nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm


vim /etc/nagios/nrpe.cfg

allowed_hosts=127.0.0.1,62.249.247.18


cd /etc/rc7.d

cp -s /etc/init.d/nrpe S95nrpe


port forward 5666 to localhost


vim /etc/e-smith/templates/etc/hosts.allow/nrpe

{
$OUT="nrpe: " . ($nrpe{HostsAllow} ? $nrpe{HostsAllow} : "127.0.0.1 62.249.247.18" );
}


 expand-template /etc/hosts.allow
 service nrpe restart

CharlieBrady:

--- Quote from: Gary Douglas on May 09, 2012, 07:10:45 AM ---vim /etc/e-smith/templates/etc/hosts.allow/nrpe

--- End quote ---

That should be:

mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow
vim /etc/e-smith/templates-custom/etc/hosts.allow/nrpe

thowden:
Hi All

I know this is an old thread but Garys instructions are excellent and still relevant for installing Nagios as a client only configuration.

Just expanding on the section in the instructions


--- Quote ---Copy nrpe rpm's and install

yum localinstall nagios-3.2.1-5.el5.rf.i386.rpm
yum localinstall nagios-nrpe-2.5.2-1.el5.rf.i386.rpm
yum localinstall nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm

--- End quote ---

The locations of the rpm's to download (at least as at now) before installing them are:

http://pkgs.repoforge.org/nagios/nagios-3.2.1-5.el5.rf.i386.rpm

http://pkgs.repoforge.org/nagios-nrpe/nagios-nrpe-2.5.2-1.el5.rf.i386.rpm

http://pkgs.repoforge.org/nagios-nrpe/nagios-plugins-nrpe-2.5.2-1.el5.rf.i386.rpm

I also made a few minor changes and included Charlie's comments in my blog post.

http://howden.net.au/thowden/2013/05/sme-server-as-a-nagios-nrpe-client-only/

cheers
Tony

CharlieBrady:

--- Quote from: CharlieBrady on May 09, 2012, 02:52:08 PM ---That should be:

mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow
vim /etc/e-smith/templates-custom/etc/hosts.allow/nrpe

--- End quote ---

But why create a custom template when all you need to do is set a db property?

config setprop nrpe HostsAllow '127.0.0.1 a.b.c.d'

CharlieBrady:
Actually, I see you do need a custom template here. But I would still use a custom template and a database property:

{
  $OUT="nrpe: ";
  $OUT .= $nrpe{HostsAllow} || "127.0.0.1";
}

and then:

config setprop nrpe HostsAllow '127.0.0.1 a.b.c.d'

to allow the remote access.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version