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

CTOR-1107-plugin-apps-monitoring-iplabel-ekara-restapi-mode-scenarios-wrong-index #5375

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Evan-Adam
Copy link
Contributor

@Evan-Adam Evan-Adam commented Jan 6, 2025

Description

Fix a bug in ekara (iplabel) scenario monitoring where scenarios name where not correctly ordered.

Add new options to filter scenarios

Fixes # CTOR-1107 CTOR-123 CTOR-114

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

See robot tests provided

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • In case of a new plugin, I have created the new packaging directory accordingly.
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • I have reviewed all the help messages in all the .pm files I have modified.
    • All sentences begin with a capital letter.
    • All sentences end with a period.
    • I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

@Evan-Adam Evan-Adam force-pushed the CTOR-1107-plugin-apps-monitoring-iplabel-ekara-restapi-mode-scenarios-wrong-index branch from 62081ed to 608cf35 Compare January 6, 2025 14:09
* Add message when api response is not what is expected
* Correctly interpret index given by the api

Refs:CTOR-1107
* Create a new function in api.pm used by both mode to get the list of scenario to monitor.

Refs:CTOR-1107
* Create a new function in api.pm used by both mode to get the list of scenario to monitor.
* Add two options

Refs:CTOR-1107
@Evan-Adam Evan-Adam force-pushed the CTOR-1107-plugin-apps-monitoring-iplabel-ekara-restapi-mode-scenarios-wrong-index branch from 608cf35 to c6924a0 Compare January 6, 2025 16:56
@Evan-Adam Evan-Adam marked this pull request as ready for review January 6, 2025 16:56
@Evan-Adam Evan-Adam requested review from a team as code owners January 6, 2025 16:56
my $status_filter = {};
my @get_param;

if (defined($self->{option_results}->{filter_status}) && $self->{option_results}->{filter_status}[0] ne '') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer using is_empty()?

[Documentation] Check Iplabel authentication
[Tags] monitoring iplabel restapi

Run rm -f /var/lib/centreon/centplugins/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed: the generic test suite does it already

[Documentation] Check Iplabel authentication
[Tags] monitoring iplabel restapi

Run rm -f /var/lib/centreon/centplugins/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Run rm -f /var/lib/centreon/centplugins/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants