Skip to main content

Centreon Central

Overview​

The Centreon Central Monitoring Connector will help you set up monitoring for your Centreon Central server.

The best practice is to have the central server monitored by a poller if you have one. If not, you will need to add the --hostname='' option to the host's EXTRAOPTIONS macro to avoid host key verification issues.

Pack Assets​

Templates​

The Centreon Monitoring Connector Centreon Central brings a host template:

  • App-Monitoring-Centreon-Central-custom

It brings the following Service Templates:

Service AliasService TemplateService DescriptionDefault
Broker-StatsApp-Monitoring-Centreon-Broker-Stats-CentralCheck Centreon Broker processes statisticsX
proc-broker-rrdApp-Monitoring-Centreon-Process-broker-rrdCheck Broker RRD processX
proc-broker-sqlApp-Monitoring-Centreon-Process-broker-sqlCheck Broker SQL processX
proc-centcoreApp-Monitoring-Centreon-Process-centcoreCheck centcore process
proc-centengineApp-Monitoring-Centreon-Process-centengineCheck centreon-engine processX
proc-centreontrapdApp-Monitoring-Centreon-Process-centreontrapdCheck centreontrapd process
proc-crondApp-Monitoring-Centreon-Process-crondCheck crond processX
proc-gorgonedApp-Monitoring-Centreon-Process-gorgonedCheck gorgoned processX
proc-httpdApp-Monitoring-Centreon-Process-httpdCheck Apache processX
proc-ntpdApp-Monitoring-Centreon-Process-ntpdCheck NTP processX
proc-snmptrapdApp-Monitoring-Centreon-Process-snmptrapdCheck snmptrapd process
proc-sshdApp-Monitoring-Centreon-Process-sshdCheck sshd processX

Collected metrics & status​

Metric NameUnit
endpoint#queued_eventsevents
endpoint#speed_eventsevents/s
statusstring
endpoint#unacknowledged_eventsevents

Prerequisites​

SNMP​

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

SSH key exchange​

The checks related to Broker-Stats service should be done from a poller and it is done through SSH. If you only have a central server, then checks will be initiated and performed on and by the central server itself. You can skip below steps for SSH key exchange if the central server monitors itself.

The poller monitoring the central will have to log on through SSH as centreon user on the central server while being centreon-engine.

Follow below steps to exchange the SSH key:

  1. From the central server, set a password for the centreon user:
passwd centreon
  1. From the poller server, create and copy the new centreon-engine's SSH key on the central:
su - centreon-engine
ssh-keygen -t ed25519 -a 100
ssh-copy-id -i ~/.ssh/id_ed25519.pub centreon@<IP_CENTRAL>

You will then have to set the check to be performed remotely. To do so, after applying the Host template, you will have to set the EXTRAOPTIONS macro in the Broker-Stats service.

Macro nameValue
EXTRAOPTIONS--verbose --remote --ssh-option='-l=centreon'

Setup​

  1. Install the Centreon package on a poller or directly on the central server if it monitors itself:
yum install centreon-plugin-Applications-Monitoring-Centreon-Central centreon-plugin-Operatingsystems-Linux-Snmp
  1. On the Centreon Web interface, install the Centreon Central Centreon Monitoring Connector on the Configuration > Monitoring Connectors Manager page.

Configuration​

Host​

  • 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-Central-custom template to apply to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryMacroDescription
MODULESTATSFILE/var/lib/centreon-engine/central-module-master-stats.json
RRDSTATSFILE/var/lib/centreon-broker/central-rrd-master-stats.json
SNMPEXTRAOPTIONSAny extra option you may want to add to every command_line (eg. a --verbose flag)
SQLSTATSFILE/var/lib/centreon-broker/central-broker-master-stats.json

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//centreon_linux_snmp.pl \
--plugin=os::linux::snmp::plugin \
--mode=processcount \
--hostname=10.0.0.1 \
--snmp-version='2c' \
--snmp-community='my-snmp-community' \
--process-name='sshd' \
--process-path='' \
--process-args='' \
--regexp-name \
--regexp-path \
--regexp-args \
--warning='' \
--critical='' \
--use-new-perfdata

The expected command output is shown below:

OK: Number of current processes running: 1 | 'nbproc'=1;;;0; 

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

/usr/lib/centreon/plugins//centreon_linux_snmp.pl \
--plugin=os::linux::snmp::plugin \
--mode=processcount \
--help

All available plugin modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins//centreon_linux_snmp.pl \
--plugin=os::linux::snmp::plugin \
--list-mode

Troubleshooting​

Please find the troubleshooting documentation for Centreon Plugins typical issues.