Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mon 153178 add silent mode to cma documentation #3882

Draft
wants to merge 4 commits into
base: staging
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add agent host install
add plugins requirements

no debian 11 cma
  • Loading branch information
jean-christophe81 committed Dec 6, 2024
commit 269899ae10adb7503dbfb878d73fc928a595a741
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ L'agent peut être installé sur et superviser les OS suivants :

* Alma 8
* Alma 9
* Debian 11
* Debian 12
* Ubuntu 22.04 LTS

@@ -217,15 +216,63 @@ L'Agent de supervision Centreon est maintenant capable de communiquer avec Centr
<Tabs groupId="sync">
<TabItem value="Linux" label="Linux">

* Installez le paquet **centreon-monitoring-agent**.
#### Dépôt Centreon et installation de l'agent

Installez le dépôt Centreon puis l'agent à l'aide des commandes suivantes :

<Tabs groupId="sync">
<TabItem value="Alma / RHEL / Oracle Linux 8" label="Alma / RHEL / Oracle Linux 8">

```shell
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.10/el8/centreon-24.10.repo
dnf install centreon-monitoring-agent
```

</TabItem>
<TabItem value="Alma / RHEL / Oracle Linux 9" label="Alma / RHEL / Oracle Linux 9">

```shell
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.10/el9/centreon-24.10.repo
dnf install compat-openssl11 centreon-monitoring-agent
```

</TabItem>
<TabItem value="Debian 12" label="Debian 12">

```shell
apt-get update
apt-get -y install lsb-release gpg wget
echo "deb https://packages.centreon.com/apt-standard-24.10-stable $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
```

Ensuite, importez la clé du dépôt :

```shell
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
```

Ensuite, installez l'agent :

```shell
apt-get update
apt install centreon-monitoring-agent
```

</TabItem>
</Tabs>

* Configurez le **centreon-monitoring-agent**.
1. Modifiez le fichier **/etc/centreon-monitoring-agent/centagent.json** local (4 cas) :

<Tabs groupId="sync">
<TabItem value="Non chiffré, l'agent se connecte au collecteur" label="Non chiffré, l'agent se connecte au collecteur">

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"<IP POLLER>:4317",
"host":"host_1",
"log_type":"file",
@@ -238,7 +285,7 @@ L'Agent de supervision Centreon est maintenant capable de communiquer avec Centr

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"<IP POLLER>:4317",
"host":"host_1",
"log_type":"file",
@@ -253,7 +300,7 @@ L'Agent de supervision Centreon est maintenant capable de communiquer avec Centr

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"0.0.0.0:4317",
"host":"host_1",
"log_type":"file",
@@ -266,7 +313,7 @@ L'Agent de supervision Centreon est maintenant capable de communiquer avec Centr

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"0.0.0.0:4317",
"host":"host_1",
"log_type":"file",
@@ -282,6 +329,8 @@ L'Agent de supervision Centreon est maintenant capable de communiquer avec Centr
</TabItem>
</Tabs>

Dans le champ **host**, entrez le nom de l'hôte à superviser tel que vous l'avez saisi dans l'interface Centreon. Si absent, l'agent utilisera le hostname de la machine.

#### Options de log

Deux types de log sont disponibles :
@@ -337,6 +386,9 @@ Ce dépôt permettra d'installer les plugins Centreon ainsi que **les dépendanc
<TabItem value="Alma / RHEL / Oracle Linux 8" label="Alma / RHEL / Oracle Linux 8">

```bash
dnf -y install dnf-plugins-core oracle-epel-release-el8
dnf config-manager --set-enabled ol8_codeready_builder

cat >/etc/yum.repos.d/centreon-plugins.repo <<'EOF'
[centreon-plugins-stable]
name=Centreon plugins repository.
@@ -398,6 +450,10 @@ dnf install -y centreon-plugin-Operatingsystems-Linux-Local.noarch
<TabItem value="Alma / RHEL / Oracle Linux 9" label="Alma / RHEL / Oracle Linux 9">

```bash
dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled crb

cat >/etc/yum.repos.d/centreon-plugins.repo <<'EOF'
[centreon-plugins-stable]
name=Centreon plugins repository.
@@ -459,6 +515,8 @@ dnf install -y centreon-plugin-Operatingsystems-Linux-Local.noarch
<TabItem value="Debian 11 & 12" label="Debian 11 & 12">

```bash
apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2 curl

wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
apt-get update
70 changes: 64 additions & 6 deletions pp/integrations/plugin-packs/getting-started/how-to-guides/cma.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ The CMA can be installed on and monitor the following OSs:

* Alma 8
* Alma 9
* Debian 11
* Debian 12
* Ubuntu 22.04 LTS

@@ -217,7 +216,55 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your
<Tabs groupId="sync">
<TabItem value="Linux" label="Linux">

* Install the **centreon-monitoring-agent** package.
#### Centreon repository and agent install

Install the Centreon repository and agent using the following commands:

<Tabs groupId="sync">
<TabItem value="Alma / RHEL / Oracle Linux 8" label="Alma / RHEL / Oracle Linux 8">

```shell
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.10/el8/centreon-24.10.repo
dnf install centreon-monitoring-agent
```

</TabItem>
<TabItem value="Alma / RHEL / Oracle Linux 9" label="Alma / RHEL / Oracle Linux 9">

```shell
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.10/el9/centreon-24.10.repo
dnf install compat-openssl11 centreon-monitoring-agent
```

</TabItem>
<TabItem value="Debian 12" label="Debian 12">

```shell
apt-get update
apt-get -y install lsb-release gpg wget
echo "deb https://packages.centreon.com/apt-standard-24.10-stable $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
```

Then, import repository key :

```shell
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
```

Then, install agent :

```shell
apt-get update
apt install centreon-monitoring-agent
```

</TabItem>
</Tabs>

* Configure **centreon-monitoring-agent**.

1. Modify the **/etc/centreon-monitoring-agent/centagent.json** file (4 cases):

@@ -227,7 +274,7 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"<IP POLLER>:4317",
"host":"host_1",
"log_type":"file",
@@ -240,7 +287,7 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"<IP POLLER>:4317",
"host":"host_1",
"log_type":"file",
@@ -255,7 +302,7 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"0.0.0.0:4317",
"host":"host_1",
"log_type":"file",
@@ -269,7 +316,7 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your

```json
{
"log_level":"trace",
"log_level":"info",
"endpoint":"0.0.0.0:4317",
"host":"host_1",
"log_type":"file",
@@ -286,6 +333,8 @@ The CMA can now communicate with Centreon. You can set up the monitoring of your
</TabItem>
</Tabs>

In the **host** field, enter the name of the host to be monitored as you have entered it in the Centreon interface. If absent, the agent will use the machine's hostname.

#### Log configuration

You can configure two kinds of log output:
@@ -344,6 +393,9 @@ standard distribution repositories**.
<TabItem value="Alma / RHEL / Oracle Linux 8" label="Alma / RHEL / Oracle Linux 8">

```bash
dnf -y install dnf-plugins-core oracle-epel-release-el8
dnf config-manager --set-enabled ol8_codeready_builder

cat >/etc/yum.repos.d/centreon-plugins.repo <<'EOF'
[centreon-plugins-stable]
name=Centreon plugins repository.
@@ -405,6 +457,10 @@ dnf install -y centreon-plugin-Operatingsystems-Linux-Local.noarch
<TabItem value="Alma / RHEL / Oracle Linux 9" label="Alma / RHEL / Oracle Linux 9">

```bash
dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled crb

cat >/etc/yum.repos.d/centreon-plugins.repo <<'EOF'
[centreon-plugins-stable]
name=Centreon plugins repository.
@@ -466,6 +522,8 @@ dnf install -y centreon-plugin-Operatingsystems-Linux-Local.noarch
<TabItem value="Debian 11 & 12" label="Debian 11 & 12">

```bash
apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2 curl

wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
apt-get update