Centreon Engine Benchmarking Tools
**********************************

Introduction
============

Centreon Engine provides a benchmarking tool designed to mesure the
speed of passive check result processing. The utility is named
*centengine_bench_passive*.

Usage
=====

  * **-? --help** print tool help
  * **-M --mode** specify the mode in which the tool should run (see
    below)
  * **-h --activehosts** number of active hosts in the configuration
    (default is 0)
  * **-s --activeservices** number of active services in the
    configuration (default is 0)
  * **-H --passivehosts** number of passive hosts in the configuration
    (default is 1)
  * **-S --passiveservices** number of passive services in the
    configuration (default is 100)
  * **-c --count** number of passive check results to send (default is
    1000)
  * **-e --engine** path to Centreon Engine binary (default is
    */usr/sbin/centengine*)
  * **-m --module** Centreon Engine external command module (default
    is */usr/lib64/centreon-engine/externalcmd.so*)

Modes
=====

The benchmarking tool has three modes :

  * **benchmark** perform a full benchmark test. It generates a Centreon
    Engine configuration and mesure time needed to process the expected
    number of passive check results
  * **configuration** generate a configuration compatible with the later
    *command* mode. Note that when generating the configuration, all
    number of hosts and services must be equal to the numbers provided
    to the *command* mode.
  * **command** generate external commands of passive check results.
    Note that the number of hosts and services provided in this mode
    must be equal to the numbers provided when generating the
    benchmarking configuration.

Use over a network
==================

If you wish to test passive check processing over a network the best way
to do it is to perform the following steps :

  * generate a bencharking configuration using the *configuration* mode
    on the target server
  * run Centreon Engine on the server using this configuration
  * run the *netcat* tool listening on some port. Redirect its output to
    Centreon Engine external command FIFO (*nc -l -k -p 6000 > /tmp/centengine.cmd*)
  * run the bencharking tool on one or multiple remote servers and
    redirect their output to a *netcat* that will connect to the target
    server (*centengine_bench_passive <params> | nc remoteserver 6000*)
