This post is also available in: French
The inventory is now fully complete, it’s about time we start with the configuration of our objects.
Note: in this chapter, we will monitor the following indicators of a Cisco router via SNMP protocol:
• Memory usage
• Bandwidth of the WAN interface
Below are the different configuration steps:
Our unique contact will have the following parameters:
• Name : network-team
• Notification period : 24 hours a day, 7 days a week
• Notification options: receive « OK », « WARNING », « CRITICAL » and « UNKNOWN » alerts from are equipment.
• Notification method : by email
• email address : firstname.lastname@example.org
In order to configure all that, log in Centreon and go to « Configuration → Users → Contacts /Users → Add »:
Fill out the following fields (with red rectangles), then save the parameters:
Your contact is now created:
2. Plugins and check commands
We are now going to monitor our router with a Ping check. The list of predefined commands is available in the « Configuration → Commands → Checks » menu:
Centreon already provides a plugin with its associated check command:
This command allows to run the « check_icmp » plugin with the following arguments :
• The IP address or DNS name of our equipment (« -H $HOSTADDRESS$ »)
• The threshold that defines the “DOWN” status of our equipment if the lost packet percentage is equal to 100% or the response time of the Ping request is greater or equal than 5 seconds(« -c 5000.0,100%)
Centreon also provides a plugin that checks the bandwidth usage of a network interface:
This command allows running the « check_centreon_snmp_traffic » plugin with the following arguments:
• IP address or DNS name of our equipment (« -H $HOSTADDRESS$ ») ;
• The network interface name to monitor(« ifName ») (« -n –i «$ARG1$ ») ;
• The first warning threshold(« -w $ARG2$ ») ;
• The second warning threshold(« -c $ARG3$) ;
• The SNMP version used for polling(« -v $_HOSTSNMPVERSION$ ») ;
• The SNMP community used for polling(« -C $_HOSTSNMPCOMMUNITY$ ») ;
Note: for more information regarding the use of « macros » in the command definitions, refer to the following article.
Regarding the memory usage of our router, we will have to manually define the check command. Indeed, the monitoring plugin is installed by Centreon Enterprise Server; however the associated command is not present yet.
In order to do this, click on the « Add » button located above the command list, and enter the following parameters, then click on « Save » :
The command line to enter:
$USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $_HOSTSNMPCOMMUNITY$ –cisco -w $ARG1$ -c $ARG2$
The check commands are now all defined.
3. Our first equipement
Now that the check commands are ready, we have to define our host in order to deploy the checkpoints later on. Our router has the following parameters:
• Name: rtr-wan-01
• Description : router WAN
• IP : 10.6.0.2
• SNMP community: public
• SNMP version : 2c
Go to « Configuration → Hosts → Add »:
In the general information, fill out the fields: :
Enter the information regarding the polling strategy:
Our host will then be checked every 5 minutes and an alert will be sent out 4 minutes after our host goes « DOWN » (2 check attempts with 1 check every 2 minutes will confirm its « HARD » state). The notification will be effective during the time period of 24 hours a day, 7 days a week.
At last, the notification parameters are as follows:
Then, click on « Save ».
4. Our first services
The definition of our router is now done; all we have left to do is add the definitions of our services. In order to do so, go to « Configuration → Services → Services by hosts → Add »:
In order to create our service for checking the memory usage, enter the following:
In the « Relations » tab, select the router that was previously created, then click on « Save »:
Your service is now created:
Follow the same procedure in order to create the traffic service :
At last, link the service to the router, then click on « Save »:
Your service is now created :
5. Generation of configuration files
Once that the objects are properly configured, it is required to generate the configuration files through two steps:
• configuration testing;
• configuration export.
Go to the « Configuration → Monitoring Engines → Generate » menu:
First, select the monitoring poller from the dropdown menu, check the first two checkboxes, and then click on the « Export » button:
If the output is the test is « Generating files… OK », then you can go to step #2. Otherwise, it is required to fix the problems which should be displayed in the console.
Now, check the two other checkboxes and click on the « Export » button again:
If the export process is successful, you should see the following displayed: “Restarting engine… OK”
6. First results
The results of the polling are visible in the « Monitoring → Hosts » or « Monitoring → Services » menus. First, our services and host have not been checked yet, so they appear with a « PENDING » status:
Once the first checked is done, the output should change and we should get the current status for each indicator:
Now you know the basics of the monitoring configuration system with Centreon. We have just seen a quick overview of the possibilities offered by Centreon, but you should have sufficient knowledge to continue the monitoring configuration for your equipment.
Before going any further, I would suggest you read the articles that are introduced in the next chapter. They will provide insight on best practice in terms of configuration and that will be essential for the durability of your monitoring system.
At last, I would suggest you setup two servers: one for testing/pre-production and one for production for obvious reasons.
You will find below more information and guidance regarding Centreon:
• Official documentation of Centreon and its modules
• Host group & service group, the good case-studies
• The principles of service templates
• The principles of host templates
• How to define check and notifcation commands
Please check the Centreon blog and the “Good practices” articles and see you next week !
Incoming search terms:
- ricoh centreon warning
- centreon templates missing
- centreon mail setup
- centreon mail notifications
- centreon how to export /import configuration
- centreon email notifications setup
- centreon configure mail
- centreon configure encoding
- Centreon configuration Please reload the configuration
- centreon commands