| Centreon (CentOS 7) | Web (Windows server 2019) | | ------------------- | ------------------------- | | 10.1.1.11 | 10.1.1.43 | NETBIOS name: **mli-centreon** & **mli-web** ## Exercices: ### 1. Create and configure virtual machines Relevant screenshots of my servers || | -------- | |![](https://hackmd.io/_uploads/SJb13oLtn.png) Fig.1. Centos server| | | | -------- | | ![](https://hackmd.io/_uploads/rkfsN7_F3.png) Fig.2. Windows server| ### 2. Install and configure Centreon on CentOS Installing Centreon on Centos requires following the steps below: 1. Disabling SELinux: ![](https://hackmd.io/_uploads/ByInMULKh.png) 2. Updating the package repository: `sudo yum update -y` 3. Installing required repositories to install centreon-21.04-6: ```!bash yum install -y centos-release-scl yum install -y https://yum.centreon.com/standard/21.04/el7/stable/noarch/RPMS/centreon-release-21.04-6.el7.centos.noarch.rpm ``` | | | -------- | | ![](https://hackmd.io/_uploads/ryZB0oUYh.png) Fig.3. Centreon-repository installed | 4. Installing Centreon: ```!bash yum install -y centreon centreon-database systemctl daemon-reload systemctl restart mariadb ``` ![](https://hackmd.io/_uploads/rky-J28Yn.png) 5. Verifying the database server: ![](https://hackmd.io/_uploads/SkRI42UYh.png) 6. Configuring the TimeZone `date.timezone = Europe/Brussels` `systemctl restart rh-php73-php-fpm` ![](https://hackmd.io/_uploads/B1DNLh8Kn.png) 7. Securing the database `mysql_secure_installation` ![](https://hackmd.io/_uploads/Hyx-vh8t3.png) ![](https://hackmd.io/_uploads/SyTMv3LY3.png) `systemctl enable centreon centengine centreontrapd snmptrapd` Then start the web service: `systemctl start httpd24-httpd` 8. Installation from Web interface ![](https://hackmd.io/_uploads/rkSg_hIYn.png) ![](https://hackmd.io/_uploads/HkGV_3IYn.png) ![](https://hackmd.io/_uploads/H1qK_28Fn.png) ![](https://hackmd.io/_uploads/Hk-iOh8K2.png) ![](https://hackmd.io/_uploads/rykkt2LF3.png) ### 3. Configure the poller correctly Configuring the poller is done as shown on the screenshots below ![](https://hackmd.io/_uploads/Bkqqj38Y3.png) ![](https://hackmd.io/_uploads/HklvAhIFn.png) ![](https://hackmd.io/_uploads/rkuoAhUY2.png) ![](https://hackmd.io/_uploads/SJggkTUKh.png) ![](https://hackmd.io/_uploads/r1N7JaLFn.png) ![](https://hackmd.io/_uploads/BJqPRXDt2.png) ### 4. Create 2 host groups (trigram-linux / trigram-windows) - Host groups creation is done from the menu `Configuration > Hosts > Host Groups` ![](https://hackmd.io/_uploads/HJG7lVvFh.png) ### 5. Create 2 contact templates (trigram-administrator / trigram-engineer) - Contact template creation is done from the menu `Configuration > Users > Contact Templates` ![](https://hackmd.io/_uploads/B1IGz4Dth.png) ### 6. Create 4 users (trigram-linux-adm / trigram-linux-eng / trigram-windows-adm/ trigram-windows-eng) - User creation is done from the menu `Configuration > Users > Contacts/Users` ![](https://hackmd.io/_uploads/H1ybX4PFh.png) ![](https://hackmd.io/_uploads/r1aRXNvt2.png) ### 7. Create 8 ACLs: a. Create 4 access groups: - Access group creation is done from the menu `Parameters > ACL > Access Groups` ![](https://hackmd.io/_uploads/HyNsHNvFn.png) ![](https://hackmd.io/_uploads/rJrII4DY2.png) b. Create 2 ACL Menu Access - ACL Menu creation is done from the menu `Parameters > ACL > Menu Access` ![](https://hackmd.io/_uploads/H1KiDVwth.png) ![](https://hackmd.io/_uploads/BJXw_EDFn.png) c. Create 2 ACL Resources Access - ACL Resources Access creation is done from the menu `Parameters > ACL > Resources Access` ![](https://hackmd.io/_uploads/rJlMYNwth.png) ![](https://hackmd.io/_uploads/Byn4t4wt2.png) 8. Create 4 contact groups (trigram-linux-adm-group / trigram-linux-eng-group / trigram-windows-adm-group / trigram-windows-eng-group) - Contact Groups creation is done from the menu `Configuration > Users > Contact Groups` ![](https://hackmd.io/_uploads/HJqWjVDKh.png) ![](https://hackmd.io/_uploads/B1wYjVwFh.png) 9. Monitor linux virtual machine (Plugin Custom Centreon Central/Database/Poller) - Installing required plugins ![](https://hackmd.io/_uploads/Hyt-64DYn.png) - After installing the plugins, the host is added from the menu `Configuration > Hosts > Hosts > Add` ![](https://hackmd.io/_uploads/ryHcDQuF2.png) ![](https://hackmd.io/_uploads/r1si7iDY3.png) - Visualization of some Event logs ![](https://hackmd.io/_uploads/r1nG4swFn.png) 10. Monitor Windows virtual machine (Plugin Custom NSClient 0.5 [NRPE]) - Monitoring the windows server using NRPE is done by installing the windows NRPE plugin on centreon, installing the NSCLIENT++ on the windows server then adding a new host Installing the NRPE plugin ![](https://hackmd.io/_uploads/S141UUwth.png) Installing NSCLIENT++ ![](https://hackmd.io/_uploads/BypbFIPK3.png) - Even thoug i installed the plugin from the cli i was not able to exploit it, it requires a subscription ![](https://hackmd.io/_uploads/ryO68sPK2.png) ![](https://hackmd.io/_uploads/H1ttUsPYh.png) - I had to use the SNMP plugin Configuring SNMP on windows server ![](https://hackmd.io/_uploads/SkxhqsvFn.png) SNMP Windows host added on Centreon ![](https://hackmd.io/_uploads/HkiBLovF3.png) ![](https://hackmd.io/_uploads/rk1EUjDYh.png) 11. Use the custom script on Windows host to monitor the size of the folder “drivers” (C:\Windows\System32\drivers) [Warning: 100 Mo / Critical: 150 Mo] --- ![](https://hackmd.io/_uploads/Hy0AoVPK2.png) ## REFERENCES https://archives-docs.centreon.com/21.04/docs/installation/installation-of-a-remote-server/using-packages/