From 2981ff6b233bed99140205f985a6cdb54b4a70bb Mon Sep 17 00:00:00 2001 From: Evan Adam Date: Mon, 22 Jul 2024 17:22:23 +0200 Subject: [PATCH] ci(Gorgone): fix test Refs:MON-37990 --- gorgone/docs/modules/centreon/statistics.md | 36 ++++++++++++++++--- .../robot/tests/centreon/statistics.robot | 2 +- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/gorgone/docs/modules/centreon/statistics.md b/gorgone/docs/modules/centreon/statistics.md index 82ce80de5d4..9786dcf13b3 100644 --- a/gorgone/docs/modules/centreon/statistics.md +++ b/gorgone/docs/modules/centreon/statistics.md @@ -2,7 +2,7 @@ ## Description -This module aims to deal with statistics collection of Centreon Engine and Broker. +This module aims to deal with statistics collection of Centreon Engine and Broker. It require action module to be configured on each poller and on the central. ## Configuration @@ -30,13 +30,39 @@ cron: ## Events -| Event | Description | -| :-------------- | :----------------------------------------------- | -| STATISTICSREADY | Internal event to notify the core | -| BROKERSTATS | Collect Centreon Broker statistics files on node | +| Event | Description | +|:-------------------|:--------------------------------------------------| +| STATISTICSREADY | Internal event to notify the core | +| STATISTICSLISTENER | Internal Event to receive data from action module | +| BROKERSTATS | Collect Centreon Broker statistics files on node | +| ENGINESTATS | Collect Centreon engine statistics on node | ## API + + +### Collect Centreon engine statistics on every nodes configured + +The api send back a token to monitor advancement. Please note this token don't allow to monitor the whole process, only the first part until action command are sent. + + +| Endpoint | Method | +|:----------------------------| :----- | +| /centreon/statistics/engine | `GET` | + +#### Headers + +| Header | Value | +| :----- | :--------------- | +| Accept | application/json | + +#### Example + +```bash +curl --request POST "https://hostname:8443/api/centreon/statistics/engine" \ + --header "Accept: application/json" +``` + ### Collect Centreon Broker statistics on one or several nodes | Endpoint | Method | diff --git a/gorgone/tests/robot/tests/centreon/statistics.robot b/gorgone/tests/robot/tests/centreon/statistics.robot index 9f530faef3d..4e002a4d0e6 100644 --- a/gorgone/tests/robot/tests/centreon/statistics.robot +++ b/gorgone/tests/robot/tests/centreon/statistics.robot @@ -14,7 +14,7 @@ check statistic module add all centengine data in db ${communication_mode} ${date} Get Current Date increment=-1s @{central_config} Create List ${ROOT_CONFIG}statistics.yaml ${ROOT_CONFIG}actions.yaml @{poller_config} Create List ${ROOT_CONFIG}actions.yaml - Setup Two Gorgone Instances central_config=${central_config} communication_mode=${communication_mode} central_name=${communication_mode}_gorgone_central poller_name=${communication_mode}_gorgone_poller_2 + Setup Two Gorgone Instances central_config=${central_config} communication_mode=${communication_mode} central_name=${communication_mode}_gorgone_central poller_name=${communication_mode}_gorgone_poller_2 poller_config=${poller_config} # we first test the module when there is no data in the table, we will test it again when # there is data in the table to be sure the data are correctly updated.