Yaya Mohamed: ymo-centreon & ymo-web I installed CentOs 8 and Windows server 2019 ![](https://hackmd.io/_uploads/B1W0-mnq2.png) ### 1. Create and configure both virtual machines. Ip address Configuration: - ymo-web ![](https://hackmd.io/_uploads/B1rdDznqh.png) - ymo-centreon I configured the ip address 10.1.1.101/24 on centreon as shown below ![](https://hackmd.io/_uploads/Hk9j8z25n.png) Then i restart the service ![](https://hackmd.io/_uploads/HkT3wzhc2.png) To ease the installation and deployment steps some configurations such as adding the necessary ports in the firewall and disabling SELINUX are done `sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config` ![](https://hackmd.io/_uploads/ryE94X3ch.png) ### 2. Install and configure Centreon on the Linux virtual machine. The steps below are followed inorder to install centreon 23.0.4.5 on centos8 1. Update centos cached repository information ![](https://hackmd.io/_uploads/ByyAX7nch.png) 2. install the remi and CodeReady Builder repositories. ```!bash dnf install -y dnf-plugins-core dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms ``` 3. Install MariaDB repository `curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --os-type=rhel --os-version=8 --mariadb-server-version="mariadb-10.5"` ![](https://hackmd.io/_uploads/B1xDIQ35n.png) 4. Install php module ```!bash Enable PHP 8.1 dnf module install php:remi-8.1 ``` 5. Install centreon repository and update ```!bash dnf install -y https://yum.centreon.com/standard/22.10/el8/stable/noarch/RPMS/centreon-release-22.10-1.el8.noarch.rpm dnf update ``` ![](https://hackmd.io/_uploads/SyZiUX253.png) 6. Installation of centreon with local database ```!bash dnf install -y centreon systemctl daemon-reload systemctl restart mariadb ``` ![](https://hackmd.io/_uploads/HJOM5Q25h.png) ![](https://hackmd.io/_uploads/HJMt9735h.png) 7. Set the Timezone `echo "date.timezone = Europe/Brussels" >> /etc/php.d/50-centreon.ini` `systemctl restart php-fpm` 8. Configure the services to start at boot time ```!bash systemctl enable php-fpm httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd systemctl enable crond systemctl start crond ``` 9. Secure the DB `mysql_secure_installation` ![](https://hackmd.io/_uploads/r1-YjXh5n.png) ![](https://hackmd.io/_uploads/H1PooX353.png) 10. Web installation `systemctl start httpd` ![](https://hackmd.io/_uploads/SyXN3m2qh.png) ![](https://hackmd.io/_uploads/Bke_nX35h.png) ![](https://hackmd.io/_uploads/HkInhQncn.png) ![](https://hackmd.io/_uploads/H1NTh7392.png) ![](https://hackmd.io/_uploads/SJJ02X2ch.png) ![](https://hackmd.io/_uploads/HJVVTm293.png) ### 3. Configuration of the Poller For proper configuration of the poller with need to export its parameters to centreon central engine ![](https://hackmd.io/_uploads/H11hCmh9h.png) Select the move export Files option as shown below and Export ![](https://hackmd.io/_uploads/B1bMRQ2q3.png) After exporting and restarting the service we have the figure below ![](https://hackmd.io/_uploads/H12WJN2q3.png) ### 4. Create 2 host groups (trigram-linux / trigram-windows) This is done from the menu: Configuration > Hosts > HostGroup ![](https://hackmd.io/_uploads/HyWVeVh53.png) After adding we have the host groups below: ![](https://hackmd.io/_uploads/r1arxVh5n.png) ### 5. Create 2 contact templates (trigram-administrator / trigram-engineer) This is done from the menu: Configuration > Hosts > Templates ![](https://hackmd.io/_uploads/H1WzZVh9h.png) After adding we have contact templates below: ![](https://hackmd.io/_uploads/SydSW43q3.png) ### 6. Create 4 users (trigram-linux-adm / trigram-linux-eng / trigram-windows-adm/ trigram-windows-eng) This is done from the menu: Configuration > Users > Contacts / Users ![](https://hackmd.io/_uploads/H1j0ZE293.png) After adding we have the users below: ![](https://hackmd.io/_uploads/rJUjMNh93.png) ### 7. Create 8 ACLs: a. Create 4 access groups: This is done from the menu: Administration > ACL > Access Groups ![](https://hackmd.io/_uploads/By2m7N2qh.png) After adding we have the Access groups below: ![](https://hackmd.io/_uploads/H1GF742q2.png) b. Create 2 ACL Menu Access This is done from the menu: Administration > ACL > Menus Access ![](https://hackmd.io/_uploads/ryyYNVhc3.png) ![](https://hackmd.io/_uploads/SJef4E392.png) After adding we have the Menus below: ![](https://hackmd.io/_uploads/SyayHEh5n.png) c. Create 2 ACL Resources Access This is done from the menu: Administration > ACL > Resources Access ![](https://hackmd.io/_uploads/SkZtSVh5h.png) ![](https://hackmd.io/_uploads/Byn5rEnqn.png) After configuring we have the result shown below ![](https://hackmd.io/_uploads/SJvjr4253.png) 9. Monitor linux virtual machine (Plugin Custom Centreon Central/Database/Poller) I installed the necessary plugins for the next tasks as shown below ![](https://hackmd.io/_uploads/HyuMuVnqh.png) Unfortunately the NSCLIENT plugin is not free so i wont be able to use it for windows server host. ![](https://hackmd.io/_uploads/B1Di_4hqn.png) You can say it is graysed - configuration of linux host (Centreon) It is necessary to properly configure the snmp client on centreon 1. installation of snmp client ![](https://hackmd.io/_uploads/Byx6KNh9n.png) 2. Configuration of the Community name I changed the default community name in the file `/etc/snmp/snmpd.conf ` as shown below ![](https://hackmd.io/_uploads/BJ0I9Eh5n.png) then i restart the service ![](https://hackmd.io/_uploads/rknF5Vnch.png) 3. The last step is adding the host in centreon webui ![](https://hackmd.io/_uploads/Skjri42qn.png) Then i restart the poller configuration ![](https://hackmd.io/_uploads/B1hdsV3qh.png) We can see the services starting ![](https://hackmd.io/_uploads/rJNss429n.png) ![](https://hackmd.io/_uploads/rJeR2N3c3.png) ![](https://hackmd.io/_uploads/ByBVRNnc3.png) 10. Monitor Windows virtual machine I did same for windows server (using snmp) ![](https://hackmd.io/_uploads/ryHi2E25n.png) ![](https://hackmd.io/_uploads/B11F3N25n.png) Results: ![](https://hackmd.io/_uploads/ByxVaV35h.png) ![](https://hackmd.io/_uploads/S1nG04nq2.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] Scripts are found in the directory `/usr/lib/centreon/plugins` This is where we are going to add our custom script ![](https://hackmd.io/_uploads/HkbAZn2c3.png) I added a new script called `Centreon_windows_drivers_size.pl` and changed the permissions ![](https://hackmd.io/_uploads/ryzWE22qh.png) --- ![](https://hackmd.io/_uploads/SJ0v0V3cn.png) ![](https://hackmd.io/_uploads/rJ1ZAV29h.png)