Skip to content

Commit

Permalink
ci(Gorgone): fix test
Browse files Browse the repository at this point in the history
Refs:MON-37990
  • Loading branch information
Evan-Adam committed Jul 22, 2024
1 parent e5cba5a commit 2981ff6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
36 changes: 31 additions & 5 deletions gorgone/docs/modules/centreon/statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion gorgone/tests/robot/tests/centreon/statistics.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2981ff6

Please sign in to comment.