This is a step-by-step guide to install Nagios and configure dctmpy plugin for monitoring a Documentum environment. Nagios installation is pretty easy as we'll be doing everything using yum. Then we'll setup a standard configuration for the plugin.

 

 

Environment

  • Host:
    • Windows 7 x64 8GB RAM
    • VMWare Player 6.0.1

 

 

VM Creation and OS Configuration

 

Check these steps on (Unofficial) D7.1 Developer Edition

 

 

EPEL Repository setup

[root@vm-nagios nagios]# wget http : // epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm

[root@vm-nagios nagios]# rpm -Uvh epel-release-6-8.noarch.rpm

 

Apache

 

  • Install httpd

[root@vm-nagios nagios]# yum install httpd

 

  • Start the service

[root@vm-nagios nagios]# service httpd start

 

 

MySQL

 

  • Install MySQL
[root@vm-nagios nagios]# yum install mysql mysql-server


  • Start MySQL service
[root@vm-nagios nagios]# service mysqld start


  • Configure MySQL's root user
[root@vm-nagios nagios]# mysql_secure_installation



PHP

 

  • Install PHP module
[root@vm-nagios nagios]# yum install php


  • Check everything is working by creating the following php page:

[root@vm-nagios nagios]# vi /var/www/html/infophp.php

<?php

phpinfo();

?>

 

  • Restart the httpd service and check the previously create page

[root@vm-nagios nagios]# service httpd restart

 

  • Finally, install MySQL module for PHP

[root@vm-nagios nagios]# yum install php-mysql

 

 

phpMyAdmin

 

  • Install the module:

[root@vm-nagios nagios]# yum install phpmyadmin

 

  • Edit phpMyAdmin.conf and comment the <Directory> entry:

[root@vm-nagios nagios]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Alias /phpMyAdmin /usr/share/phpMyAdmin

Alias /phpmyadmin /usr/share/phpMyAdmin

 

#<Directory /usr/share/phpMyAdmin/>

#   <IfModule mod_authz_core.c>

#     # Apache 2.4

#     <RequireAny>

#       Require ip 127.0.0.1

#       Require ip ::1

#     </RequireAny>

#   </IfModule>

#   <IfModule !mod_authz_core.c>

#     # Apache 2.2

#     Order Deny,Allow

#     Deny from All

#     Allow from 127.0.0.1

#     Allow from ::1

#   </IfModule>

#</Directory>

 

  • Make a copy of the default configuration:

[root@vm-nagios nagios]# cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php

 

  • Change auth mode to "http"

[root@vm-nagios nagios]# vi /usr/share/phpMyAdmin/config.inc.php

/* Authentication type */

#$cfg['Servers'][$i]['auth_type'] = 'cookie';

$cfg['Servers'][$i]['auth_type'] = 'http';

 

  • Restart httpd service

[root@vm-nagios nagios]# service httpd restart

 

 

Development tools

 

  • You'll need to install the usual development packages:

[root@vm-nagios nagios]# yum install gd gd-devel gcc glibc glibc-common

 

 

Nagios

 

  • Install all modules

[root@vm-nagios nagios]# yum install nagios*

 

  • Set a password for the user "nagiosadmin"

[root@vm-nagios nagios]# htpasswd /etc/nagios/passwd nagiosadmin

 

  • Start Nagios service

[root@vm-nagios nagios]# service nagios start

 

You should be able to access Nagios browsing localhost/nagios

 

 

dctmpy

 

  • Install Pyhton tools

[root@vm-nagios nagios]# yum install python-setuptools python-setuptools-devel

 

  • Install dctmpy

[root@vm-nagios nagios]# easy_install argparse nagiosplugin dctmpy

 

  • Check plugin is working

[root@vm-nagios nagios]# nagios_check_docbroker -H 172.24.3.128 -p 1489

[root@vm-nagios nagios]# nagios_check_docbase -H 172.24.3.128 -p 47625 -l dmadmin -a dmadmin -m login

 

  • Configure commands.cfg:

[root@vm-nagios nagios]# vi /etc/nagios/objects/commands.cfg

 

define command{
command_name nagios_check_docbroker
command_line /usr/bin/nagios_check_docbroker -H $HOSTADDRESS$ -p $ARG1$
}

#'nagios_check_docbase' commands definition
define command{
command_name nagios_check_docbase
command_line /usr/bin/nagios_check_docbase -H $HOSTADDRESS$ -p $ARG1$ -i $ARG2$ -l $ARG3$ -a $ARG4$ -m $ARG5$
}




 

  • In this case we're going to monitor a Windows machine, so edit nagios.cfg and uncomment the windows.cfg section

[root@vm-nagios nagios]# vi /etc/nagios/nagios.cfg

# Definitions for monitoring a Windows machine

cfg_file=/etc/nagios/objects/windows.cfg

 

  • Edit windows.cfg file and add the services

[root@vm-nagios nagios]# vi /etc/nagios/objects/windows.cfg

define host{
        use             windows-server  ; Inherit default values from a template
        host_name       WINDOWS_HOST       ; The name we're giving to this host
        alias           WINDOWS_HOST       ; A longer name associated with the host
        address         172.24.3.128    ; IP address of the host
        }

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbroker
        check_command           nagios_check_docbroker!1489
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase login
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!login
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase sessions
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!sessioncount -w 70 -c 80
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase projection targets
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!targets
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase jms status
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!jmsstatus
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase failed tasks
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!failedtasks
}
define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     docbase job scheduling
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!jobs -j "dm_DMFilescan,dm_LogPurge" -n system_cleanup_jobs
}
define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     cts status
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!ctsstatus
}

define service{
        use                     generic-service
        host_name               WINDOWS_HOST
        service_description     cts queue
        check_command           nagios_check_docbase!47625!1000001!dmadmin!dmadmin!ctsqueue -w 100 -c 1000
}




 

 

Restart Nagios service and you should see the new host with the new services reporting status.