Loading...
 

History: Monitoring

Preview of version: 4

Tiki Monitoring with Nagios

Assumptions

This text will assume you have enough knowledge and domain of Nagios and Linux, your Nagios is already deployed and it is in an external server (different where you have your Tiki deployment)

Nagios Configuration

First you need to copy the check_tiky scripts. You can download it from https://sourceforge.net/p/tikiwiki/code/HEAD/tree/trunk/doc/devtools/check_tiki.php. This script is written in PHP. Put it on a path you will remember, for example /usr/local/bin.

Look for your nagios.cfg file, open it and check what directory is pointing the variable cfg_dir. In this case we are going to use /etc/nagios/conf.d/

Create a file at /etc/nagios/conf.d/check_tiki.cfg with the following content:

define command{
        command_name    check_tiki_bcc
        command_line    /usr/local/bin/check_tiki.php  -u $ARG1$ -c bcc --bccwarn $ARG2$ --bcccrit $ARG3$
        }

define command{
        command_name    check_tiki_searchindex
        command_line    /usr/local/bin/check_tiki.php  -u $ARG1$ -c searchindex --sirwarn $ARG2$ --sircrit $ARG3$
        }

define command{
        command_name    check_tiki_db
        command_line    /usr/local/bin/check_tiki.php  -u $ARG1$ -c db
        }


Edit your server definition. Put the following in the proper directory. In our case, it is in the /etc/nagios/objects/servers/ directory. This is a template, your server definition may be more complex than this.

define host{
        use                     linux-server
        host_name               trunk.notre.website
        alias                   trunk
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             PING
        check_command                   check_ping!300.0,20%!500.0,60%
        notifications_enabled           0
        check_interval                  10
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             SSH
        check_command                   check_ssh
        notifications_enabled           0
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             HTTP
        check_command                   check_http!-H trunk.notre.website
        notifications_enabled           1
        }


define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             TIKI Op Code Cache
        check_command                   check_tiki_bcc!http://trunk.notre.website/tiki-monitor.php!80!95
        notifications_enabled           1
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             TIKI Index
        check_command                   check_tiki_searchindex!http://trunk.notre.website/tiki-monitor.php!80000!95000
        notifications_enabled           1
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       trunk.notre.website
        service_description             TIKI Op Code Cache
        check_command                   check_tiki_db!http://trunk.notre.website/tiki-monitor.php
        notifications_enabled           1
        }


You can check your configuration by executing:

nagios -v /etc/nagios/nagios.cfg

If there is an error, you will be notified. After that, you can restart nagios and new monitoring will start.

Other Stuff

Free

This is a great way to get great tools and to encourage ClearCenter (the main developers of ClearOS)

History

Advanced
Information Version
Marc Laporte Deprecated. We need a solution for Virtualmin 10
View
Marc Laporte 9
View
Bernard Sfez 8
View
Bernard Sfez 7
View
luis.lucio 6
View
luis.lucio 5
View
luis.lucio 4
View
luis.lucio 3
View
Marc Laporte 2
View
Marc Laporte 1
View