百度首页 | 百度空间
 
查看文章
 
Plugins: Nagios
2008-04-22 16:19
Plugins: Nagios

Nagios is an open source host, service and network monitoring program. The openQRM plugin for nagios integrates the nagios functionality including the management interface into openQRM so that any nodes or Virtual Environments that are managed by openQRM can be monitored through Nagios as well. For more details on Nagios see http://www.nagios.org.


Setup

This can be carried out in one of the possible 2 ways:

1.RPM installation(binary)
Install the rpms openqrm-plugin-apache-*.rpm and openqrm-plugin-nagios-*.rpm:

rpm -Uvh openqrm-plugin-apache-*.rpm openqrm-plugin-nagios-*.rpm


Run the openqrm installer

/opt/qrm/qrm-installer -i -m apache -m nagios


OR

2. Build it from source
To build from the source, download the latest openQRM 3.0 source from the SourceForge, extract it.

cd openqrm*/src/plugins


Extract the apache plugin tar file openqrm-plugin-apache*.tar.gz

tar xvzf openqrm-plugin-apache*.tar.gz


Extract the nagios plugin tar file openqrm-plugin-nagios*.tar.gz

tar xvzf openqrm-plugin-nagios*.tar.gz


Build the apache plugin

cd apache
make clean
make all
make install

Build the nagios plugin

cd ../nagios
make clean
make all
make install

Copy the apache and nagios plugin

cd ../../..
cp -a out/qrm/plugins/apache <openQRM-root-dir>/qrm/plugins/
cp -a out/qrm/plugins/nagios <openQRM-root-dir>/qrm/plugins/

Run the openqrm installer

<openQRM-root-dir>/qrm/qrm-installer -i -m apache -m nagios


Assumptions

Listed below are assumptions of Nagios plugin for openQRM installation:

  • Latest release of openQRM 3.0 is assumed to be already installed. Please check openQRM documentation to install openQRM.
  • Ensure that the command #hostname -s returns a valid string on the openQRM server
  • Each openQRM managed node has unique hostname   

Pre-requisites

Needs the packages listed below.

Versions of software componentss

Listed below are versions of nagios compnents being used.

  • Nagios - 2.5
  • Nagios Plugin - 1.4.3
  • NRPE - 2.5.2
  • NSCA - 2.6
  • GD - 2.0.33     

Distro's tested

  • Fedora Core 4
  • Fedora Core 5
  • RHEL 3
  • RHEL 4
  • CentOS 4
  • Mandriva Cooker
<QRM_ROOT_DIR>/qrm/plugins/nagios/docs/README.txt has the install and usage documentation.

USAGE

Login to the openQRM GUI.

Login to openQRM

Configure all VEs to monitor Nagios services by clicking Virtual Environments ->Individual VE ->Nagios Config

Default Nagios Config Screen

Nagios config for VE

Nagios Config Screen when multiple NRPE images available

Nagios config for NRPE

Check the services that needs to be monitored and click “Save Selection”.

Repeat the above step for all the VEs.

Nagios plugin for openQRM installation and configuration is now complete.

Other Screens

Screenshot of openQRM after user login  

openQRM with Nagios

Screenshot with Nagios menu items expanded

Nagios menu

Screenshot when user clicks Resource->Selected Node->Nagios Report

Nagios Report within openQRM

Nagios resource

Nagios Report with local resource monitoring within openQRM

Nagios node status


Events listing with nagios posted event

Nagios event

NRPE Image Creation for various DISTROS

By default, openQRM will have the NRPE image created for the distro it runs on. If you have nodes running a different distro than openQRM, you need to create NRPE image for this distro as per the steps outlined below.

  • Download NRPE and Nagios plugins source from http://www.nagios.org
  • Compile the binaries.
  • Get the file openqrm.nagios.nodes.tar.tgz from openQRM found at :

<QRM_BASE_DIR>/qrm/plugins/nagios/unsecure

  • Extract this tar file.
  • Replace the binaries in "nodes/bin" and "nodes/libexec" with the compiled ones.
  • Tar the "nodes" directory and name it as <distro>.nagios.nodes.tar.tgz. Replace <distro> with actual distro name like "FC5" or "CentOS5".
  • Upload it to openQRM server at :

<QRM_BASE_DIR>/qrm/plugins/nagios/unsecure

Central Nagios Server

You can now view the status of exisiting Nagios server by configuring nagios server within openQRM as Central nagios server. To monitor the distributed servers from nagios server in openQRM:

  • Add hosts definitions in distributedhosts directory using the template hosts-distributed.cfg, service definitions in distributedservices directory using the template services-distributed.cfg   and escalation definitions in hostescalations & serviceescalations directory. The base directory for configurations is :
    <QRM_BASE_DIR>/qrm/plugins/nagios/nagios-2.5/etc
  • Restart the nagios plugin
    <QRM_BASE_DIR>/qrm/sbin/qrm-plugin -u qrm -p qrm nagios stop
    <QRM_BASE_DIR>/qrm/sbin/qrm-plugin -u qrm -p qrm nagios start

The existing Nagios server needs to be configured as distributed server. Refer to the section "Distributed Server Configuration" found at the web page: http://nagios.sourceforge.net/docs/1_0/distributed.html



类别:Openqrm | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu