Skip to content

Commit

Permalink
Release 20240711 (#5103)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuntoja committed Jul 11, 2024
2 parents 1af93b2 + 9e08da4 commit ea9abfb
Show file tree
Hide file tree
Showing 44 changed files with 1,725 additions and 195 deletions.
80 changes: 80 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Community contributors

## Description

Please include a short resume of the changes and what is the purpose of this pull request.
Any relevant information should be added to help **reviewers** to understand what are the stakes
of the pull request.

**Fixes** # (issue)
If you are fixing a github Issue already existing, mention it here.

## 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**.

Any **relevant details** of the configuration to perform the test should be added.
To integrate this pull request into our core we need to add some **automated tests** to check the proper
functioning of this PR. Ideally we need the following informations:
* **SNMP**: MIB files and full snmpwalk of enterprise branch (`snmpwalk -ObentU -v 2c -c public address .1.3.6.1.4.1 > equipment.snmpwalk`) or [SNMP collections](https://thewatch.centreon.com/product-how-to-21/snmp-collection-tutorial-132).
* **HTTP API (SOAP, Rest/Json, XML-RPC)**: the documentation and some curl examples (command with -v + output) or HTTP [collections](https://thewatch.centreon.com/data-collection-6/centreon-plugins-discover-collection-modes-131).
* **CLI**: command line examples (command + result).
* **SQL**: queries + results + column types or [SQL collections](https://thewatch.centreon.com/product-how-to-21/sql-collection-tutorial-134).
* **JMX**: mbean names and attributes.

If some information is confidential, such as logins or IP addresses, obfuscate them in what is sent
publicly and we'll get in touch with you by private message if this information is needed.

## Checklist

- [ ] I have followed the **[coding style guidelines](https://github.com/centreon/centreon-plugins/blob/develop/doc/en/developer/plugins_global.md#5-code-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).
- [ ] I have provide data or shown output displaying the result of this code in the plugin area concerned.

------------------------------------------------------------------------------------------------------
# Centreon team

## Description

**PLEASE MAKE SURE THAT THE BRANCH PR INCLUDES JIRA TICKET ID**

Please include a short resume of the changes and what is the purpose of this pull request.
Any relevant information should be added to help **reviewers** to understand what are the stakes
of the pull request.

**Fixes** # (issue)
If you are fixing a github Issue already existing, mention it here.
If you are fixing one or more JIRA ticket, mention it here too.

## 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](https://github.com/centreon/centreon-plugins/blob/develop/doc/en/developer/plugins_global.md#5-code-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).
- [ ] I have implemented automated tests related to my commits.
- [ ] I have reviewed all the help messages in all the .pm files I have modified.
- [ ] All sentences begin with a capital letter.
- [ ] All sentences are terminated by a period.
- [ ] I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
7 changes: 4 additions & 3 deletions .github/scripts/pod_spell_check.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Test::More;
use Test::Spelling;

if (!@ARGV) {
die "Missing perl file to check.";
die "Usage: perl pod_spell_check.t module.pm stopwords.t";
}

my $stopword_filename='tests/resources/spellcheck/stopwords.t';
Expand All @@ -14,9 +14,10 @@ if(defined($ARGV[1])){
}
open(FILE, "<", $stopword_filename)
or die "Could not open $stopword_filename";
printf("stopword file use : ".$stopword_filename." \n");
printf("Using dictionary: ".$stopword_filename." \n");

add_stopwords(<FILE>);
close(FILE);
set_spell_cmd('hunspell -l');
all_pod_files_spelling_ok($ARGV[0]);
close(FILE);

9 changes: 3 additions & 6 deletions .github/workflows/docker-builder-packaging-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
strategy:
matrix:
include:
- runner: ubuntu-22.04
dockerfile: packaging-plugins-centos7
image: packaging-plugins-centos7
- runner: ubuntu-22.04
dockerfile: packaging-plugins-alma8
image: packaging-plugins-alma8
Expand All @@ -51,22 +48,22 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Login to Registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- name: Login to proxy registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
- uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
with:
file: .github/docker/packaging/Dockerfile.${{ matrix.dockerfile }}
context: .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-builder-testing-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Login to Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- name: Login to proxy registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
- uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
with:
file: .github/docker/testing/Dockerfile.testing-plugins-${{ matrix.dockerfile }}
context: .
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
distrib: [el8, el9]
name:
[
"ARGV::Struct",
"Authen::SASL::SASLprep",
"Authen::SCRAM::Client",
"boolean",
Expand All @@ -42,9 +43,11 @@ jobs:
"Clone",
"Clone::Choose",
"common::sense",
"Config::AWS",
"Convert::Binary::C",
"Convert::EBCDIC",
"Crypt::Blowfish_PP",
"DataStruct::Flat",
"DateTime::Format::Duration::ISO8601",
"DBD::Sybase",
"Device::Modbus",
Expand All @@ -70,6 +73,8 @@ jobs:
"MIME::Types",
"Mojo::IOLoop::Signal",
"MongoDB",
"MooseX::ClassAttribute",
"Net::Amazon::Signature::V4",
"Net::DHCP",
"Net::FTPSSL",
"Net::HTTPTunnel",
Expand All @@ -91,6 +96,7 @@ jobs:
"URI::Encode",
"URI::Template",
"URL::Encode",
"URL::Encode::XS",
"UUID",
"UUID::URandom",
"WWW::Selenium",
Expand Down Expand Up @@ -130,6 +136,8 @@ jobs:
rpm_provides: "perl(Net::DHCP::Constants) perl(Net::DHCP::Packet)"
- name: "Statistics::Regression"
version: "0.53"
- name: "URL::Encode::XS"
build_distribs: el9
- name: "UUID"
version: "0.31"
- name: "ZMQ::Constants"
Expand All @@ -139,6 +147,11 @@ jobs:
- name: "ZMQ::LibZMQ4"
version: "0.01"
rpm_dependencies: "zeromq"
- name: "Mojo::IOLoop::Signal"
rpm_dependencies: "perl-Mojolicious"
rpm_provides: "perl(Mojo::IOLoop::Signal)"
no-auto-depends: true


name: package ${{ matrix.distrib }} ${{ matrix.name }}
container:
Expand Down Expand Up @@ -179,6 +192,10 @@ jobs:
done
fi
if [ ! -z "${{ matrix.no-auto-depends }}" ]; then
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
if [ -z "${{ matrix.rpm_provides }}" ]; then
PACKAGE_PROVIDES=""
else
Expand Down Expand Up @@ -216,7 +233,7 @@ jobs:
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }}
path: ./*.${{ matrix.package_extension }}
Expand Down Expand Up @@ -354,8 +371,6 @@ jobs:
image: packaging-plugins-bullseye-arm64
arch: arm64
runner_name: ["self-hosted", "collect-arm64"]
- name: "Paws"
use_dh_make_perl: "false"
- name: "Statistics::Regression"
build_distribs: "bullseye"
version: "0.53"
Expand Down Expand Up @@ -437,13 +452,12 @@ jobs:
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}-${{ steps.package-name.outputs.name_with_dash}}
path: ./*.${{ matrix.package_extension }}
retention-days: 1


merge-package-deb-artifacts:
needs: [package-deb]
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-crypt-argon2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
# set condition to true if artifacts are needed
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-json-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
# set condition to true if artifacts are needed
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}
path: ./*.${{ matrix.package_extension}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-libssh-session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
# set condition to true if artifacts are needed
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-net-curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
# set condition to true if artifacts are needed
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}
path: ./*.rpm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
fetch-depth: 1

- name: Prepare FatPacker
uses: shogo82148/actions-setup-perl@28eae78d12c2bba1163aec45d123f6d9228bc307 # v1.29.0
uses: shogo82148/actions-setup-perl@f551dafcc94572adc179bbddbb409b3ada8f8ff5 # v1.30.0
with:
perl-version: '5.34'
install-modules-with: cpm
Expand All @@ -118,7 +118,7 @@ jobs:
matrix:
include:
- package_extension: rpm
image: packaging-plugins-centos7
image: packaging-plugins-alma8
distrib: el7
- package_extension: rpm
image: packaging-plugins-alma8
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:

- if: ${{ matrix.distrib == 'el7' }}
# el7 is not compatible with checkout v4 which uses node20
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:

- name: Upload apt/dnf logs as artifacts if tests failed
if: failure()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: plugin-installation-${{ matrix.distrib }}
path: /var/log/robot-plugins-installation-tests.log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spellchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- added|modified: 'src/**/*.pm'
- name: Install CPAN Libraries
uses: shogo82148/actions-setup-perl@28eae78d12c2bba1163aec45d123f6d9228bc307 # v1.29.0
uses: shogo82148/actions-setup-perl@f551dafcc94572adc179bbddbb409b3ada8f8ff5 # v1.30.0
with:
perl-version: '5.34'
install-modules-with: cpm
Expand Down
2 changes: 1 addition & 1 deletion connectors/vmware/src/centreon/vmware/common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ sub generic_performance_values_historic {
return undef if (!defined($perfdata));

if (!$$perfdata[0] || !defined($$perfdata[0]->value)) {
set_response(code => -1, short_message => 'Cannot get value for counters (Maybe, object(s) cannot be reached: disconnected, not running, time not synced (see time-host mode),...)');
set_response(code => -1, short_message => 'Cannot get value for counters (Maybe, object(s) cannot be reached: disconnected, not running, time not synced (see time-host mode) check option --time-shift and ensure this specific metric is retrieved and not late in the vcenter)');
return undef;
}
foreach my $val (@$perfdata) {
Expand Down
5 changes: 5 additions & 0 deletions packaging/centreon-plugin-Network-Nokia-Isam-Snmp/deb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": [
"libsnmp-perl"
]
}
14 changes: 14 additions & 0 deletions packaging/centreon-plugin-Network-Nokia-Isam-Snmp/pkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pkg_name": "centreon-plugin-Network-Nokia-Isam-Snmp",
"pkg_summary": "Centreon Plugin to monitor Nokia (formerly Alcatel) Isam devices",
"plugin_name": "centreon_nokia_isam_snmp.pl",
"files": [
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/uptime.pm",
"network/nokia/isam/snmp/"
]
}
5 changes: 5 additions & 0 deletions packaging/centreon-plugin-Network-Nokia-Isam-Snmp/rpm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": [
"perl(SNMP)"
]
}
Loading

0 comments on commit ea9abfb

Please sign in to comment.