Skip to content

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

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

omercier wants to merge 11 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

New plugin developed by @garnier-quentin (originally committed in #6319).

Refs: CTOR-2448

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 ?

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.

@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
Comment thread src/cloud/zscaler/ztb/restapi/mode/discovery.pm
Comment thread src/cloud/zscaler/ztb/restapi/custom/api.pm
@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

@omercier

omercier commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

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

We've planned to release on next monday. Can you push it in a new PR for another release?

@omercier

Copy link
Copy Markdown
Contributor Author

BTW @garnier-quentin, the output of cluser-appconnector mode lacks the debug data. If you have the possibility to send it I'll add it to the tests later

@garnier-quentin

Copy link
Copy Markdown
Contributor

BTW @garnier-quentin, the output of cluser-appconnector mode lacks the debug data. If you have the possibility to send it I'll add it to the tests later

I have added the file in the ticket

@garnier-quentin

Copy link
Copy Markdown
Contributor

@omercier could you add the last changes about that plugin: garnier-quentin@b1f7cbd

];

$self->{maps_counters}->{containers} = [
{ label => 'cpu-utilization', nlabel => 'gateway.cpu.utilization.percentage', set => {

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.

est ce qu'on ne devrait pas plutot mettre gateway.container.cpu.utilization.percentage ? (ou container tout court)
idem L123 pour memory

=item B<--custom-perfdata-instances>

Define perfdata instance (default: C<%(gatewayName) %(interfaceName)>)
You can use the following variables: C<%{siteName}>, C<%{clusterName}>, C<%{gatewayName}>, C<%{interfaceName}>

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.

la syntaxe n'est pas uniquement avec des parenthèses %(sitename) pour cette option ?

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