Nrpe: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
No edit summary
 
Boiarino (talk | contribs)
No edit summary
Line 1: Line 1:
cd /usr/local/src/nrpe-2.6
On clonweb (where nagios is running);
./configure
NOTE: on Solaris: ./configure --disable-ssl
make all
cp src/check_nrpe /apps/nagios2.6/libexec


#Create a command definition in your Nagios config
  cd /usr/local/src/nrpe-2.6
#file for the NRPE client. See the README file for
  ./configure
#more info on doing this.
  make all
  cp src/check_nrpe /apps/nagios2.6/libexec


NOTE: remote host(s) must be running the NRPE daemon !!!
On any other machine which suppose to be remotely monitored by clonweb:
    - Copy the nrpe daemon to /usr/sbin, /apps/nagios2.6
      or wherever you feel it fits best.
    - Copy the sample nrpe.cfg config file to /etc,
      /www/nagios2.6 or wherever you feel it fits best.
    - Modify the /etc/services file and configure NRPE to
      run under inetd, xinetd, or as a standalone daemon.
      See the README file for more info on doing this.


  mkdir /apps/nrpe2.6
  mkdir /apps/nrpe2.6/libexec
  mkdir /apps/nrpe2.6/etc
  mkdir /apps/nrpe2.6/bin
  cp sample-config/nrpe.cfg /apps/nrpe2.6/etc/
  cp src/nrpe /apps/nrpe2.6/bin
  cp src/check_nrpe /apps/nrpe2.6/libexec/
  cp init-script /etc/init.d/nrpe


#####################################
  emacs /etc/init.d/nrpe:
  # config: /apps/nrpe2.6/etc/nrpe.cfg
  NrpeBin=/apps/nrpe2.6/bin/nrpe
  NrpeCfg=/apps/nrpe2.6/etc/nrpe.cfg


playing on clonpc1 ...
  emacs /apps/nrpe2.6/etc/nrpe.cfg: for example
  command[check_disk]=/apps/nrpe2.6/libexec/check_disk -w 20 -c 10 -p /dev/sda5


mkdir /apps/nrpe2.6
on clonweb: copy pluging we want to execute remotely
mkdir /apps/nrpe2.6/libexec
mkdir /apps/nrpe2.6/etc
mkdir /apps/nrpe2.6/bin
cp sample-config/nrpe.cfg /apps/nrpe2.6/etc/
cp src/nrpe /apps/nrpe2.6/bin
cp src/check_nrpe /apps/nrpe2.6/libexec/
cp init-script /etc/init.d/nrpe
 
emacs /etc/init.d/nrpe:
# config: /apps/nrpe2.6/etc/nrpe.cfg
NrpeBin=/apps/nrpe2.6/bin/nrpe
NrpeCfg=/apps/nrpe2.6/etc/nrpe.cfg
 
emacs /apps/nrpe2.6/etc/nrpe.cfg: for example
command[check_disk1]=/apps/nrpe2.6/libexec/check_disk -w 20 -c 10 -p /dev/sda5


on clonweb: copy pluging we want to execute remotely
(remote machines will not see /www, only /apps !!!)
(remote machines will not see /www, only /apps !!!)
cp /www/nagios2.6/libexec/check_disk /apps/nrpe2.6/libexec/
cp /www/nagios2.6/libexec/check_disk /apps/nrpe2.6/libexec/
Line 53: Line 39:
/etc/init.d/nrpe stop
/etc/init.d/nrpe stop


###
IF WANT TO RUN AS DAEMON,
IF WANT TO RUN AS DAEMON,
create user 'nagios', private group 'nagios'
create user 'nagios', private group 'nagios'

Revision as of 01:19, 6 January 2007

On clonweb (where nagios is running);

 cd /usr/local/src/nrpe-2.6
 ./configure
 make all
 cp src/check_nrpe /apps/nagios2.6/libexec

On any other machine which suppose to be remotely monitored by clonweb:

 mkdir /apps/nrpe2.6
 mkdir /apps/nrpe2.6/libexec
 mkdir /apps/nrpe2.6/etc
 mkdir /apps/nrpe2.6/bin
 cp sample-config/nrpe.cfg /apps/nrpe2.6/etc/
 cp src/nrpe /apps/nrpe2.6/bin
 cp src/check_nrpe /apps/nrpe2.6/libexec/
 cp init-script /etc/init.d/nrpe
 emacs /etc/init.d/nrpe:
 # config: /apps/nrpe2.6/etc/nrpe.cfg
 NrpeBin=/apps/nrpe2.6/bin/nrpe
 NrpeCfg=/apps/nrpe2.6/etc/nrpe.cfg
 emacs /apps/nrpe2.6/etc/nrpe.cfg: for example
 command[check_disk]=/apps/nrpe2.6/libexec/check_disk -w 20 -c 10 -p /dev/sda5

on clonweb: copy pluging we want to execute remotely

(remote machines will not see /www, only /apps !!!) cp /www/nagios2.6/libexec/check_disk /apps/nrpe2.6/libexec/

/etc/init.d/nrpe start

on clonweb: /www/nagios2.6/libexec/check_nrpe -H clonpc1 -c check_disk1 must return: DISK OK - free space: / 7762 MB (54% inode=84%);| /=6411MB;14912;14922;0;14932

/etc/init.d/nrpe stop

IF WANT TO RUN AS DAEMON, create user 'nagios', private group 'nagios'