Install Nagios Plugins and NRPE Addon

by Herman Tarigan on September 2, 2008

Nagios® is an Open Source host, service and network monitoring program. Where can you get it? Right here. Can you get support for it? Yes! Get more answers to some of your basic questions about Nagios here.

root@titik [~/herman]# wget http://transact.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.12.tar.gz
–10:41:05–  http://transact.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.12.tar.gz
Resolving transact.dl.sourceforge.net… 202.55.147.10
Connecting to transact.dl.sourceforge.net|202.55.147.10|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1831377 (1.7M) [application/x-gzip]
Saving to: `nagios-plugins-1.4.12.tar.gz’

100%[=======================================>] 1,831,377    218K/s   in 9.2s

10:41:15 (195 KB/s) – `nagios-plugins-1.4.12.tar.gz’ saved [1831377/1831377]

root@titik [~/herman]# wget http://transact.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
–10:42:18–  http://transact.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
Resolving transact.dl.sourceforge.net… 202.55.147.10
Connecting to transact.dl.sourceforge.net|202.55.147.10|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 405725 (396K) [application/x-gzip]
Saving to: `nrpe-2.12.tar.gz’

100%[=======================================>] 405,725      166K/s   in 2.4s

10:42:21 (166 KB/s) – `nrpe-2.12.tar.gz’ saved [405725/405725]

root@titik [~/herman]# tar zxvf nagios-plugins-1.4.12.tar.gz
nagios-plugins-1.4.12/
nagios-plugins-1.4.12/gl/
nagios-plugins-1.4.12/gl/m4/
nagios-plugins-1.4.12/gl/m4/lib-link.m4
nagios-plugins-1.4.12/gl/m4/include_next.m4
nagios-plugins-1.4.12/gl/m4/strndup.m4
nagios-plugins-1.4.12/gl/m4/onceonly_2_57.m4
nagios-plugins-1.4.12/gl/m4/inttypes_h.m4
nagios-plugins-1.4.12/gl/m4/sockpfaf.m4
nagios-plugins-1.4.12/gl/m4/mountlist.m4
nagios-plugins-1.4.12/gl/m4/strdup.m4
nagios-plugins-1.4.12/gl/m4/stdint.m4
nagios-plugins-1.4.12/gl/m4/getaddrinfo.m4
………..
……….
nagios-plugins-1.4.12/perlmods/Class-Accessor-0.31.tar.gz
nagios-plugins-1.4.12/perlmods/Math-Calc-Units-1.06.tar.gz
nagios-plugins-1.4.12/command.cfg.in
nagios-plugins-1.4.12/CODING
root@titik [~/herman]# cd nagios-plugins-1.4.12/
root@titik [~/herman/nagios-plugins-1.4.12]# ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
…………….
…………….
config.status: creating po/Makefile
–with-apt-get-command:
–with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
–with-ping-command: /bin/ping -n -U -w %d -c %d %s
–with-ipv6: yes
–with-mysql: /usr/bin/mysql_config
–with-openssl: yes
–with-gnutls: no
–enable-extra-opts: no
–with-perl: /usr/local/bin/perl
–enable-perl-modules: no
–with-cgiurl: /nagios/cgi-bin
–with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin
root@titik [~/herman/nagios-plugins-1.4.12]# make
make  all-recursive
make[1]: Entering directory `/root/herman/nagios-plugins-1.4.12′
Making all in gl
make[2]: Entering directory `/root/herman/nagios-plugins-1.4.12/gl’
{ echo ‘/* DO NOT EDIT! GENERATED AUTOMATICALLY! */’; \
cat ./alloca.in.h; \
} > alloca.h-t
mv -f alloca.h-t alloca.h
rm -f configmake.h-t configmake.h
{ echo ‘/* DO NOT EDIT! GENERATED AUTOMATICALLY! */’; \
echo ‘#define PREFIX “/usr/local/nagios”‘; \
echo ‘#define EXEC_PREFIX “/usr/local/nagios”‘; \
……………..
……………..
Making all in po
make[2]: Entering directory `/root/herman/nagios-plugins-1.4.12/po’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/root/herman/nagios-plugins-1.4.12/po’
make[2]: Entering directory `/root/herman/nagios-plugins-1.4.12′
make[2]: Nothing to be done for `all-am’.
make[2]: Leaving directory `/root/herman/nagios-plugins-1.4.12′
make[1]: Leaving directory `/root/herman/nagios-plugins-1.4.12′
root@titik [~/herman/nagios-plugins-1.4.12]# make install

root@titik [~/herman]# tar zxf nrpe-2.12.tar.gz
root@titik [~/herman]# cd nrpe-2.12
root@titik [~/herman/nrpe-2.12]# ./configure
root@titik [~/herman/nrpe-2.12]# make all
root@titik [~/herman/nrpe-2.12]# make install-plugin

cd ./src/ && make install-plugin
make[1]: Entering directory `/root/herman/nrpe-2.12/src’
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
make[1]: Leaving directory `/root/herman/nrpe-2.12/src’
root@titik [~/herman/nrpe-2.12]# make install-daemon
cd ./src/ && make install-daemon
make[1]: Entering directory `/root/herman/nrpe-2.12/src’
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 775 -o nagios -g nagios nrpe /usr/local/nagios/bin
make[1]: Leaving directory `/root/herman/nrpe-2.12/src’
root@titik [~/herman/nrpe-2.12]# make install-daemon-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /usr/local/nagios/etc

And dont forget, edit you nrpe config and allow TCP_INCOMING port 5666 (default) :

root@titik [~]# vi /usr/local/nagios/etc/nrpe.cfg
server_port=5666 (default)
server_address=a.b.c.d
allowed_hosts=v.w.x.y

Test from Nagios Server :
[nagios@v.w.x.y ~]# /usr/local/nagios/libexec/check_nrpe -H a.b.c.d
NRPE v2.12

Done …

Herman Tarigan

Pernah menjadi Operator warnet, Customer Service Webhosting, System Administrator Webhosting, Website (SEO) Consultant, Operational Manager, Marketing dan sekarang memilih menjadi FREELANCE :)

Incoming search terms for the article:

nagios check mikrotik port status, nagios-plugins-1 4 12 tar gz, make[1]: entering directory `/home/downloads/nrpe-2 12/src\ make[1]: nothing to be done for `all\ make[1]: leaving directory `/home/downloads/nrpe-2 12/src\, monitoring nagios, Nothing to be done for `all nrpe
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • LinkedIn
  • Live
  • Print this article!
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

{ 1 trackback }