---
# System prepended metadata

title: Centreon Lab

---

- yyv-centreon
- yyv-web

Based on Centreon's official documentation, they are 3 ways of deploying the application namely:
- ready-to-use virtual machine.
- RPM or DEB packages
-  Installation from source

During this lab i used the 'RPM packages'

### 1. Create and configure both virtual machines.

**Addressing the servers**

- Centos server 

Modify the file : `sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0` as shown below

![](https://hackmd.io/_uploads/B15XPqnFn.png)

Restart the network service : `sudo systemctl restart network`

![](https://hackmd.io/_uploads/S1dH_52Kh.png)

- Windows server

![](https://hackmd.io/_uploads/BkILZCnFh.png)

![](https://hackmd.io/_uploads/HJGCVChFh.png)

### 2. Install and configure Centreon on the Linux virtual machine.

#### Prerequisites

- Installing dependencies and repositories necessary to deploy Centreon

```!bash
yum install -y centos-release-scl`
yum install -y yum-utils
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php81
```
![](https://hackmd.io/_uploads/BJBri52Kn.png)

```!bash
yum update 
sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config
reboot
systemctl stop firewalld
systemctl disable firewalld
```

- Installing MariaDB repository

![](https://hackmd.io/_uploads/H1Hasq3Yh.png)

- Centreon repository

![](https://hackmd.io/_uploads/Syyz29hK2.png)

- Installation of centreon + database

```!bash
yum install -y centreon
systemctl daemon-reload
systemctl restart mariadb
```

![](https://hackmd.io/_uploads/Sko5nqnt2.png)

![](https://hackmd.io/_uploads/rJXJJjnK3.png)

- Set the PHP time zone

`echo "date.timezone = Europe/Brussels" >> /etc/php.d/50-centreon.ini`

![](https://hackmd.io/_uploads/B1qNyi3Fn.png)

- Start services at boot time 

`systemctl enable php-fpm httpd24-httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd`

- Secure the database

`mysql_secure_installation`

![](https://hackmd.io/_uploads/H1Uhys2Kn.png)

![](https://hackmd.io/_uploads/B1YCJihK3.png)

- Web Installation

Starting the web service: `systemctl start httpd24-httpd`

![](https://hackmd.io/_uploads/rkkkmo3Yh.png)

![](https://hackmd.io/_uploads/SkBwQjhKn.png)

![](https://hackmd.io/_uploads/SkRv7j3K3.png)

![](https://hackmd.io/_uploads/ByOF7snFn.png)

![](https://hackmd.io/_uploads/r1dAmi2th.png)

![](https://hackmd.io/_uploads/S1ILSsht2.png)

![](https://hackmd.io/_uploads/r1PtSs3tn.png)

![](https://hackmd.io/_uploads/BJgqrohYh.png)

![](https://hackmd.io/_uploads/SynsSsnKn.png)

![](https://hackmd.io/_uploads/rkYnHshYn.png)

![](https://hackmd.io/_uploads/SkXJ8j2F2.png)

### 3. Poller Configuration

- This is done following the steps shown below:

![](https://hackmd.io/_uploads/BkipwsnYh.png)

![](https://hackmd.io/_uploads/rkgP_o2Yh.png)

![](https://hackmd.io/_uploads/HySlto3t2.png)

- After configuration the poller is running

![](https://hackmd.io/_uploads/HkEzYinYh.png)

### 4. Create 2 host groups (trigram-linux / trigram-windows)

- This is done as shown below:

![](https://hackmd.io/_uploads/HyrYFi2Y2.png)

![](https://hackmd.io/_uploads/SkRnFj3K2.png)

- results:

![](https://hackmd.io/_uploads/rJKRFj3Fn.png)

### 5. Create 2 contact templates (trigram-administrator / trigram-engineer)

- This is done as shown below:

![](https://hackmd.io/_uploads/B19z9snt2.png)

![](https://hackmd.io/_uploads/Bkvtns2Kh.png)

- Results:

![](https://hackmd.io/_uploads/r1St5i2tn.png)

### 6. Create 4 users (trigram-linux-adm / trigram-linux-eng / trigram-windows-adm/ trigram-windows-eng)

![](https://hackmd.io/_uploads/Hklr3o2K3.png)

![](https://hackmd.io/_uploads/Hk1i3j3tn.png)

### 7. Create 8 ACLs:

a. Create 4 access groups:

![](https://hackmd.io/_uploads/SklAns3t3.png)

![](https://hackmd.io/_uploads/HkASaontn.png)

![](https://hackmd.io/_uploads/H1s10jnKn.png)

b. Create 2 ACL Menu Access

![](https://hackmd.io/_uploads/SJDEAs3K2.png)

![](https://hackmd.io/_uploads/rkO2RohKh.png)

![](https://hackmd.io/_uploads/BJXfynnK2.png)

![](https://hackmd.io/_uploads/By6GJ3ht3.png)

c. Create 2 ACL Resources Access

![](https://hackmd.io/_uploads/r1fUyh3F2.png)

![](https://hackmd.io/_uploads/BkRfl22Fh.png)

![](https://hackmd.io/_uploads/BJAulh2F2.png)

![](https://hackmd.io/_uploads/SkRFghht2.png)

8. Create 4 contact groups (trigram-linux-adm-group / trigram-linux-eng-group / trigram-windows-adm-group / trigram-windows-eng-group)

![](https://hackmd.io/_uploads/rJhAxn2K3.png)

![](https://hackmd.io/_uploads/ByT4bn2t3.png)

![](https://hackmd.io/_uploads/ryRCb2nY2.png)

9. Monitor linux virtual machine (Plugin Custom Centreon Central/Database/Poller)

- Installing the necessary plugins

![](https://hackmd.io/_uploads/HkzbEhnK3.png)

- Adding centreon server with snmp connection

![](https://hackmd.io/_uploads/HkjYu22t3.png)

![](https://hackmd.io/_uploads/rJLJL2ht2.png)

- Monitored Resources 

![](https://hackmd.io/_uploads/ryNB0nhK2.png)

10. Monitor Windows virtual machine 

![](https://hackmd.io/_uploads/SkzmB03Y3.png)

![](https://hackmd.io/_uploads/SyqkI03F3.png)

![](https://hackmd.io/_uploads/BJaiU0nF2.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/B1g05pnY3.png)

---

![](https://hackmd.io/_uploads/B1qePCnYn.png)
