| 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
||
| -------- |
|
Fig.1. Centos server|
| |
| -------- |
| 
Fig.2. Windows server|
### 2. Install and configure Centreon on CentOS
Installing Centreon on Centos requires following the steps below:
1. Disabling SELinux:

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
```
| |
| -------- |
| 
Fig.3. Centreon-repository installed |
4. Installing Centreon:
```!bash
yum install -y centreon centreon-database
systemctl daemon-reload
systemctl restart mariadb
```

5. Verifying the database server:

6. Configuring the TimeZone
`date.timezone = Europe/Brussels`
`systemctl restart rh-php73-php-fpm`

7. Securing the database
`mysql_secure_installation`


`systemctl enable centreon centengine centreontrapd snmptrapd`
Then start the web service: `systemctl start httpd24-httpd`
8. Installation from Web interface





### 3. Configure the poller correctly
Configuring the poller is done as shown on the screenshots below






### 4. Create 2 host groups (trigram-linux / trigram-windows)
- Host groups creation is done from the menu `Configuration > Hosts > Host Groups`

### 5. Create 2 contact templates (trigram-administrator / trigram-engineer)
- Contact template creation is done from the menu `Configuration > Users > Contact Templates`

### 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`


### 7. Create 8 ACLs:
a. Create 4 access groups:
- Access group creation is done from the menu `Parameters > ACL > Access Groups`


b. Create 2 ACL Menu Access
- ACL Menu creation is done from the menu `Parameters > ACL > Menu Access`


c. Create 2 ACL Resources Access
- ACL Resources Access creation is done from the menu `Parameters > ACL > Resources Access`


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`


9. Monitor linux virtual machine (Plugin Custom Centreon Central/Database/Poller)
- Installing required plugins

- After installing the plugins, the host is added from the menu `Configuration > Hosts > Hosts > Add`


- Visualization of some Event logs

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

Installing NSCLIENT++

- Even thoug i installed the plugin from the cli i was not able to exploit it, it requires a subscription


- I had to use the SNMP plugin
Configuring SNMP on windows server

SNMP Windows host added on Centreon


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]
---

## REFERENCES
https://archives-docs.centreon.com/21.04/docs/installation/installation-of-a-remote-server/using-packages/