You are reading the documentation for Statusengine 2.x (old stable) - Switch to Version 3.x for thje current version

Statusengine processes performance data

Overview

Statusengine is able to process performance data without the reason to start a new daemon or create / parse any text files on your disk created by config options like:


process_performance_data=1
service_perfdata_command=process-service-perfdata
service_perfdata_file=/tmp/service-perfdata
service_perfdata_file_template=$LONG-STRING$

Statusengine gets every required data to create performance data out of the Gearman-Job-Server. So there is no need to create text files on your disk ;-)

Graph renderd by rrdtool

Processing method

Native mode:

In native mode Statusengine's servicechecks workers will insert new recors to your MySQL database and create/update the RRD files in one call. So no additional software is needed to get this job done. If you want to increase the number of servicechecks workers, take a look at Make it scale!

mod_perfdata mode:

If you are using Mod-Gearman to distribute your service checks on multiple worker nodes Mod-Gearman is able to save the performance data into a Gearman-Job-Server.

So if you are using Mod-Gearman on your system and don't need/want a MySQL database you can use Statusengine's mod_perfdata to fetch the performance data provided by Mod-Gearman and save it down to your RRD files.
If you wan to use mod_perfdata, you need to set the following values in your mod_gearman_neb.conf or module.conf:


perfdata=yes
perfdata_mode=2

Install native mode

First of all you need to install required PHP extensions and RRDtool:


apt-get install rrdtool php5-rrd

Depending on your environment you maybe want to use rrdcached to reduce the I/O on your storage system:

apt-get install rrdcached

Heads up:

If you are not using Statusengine so far - please follow the installation guide first.

In the next step you need to enable the process of performance data. You simply need to edit your config file /opt/statusengine/cakephp/app/Config/Statusengine.php:

<?php

//If you want, Statusengine's servicestatus workers are able to
//process performacne data for you and save them to RRD files
//so you don't need to install any additional software to
//get the job done.
'process_perfdata' => true,
Now Statusengine knows that you want to process performance data which is good. But i guess you need some more configuration options.
So please take a look at the configuration file /opt/statusengine/cakephp/app/Config/Perfdata.php
This is the place where you can config every perfdata values, like the path to your RRD files, if you want that Statusengine creates PNP4Nagios compatible XML files and stuff like this.

Notice:

Native mode and mod_perfdata sharing the Perfdata.php configuration file. The following options can simply ignored in native mode:


'worker', 'MOD_GEARMAN' and 'GEARMAN'


No you just need to restart Statusengine:

service statusengine restart

Install mod_perfdata for Mod-Gearman

First of all you need to install required PHP extensions and RRDtool as well:


apt-get install rrdtool php5-rrd php5-mcrypt


Now you need to enable mcrypt extension:

php5enmod mcrypt


Depending on your environment you maybe want to use rrdcached to reduce the I/O on your storage system:

apt-get install rrdcached

                            

Notice:

mod_perfdata is a standalone tool - so you don't need to configure Statusengine's database stuff.

Heads up:

You need a working installation of Naemon and Mod-Gearman

In the next step you need to tell your Mod-Gearman to write performance data to the Gearman Job Server. So you need to edit the etc/mod_gearman2/module.conf file of Mod-Gearman and restart your Naemon

perfdata=yes
perfdata_mode=2


service naemon restart


To configure mod_perfdata you need to edit the file /opt/statusengine/cakephp/app/Config/Perfdata.php. In this config file you set the path to your RRD files and many other options.

Notice:

Important for mod_perfdata are now the sections: 'worker', 'MOD_GEARMAN' and 'GEARMAN'


Now you just need to fire up mod_perfdata:

service mod_perfdata start

XML files

A lot of people using PNP4Nagios to render rrd graphs.
PNP4Nagios requires XML files with some additional information like all available data sources, a name of a template for rendering and so on.
If you don't need this XML files you can turn them of in /opt/statusengine/cakephp/app/Config/Perfdata.php:


<?php

'XML' => [
    
/* If ModPerfdata will write pnp4nagios compatible XML files or not
     * Type: Boolean
     * Default: true
     */
    
'write_xml_files' => false,

Graphite

Statusengine is able to store performance data to a Graphite installation. For example Grafana is a very famous solution to create graph based dashboards.
Example:

Statusengine graphite and grafana

First of all you need a working Graphite (and if you want Grafana) installation.

In the next step, configure the address of your Graphite server in Config/Graphite.php:


//Statusengine will create a TCP connection to your graphite server
'host' => 'graphite.example.org',
'port' => 2003,

In Config/Statusengine.php you can define the graphing backend you like to use. Add 'Graphite' as backend:


//Checkout Config/Perfdata.php for RRDTool configuration
//Checkout Config/Graphite.php for Graphite configuration
//
// Examples:
//  1. RRD only: ['Rrd']
//  2. Graphite only: ['Graphite']
//  3. RRD and Graphite: ['Rrd', 'Graphite']
'perfdata_storage' => ['Rrd', 'Graphite'],

And restart Statusengine

service statusengine restart


Nagios, NDOUtils and the Nagios logo are trademarks, servicemarks, registered trademarks or registered servicemarks owned by Nagios Enterprises, LLC. All other trademarks, servicemarks, registered trademarks, and registered servicemarks are the property of their respective owner(s).
All other trademarks are property of their respective owners. Other product or company names mentioned may be trademarks or trade names of their respective owner.