View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Monitoring

Bulbgraph.png   This is an old document about monitoring, please go here for latest.




Contents

Introduction

Monitoring generally means to be aware of the state of a system, in this case an Openbravo instance. This article explains how to set up Nagios to monitor both the operating system and specially Openbravo.

There are multiple possible setups for both Nagios and Openbravo, so this guide will take the following assumptions:

Installing Nagios

Installing Nagios in Ubuntu is as simple as running the following commands:

sudo apt-get install nagios3 nagios-nrpe-plugin python-twill

The installation process will ask you to set a nagios password, it's used to log in into the web interface using the nagiosadmin user. You can test your installation by browsing into http://ip-address/nagios3.

Getting the Openbravo server ready

There are multiple ways of monitoring a remote system with Nagios. The way we recommend you to do it is by installing a small program in the system you want to monitor, so that it's easier for Nagios to check for the server status. So as a first step install NRPE on the server you're want to monitor.

If Openbravo is running on a Ubuntu server:

sudo apt-get install nagios-nrpe-server

Next, edit /etc/nagios/nrpe.cfg to configure it to your needs. This might be hard if it's the first time you deal with this, so here you have a sample working configuration file that will get you started immediately. And restart nrpe to apply these changes:

/etc/init.d/nagios-nrpe-server restart

If you are running an Openbravo Appliance:

conary update nrpe=contrib.rpath.org@rpl:2
conary pin nrpe

Next, edit /etc/nrpe.cfg to configure it to your needs. This might be hard if it's the first time you deal with this, so here you have a sample working configuration file that will get you started immediately. And restart nrpe to apply these changes:

/etc/init.d/nrpe restart

Before going forward make sure you can connect from the Nagios server into the system you want to monitor, on port 5666.

Configuring Nagios

Next, we need to tell Nagios about the Openbravo server we want to monitor. First, enable the NRPE usage in Nagios. Edit /etc/nagios3/nagios.cfg and set:

check_external_commands=1

Next, to configure Nagios to monitor the target Openbravo host create a new file in /etc/nagios3/conf.d/openbravo-3.cfg. You can use the following configuration file, which checks for these services:

define host{
        use				generic-host
        host_name			openbravo-3
        alias				My Openbravo 3 server
        address                         openbravo.mydomain.org
        }

define service{
        use                             generic-service
        host_name                       openbravo-3
        service_description             PING
        notification_interval           0
        check_command                   check_ping!250.0,30%!500.0,60%
        }

define service {
        use                             generic-service
        host_name                       openbravo-3
        service_description             Current Load
        notification_interval           0
        check_command                   check_nrpe!check_load
        }

define service {
        use                             generic-service
        host_name                       openbravo-3
        service_description             Root Partition
        notification_interval           0
        check_command                   check_nrpe!check_disk
        }

define service {
        use                             generic-service
        host_name                       openbravo-3
        service_description             Current Users
        notification_interval           0
        check_command                   check_nrpe!check_users
        }

define service {
        use                             generic-service
        host_name                       openbravo-3
        service_description             Total Processes
        notification_interval           0
        check_command                   check_nrpe!check_total_procs
        }

define service {
        use                             generic-service
        host_name                       openbravo-3
        service_description             Swap Usage
        notification_interval           0
        check_command                   check_nrpe!check_swap
        }

define service{
        use                             generic-service
        host_name                       openbravo-3
        service_description             SSH
        check_command                   check_ssh
        notification_interval           0
        }

define service{
        use                             generic-service
        host_name                       openbravo-3
        service_description             HTTP
        check_command                   check_http
        notification_interval           0
        }

define service{
        use                             generic-service
        host_name                       openbravo-3
        service_description             Openbravo ERP
        check_command                   openbravo-login!http://openbravo.mydomain.org/openbravo!"username"!"password"
}

Verify the results

Browse into the nagios web interface, you should see the results of the checks.


Nagios-openbravo.png

Retrieved from "http://wiki.openbravo.com/wiki/Monitoring"

This page has been accessed 2,855 times. This page was last modified on 20 April 2015, at 17:08. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.