Skip to main content

Centreon Database


Centreon Database Plugin Pack will help you set up monitoring for Centreon monitoring database.

Pack Assets​


The Centreon Plugin Pack Centreon Central brings a host template:

  • App-Monitoring-Centreon-Database-custom

It brings the following service templates:

Service AliasService TemplateService DescriptionDefault
PartitioningApp-Centreon-MySQL-Partitioning-customCheck Centreon Database partitionningX
Connection-TimeApp-DB-MySQL-Connection-Time-customCheck Centreon Database connection timeX
Connections-NumberApp-DB-MySQL-Connections-Number-customCheck Centreon Database connections numberX
Database-sizeApp-DB-MySQL-Database-Size-customCheck Centreon Database sizeX
Myisam-KeycacheApp-DB-MySQL-Myisam-Keycache-customCheck Centreon Database partitionningX
Open-FilesApp-DB-MySQL-Open-Files-customCheck Centreon Database open filesX
QueriesApp-DB-MySQL-Queries-customCheck Centreon Database queries numberX
SlowqueriesApp-DB-MySQL-Slowqueries-customCheck Centreon Database slow queriesX
SwapOS-Linux-Swap-SNMP-customCheck swap usageX
MemoryOS-Linux-Memory-SNMP-customCheck memory usageX
LoadOS-Linux-Load-SNMP-customCheck loadX
CpuOS-Linux-Cpu-SNMP-customCheck Cpu usageX

Collected metrics & status​

Database indicators:

Metric NameUnit
Partitioning Statusstring

System indicators:

Metric nameUnit


Creating a database user for Service Partitioning Monitoring​

In order to be able to collect the needed information from the database, a database user with specific privileges is required:

CREATE USER 'monitor_user'@'IP_POLLER' IDENTIFIED BY 'a_very_secure_passwd';
GRANT SELECT ON *.* to 'monitor_user'@'IP_POLLER';


SNMP must be configured on each poller being monitored. You can refer to this documentation describing how to set up a quick SNMP configuration.


  1. Install the Centreon Plugin packages on the poller that will monitor Centreon monitoring database:
yum install centreon-plugin-Applications-Monitoring-Centreon-Database centreon-plugin-Operatingsystems-Linux-Snmp

  1. On the Centreon Web interface, install the Centreon Database Centreon Plugin Pack on the Configuration > Plugin Packs page.



  • Log into Centreon and add a new Host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address/DNS fields according to your Centreon Central server settings.
  • Select the App-Monitoring-Centreon-Database-custom template to apply to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
  • Values for macros MYSQLUSERNAME and MYSQLPASSWORD are the ones set before when creating the user to monitor the database.

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon Poller CLI using the centreon-engine user account (su - centreon-engine) and test the Plugin by running the following command:

/usr/lib/centreon/plugins// \
--plugin=database::mysql::plugin \
--host=localhost \
--username='monitor_user' \
--password='centreon' \
--port='3306' \
--mode=threads-connected \
--warning-usage='' \
--critical-usage='' \
--warning-usage-prct='' \

The expected command output is shown below:

OK: Client connected threads total: 151 used: 10 (6.62%) free: 141 (93.38%)

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins// \
--plugin=database::mysql::plugin \
--host=localhost \

All available options for a given mode can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins// \
--plugin=database::mysql::plugin \


Please find all the troubleshooting documentation for the Centreon Plugins in the dedicated page