Linux, Technology

Centreon Monitoring

I’ve used a few different monitoring solutions over the years, Zabbix, Nagios and Solarwinds in the enterprise world.  Nagios, PRTG Network Monitor, and most recently Centreon on my personal stuff.  Centreon is basically just a front end for Nagios, it pretties it up and makes the interface look nice and allows you to setup your hosts without editing config files directly.  Overall I’ve been happy with it, and decided I’m going to stick with it for awhile.

To begin, we’ll need to add the Centreon repo, you can specify –nogpgcheck to avoid having to manually download and/or create the key, it will be downloaded automatically in the next step when you install MariaDB and you’ll be asked to approve it:

Install MariaDB:

To secure MariaDB, run the following command and go through the prompts:

Create the centreon.conf file for MariaDB:

Reload systemd and then restart MariaDB:

Install php:

Configure your timezone so you don’t get errors/warnings:

Install the base server:

You can install the poller on different and/or multiple servers if you wish (I.e. if you’re scaling this out to the enterprise level and have tons of hosts/different locations/etc), in my case they’re going to reside on the same server:

I also like to go ahead and install all available plugins as well:

Start it up:

If everything went well you should now be able to load up http://yourserver/centreon in a browser and complete the configuration.

Centreon Config

Centreon Config

Note that all of the information in the below screenshot is pre-filled, you just hit Next here:

Centreon Config

This one is pre-filled as well, just hit Next:

Centreon Config

Centreon Config

As long as your database is on the same server, you can leave the Database Host Address blank, enter in the Root password that you created when running the mysql_secure_installation script, and then enter the database user password.  All the rest should be pre-populated for you.

Centreon Config

This next step can take a bit of time:

Centreon Config

But should eventually end up like this:

Centreon Config

Centreon Config

Upon clicking finish, you will be greeted with this nice little login screen:

Centreon Login

To setup LDAP authentication, the first thing you will need is an account that will allow Centreon to search Active Directory for users.  I created a service account for it, this is what you will enter under the configuration for the bind account.  You will need to login to Centreon with the admin user that was created during setup, and then navigate to Administration > Parameters > LDAP.

Centreon LDAP

Configuration name and description can be whatever you want, then make sure to set “Enable LDAP authentication” to Yes, I also enabled “Store LDAP password” this just ensures that if AD is unavailable for whatever reason you can still login to Centreon with your AD users.  “Auto import users” you want to leave at No so that Centreon will authenticate with LDAP every time instead of importing users into its own database.  You can leave the next few options at default and then enter your LDAP servers.  In my case and and default port of 389.

Centreon LDAP config

Bind username and password will be the service account that was created to allow Centreon to search AD.  Protocol version I have set to 3 since I’m using Active Directory.  Upon choosing Active Directory as the template, it will automagically populate everything except for the User and Group base DNs for you.  In my case those are OU=Accounts,OU=Sky,DC=Sky,DC=net and OU=Groups,OU=Sky,DC=Sky,DC=net respectively.

Centreon LDAP config

You can now navigate to Configuration > Users and choose LDAP import.

LDAP User Config

Click the search button, and a list of all your AD users will be shown.  Simply check the ones you wish to import and click on the Import button.

LDAP Import

Once imported you can click on the user and associate with contact groups, enable notifications, designate as adminitrator, etc… just as you would a built in Centreon user account.

In order to get everything fully functional, you will also need to navigate to Administration > Extensions and enable both the Centreon Plugin Pack Manager and Centreon License Manager by clicking the gear next to each of them and then choosing Install.

Centreon Extensions

Install Module

You can then navigate to Configuration > Plugin pack and enable the various plugins that are available.  To do so just mouse over one of them and a + symbol will appear in the bottom right corner, you can click on this to install the plugin pack.  Once it has been installed, a check mark will appear in the top right corner.


One last thing to know is that anytime you make any configuration changes whatsoever, you need to reload the poller. To do so, navigate to Configuration > Poller.  Here you will see all available pollers, in my case, it’s only localhost.  You will then check the box next to it, and hit the Export Configuration button.

Reload Poller

By default, the only options checked will be Generate Configuration Files, and Run Monitoring Engine Debug.  This will allow you to generate the files only, and then it will report any errors down below, this gives you a chance to fix any problems before applying the config and breaking Centreon.

Reload Poller

Once you are confident that everything is good, check off the Move Export Files and Restart Monitoring Engine boxes and hit the Export button again.  This will overwrite your config with the newly generated one and then reload the monitoring engine so that the changes take affect.  Under the Method there are two options, Reload and Restart.  I’ve not run into anything yet that I have changed that actually required a Restart, Reload seems to always handle it just fine.

Reload Monitoring Engine

I will go over actually configuring Hosts/Services/Alerts in a separate post.

Series Navigation<< Ubiquiti UniFi ControllerCentreon 2 – Electric Boogaloo >>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.