Skip to content

Commit

Permalink
add agent host install
Browse files Browse the repository at this point in the history
add plugins requirements

no debian 11 cma
  • Loading branch information
jean-christophe81 committed Dec 5, 2024
1 parent 7522ef9 commit 562ae49
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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 :
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
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
Expand Up @@ -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

Expand Down Expand Up @@ -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):

Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 562ae49

Please sign in to comment.