Skip to content

feat(cloud::zscaler::ztb::restapi): new plugin - #6498

Open
omercier wants to merge 7 commits into
developfrom
CTOR-2448-New-Pack-cloud-zscaler-ztb-restapi-Zero-Trust-Branch-Rest-API
Open

omercier wants to merge 7 commits into
developfrom
CTOR-2448-New-Pack-cloud-zscaler-ztb-restapi-Zero-Trust-Branch-Rest-API

Conversation

@omercier

@omercier omercier commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Description

Follows #6319

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 ?

Please describe the procedure to verify that the goal of the PR is matched.
Provide clear instructions so that it can be correctly tested.
Mention the automated tests included in this FOR (what they test like mode/option combinations).

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.

@omercier
omercier marked this pull request as ready for review October 9, 2026 13:02
@omercier
omercier requested review from a team as code owners October 9, 2026 13:02
@omercier
omercier requested review from Evan-Adam and jean-christophe81 and removed request for a team October 9, 2026 13:02
Comment thread src/cloud/zscaler/ztb/restapi/mode/gatewaydisk.pm Outdated
Comment thread src/cloud/zscaler/ztb/restapi/mode/gatewayinterfaces.pm Outdated
Comment thread src/cloud/zscaler/ztb/restapi/mode/clusterappconnector.pm
Comment thread src/cloud/zscaler/ztb/restapi/mode/gatewayinterfaces.pm
Comment thread src/cloud/zscaler/ztb/restapi/mode/gatewayinterfaces.pm Outdated
Comment thread src/cloud/zscaler/ztb/restapi/mode/discovery.pm Outdated
Comment thread src/cloud/zscaler/ztb/restapi/mode/gatewaycontainers.pm
Comment thread src/centreon/plugins/templates/counter.pm Outdated
Comment thread packaging/centreon-plugin-Cloud-Zscaler-Ztb-Restapi/pkg.json Outdated
Comment thread src/cloud/zscaler/ztb/restapi/custom/api.pm Outdated
@omercier
omercier force-pushed the CTOR-2448-New-Pack-cloud-zscaler-ztb-restapi-Zero-Trust-Branch-Rest-API branch from 2cf8abe to 3855027 Compare October 12, 2026 16:25
$disco_stats->{discovered_items} = scalar(@$results);
$disco_stats->{results} = $results;

my $encoded_data = json_encode($disco_stats, prettify => $self->{option_results}->{prettify}, output => $self->{output}, no_exit => 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

option --prettify manquante dans le POD

Comment on lines +52 to +55
'api-path:s' => { name => 'api_path', default => '/api' },
'unknown-http-status:s' => { name => 'unknown_http_status', default => '%{http_code} < 200 or %{http_code} >= 300' },
'warning-http-status:s' => { name => 'warning_http_status' },
'critical-http-status:s' => { name => 'critical_http_status' },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

options api-path et *-http-status non documentées dans le POD

@garnier-quentin

garnier-quentin commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

@omercier it's important to not remove the change on file:
src/centreon/plugins/templates/counter.pm

sub custom_output {
    my ($self, %options) = @_;

    my $value = $self->{option_results}->{ $options{option} };
    $value =~ s/%\(([a-zA-Z0-9\._:\-]+?)\)/$options{values}->{$1}/g;
    return $value;
}

Moreover, i'll add a enhancement today for the interface discovery

@omercier

Copy link
Copy Markdown
Contributor Author

@omercier it's important to not remove the change on file: src/centreon/plugins/templates/counter.pm

sub custom_output {
    my ($self, %options) = @_;

    my $value = $self->{option_results}->{ $options{option} };
    $value =~ s/%\(([a-zA-Z0-9\._:\-]+?)\)/$options{values}->{$1}/g;
    return $value;
}

Moreover, i'll add a enhancement today for the interface discovery

Hi @garnier-quentin,
I have removed the function but I believe the functionality it supported is still working.
Can you explain why you would like to keep it rather than using the placeholders I put instead?

@garnier-quentin

Copy link
Copy Markdown
Contributor

Hi @garnier-quentin, I have removed the function but I believe the functionality it supported is still working. Can you explain why you would like to keep it rather than using the placeholders I put instead?

If it works the same. it's ok for me.

I tell you when it's ok for the enhancement

This branch has not been deployed

No deployments
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.

3 participants