Merge branch 'develop' into MON-34064-packaging-bookworm

This commit is contained in:
Kevin Duret 2024-02-01 14:42:22 +01:00
commit d3628db0ed
144 changed files with 242 additions and 302 deletions

View File

@ -10,6 +10,9 @@ inputs:
distrib:
description: The package distrib
required: true
version:
description: The package version ([major_version].[minor_version])
required: false
major_version:
description: The major version
required: false
@ -18,7 +21,7 @@ inputs:
required: false
release:
description: The package release number
required: false
required: true
arch:
description: The package architecture
required: false
@ -37,6 +40,9 @@ inputs:
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true
stability:
description: "Branch stability (stable, testing, unstable, canary)"
required: true
runs:
using: composite
@ -59,8 +65,15 @@ runs:
RPM_GPG_SIGNING_KEY_ID: ${{ inputs.rpm_gpg_signing_key_id }}
RPM_GPG_SIGNING_PASSPHRASE: ${{ inputs.rpm_gpg_signing_passphrase }}
run: |
export MAJOR_VERSION="${{ inputs.major_version }}"
export VERSION="${{ inputs.major_version }}.${{ inputs.minor_version }}"
if [ -z ${{ inputs.version }} ]; then
export VERSION="${{ inputs.major_version }}.${{ inputs.minor_version }}"
export MAJOR_VERSION="${{ inputs.major_version }}"
export MINOR_VERSION="${{ inputs.minor_version }}"
elif [ -z ${{ inputs.major_version }} ]; then
export VERSION="${{ inputs.version }}"
export MAJOR_VERSION=$( echo $VERSION | cut -d "-" -f1 )
export MINOR_VERSION=$( echo $VERSION | cut -d "-" -f2 )
fi
export RELEASE="${{ inputs.release }}"
export ARCH="${{ inputs.arch }}"
@ -70,23 +83,28 @@ runs:
export APACHE_GROUP="apache"
else
export DIST=""
if [ "${{ inputs.stability }}" == "unstable" ] || [ "${{ inputs.stability }}" == "canary" ]; then
export RELEASE="$RELEASE~${{ inputs.distrib }}"
elif [ "${{ inputs.stability }}" == "testing" ]; then
export RELEASE="1~${{ inputs.distrib }}"
fi
export APACHE_USER="www-data"
export APACHE_GROUP="www-data"
fi
MAJOR_LEFT=$( echo $MAJOR_VERSION | cut -d "." -f1 )
MAJOR_RIGHT=$( echo $MAJOR_VERSION | cut -d "-" -f1 | cut -d "." -f2 )
BUMP_MAJOR_RIGHT=$(( MAJOR_RIGHT_PART + 1 ))
if [ "$MAJOR_RIGHT" = "04" ]; then
BUMP_MAJOR_LEFT="$MAJOR_LEFT"
BUMP_MAJOR_RIGHT="10"
else
BUMP_MAJOR_LEFT=$(( $MAJOR_LEFT + 1 ))
BUMP_MAJOR_RIGHT="04"
if [ -z "$MAJOR_VERSION" ]; then
MAJOR_LEFT=$( echo $VERSION | cut -d "." -f1 )
MAJOR_RIGHT=$( echo $VERSION | cut -d "-" -f1 | cut -d "." -f2 )
if [ "$MAJOR_RIGHT" == "04" ]; then
BUMP_MAJOR_LEFT="$MAJOR_LEFT"
BUMP_MAJOR_RIGHT="10"
else
BUMP_MAJOR_LEFT=$(( $MAJOR_LEFT + 1 ))
BUMP_MAJOR_RIGHT="04"
fi
export NEXT_MAJOR_VERSION="$BUMP_MAJOR_LEFT.$BUMP_MAJOR_RIGHT"
fi
export NEXT_MAJOR_VERSION="$BUMP_MAJOR_LEFT.$BUMP_MAJOR_RIGHT"
export RPM_SIGNING_KEY_FILE="$(pwd)/key.gpg"
export RPM_SIGNING_KEY_ID="$RPM_GPG_SIGNING_KEY_ID"
export NFPM_RPM_PASSPHRASE="$RPM_GPG_SIGNING_PASSPHRASE"

View File

@ -1,93 +0,0 @@
name: package
description: Package module using nfpm
inputs:
nfpm_file_pattern:
description: The pattern of the nfpm configuration file(s)
required: true
package_extension:
description: The package extension (deb or rpm)
required: true
distrib:
description: The package distrib
required: true
version:
description: The package version
required: false
release:
description: The package release number
required: false
commit_hash:
description: The commit hash
required: true
cache_key:
description: The package files cache key
required: true
rpm_gpg_key:
description: The rpm gpg key
required: true
rpm_gpg_signing_key_id:
description: The rpm gpg signing key identifier
required: true
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true
stability:
description: "The package stability (stable, testing, unstable, canary)"
required: true
runs:
using: composite
steps:
- name: Import gpg key
env:
RPM_GPG_SIGNING_KEY: ${{ inputs.rpm_gpg_key }}
run: echo -n "$RPM_GPG_SIGNING_KEY" > key.gpg
shell: bash
- name: Build ${{ inputs.package_extension }} files
env:
RPM_GPG_SIGNING_KEY_ID: ${{ inputs.rpm_gpg_signing_key_id }}
RPM_GPG_SIGNING_PASSPHRASE: ${{ inputs.rpm_gpg_signing_passphrase }}
run: |
export VERSION="${{ inputs.version }}"
export RELEASE="${{ inputs.release }}"
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
else
if [ "${{ inputs.stability }}" = "unstable" ] || [ "${{ inputs.stability }}" = "canary" ]; then
export RELEASE="$RELEASE-${{ inputs.distrib }}"
elif [ "${{ inputs.stability }}" = "testing" ]; then
export RELEASE="${{ inputs.distrib }}"
fi
export DIST=""
fi
export RPM_SIGNING_KEY_FILE="$(pwd)/key.gpg"
export RPM_SIGNING_KEY_ID="$RPM_GPG_SIGNING_KEY_ID"
export NFPM_RPM_PASSPHRASE="$RPM_GPG_SIGNING_PASSPHRASE"
for FILE in ${{ inputs.nfpm_file_pattern }}; do
DIRNAME=$(dirname $FILE)
BASENAME=$(basename $FILE)
cd $DIRNAME
sed -i "s/@COMMIT_HASH@/${{ inputs.commit_hash }}/g" $BASENAME
nfpm package --config $BASENAME --packager ${{ inputs.package_extension }}
cd -
mv $DIRNAME/*.${{ inputs.package_extension }} ./
done
shell: bash
- name: Upload package artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension }}
retention-days: 1
- name: Cache packages
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}

View File

@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Package
uses: ./.github/actions/package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml"
distrib: ${{ matrix.distrib }}

View File

@ -100,7 +100,7 @@ jobs:
shell: bash
- name: Package
uses: ./.github/actions/package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "nrpe/packaging/*.yaml"
distrib: ${{ matrix.distrib }}
@ -143,7 +143,7 @@ jobs:
strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]
steps:
- name: Checkout sources

View File

@ -119,11 +119,13 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 3
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
# set condition to true if artifacts are needed
- if: ${{ false }}

View File

@ -104,12 +104,14 @@ jobs:
nfpm_file_pattern: "dependencies/perl-json-path/perl-json-path.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
release: 3
arch: all
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-json-path-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-json-path-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
# set condition to true if artifacts are needed
- if: ${{ false }}

View File

@ -117,11 +117,13 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-libssh-session-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-libssh-session-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
# set condition to true if artifacts are needed
- if: ${{ false }}

View File

@ -118,10 +118,12 @@ jobs:
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-net-curl-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
release: 3
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-net-curl-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
# set condition to true if artifacts are needed
- if: ${{ false }}
@ -129,7 +131,7 @@ jobs:
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension}}
path: ./*.${{ matrix.package_extension }}
retention-days: 1
deliver-rpm:

View File

@ -157,11 +157,13 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 2
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
- name: Package libwsman
uses: ./.github/actions/package-nfpm
@ -170,11 +172,13 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
- name: Package perl-openwsman
uses: ./.github/actions/package-nfpm
@ -183,11 +187,13 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-openwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-openwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
# set condition to true if artifacts are needed
- if: ${{ false }}

View File

@ -88,12 +88,13 @@ jobs:
fail-on-cache-miss: true
- name: Package
uses: ./.github/actions/package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
commit_hash: ${{ github.sha }}
release: ${{ needs.get-environment.outputs.release }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}

View File

@ -55,7 +55,7 @@ jobs:
shell: bash
- name: Package
uses: ./.github/actions/package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "selinux/packaging/centreon-plugins-selinux.yaml"
distrib: ${{ matrix.distrib }}

View File

@ -220,7 +220,7 @@ jobs:
done
shell: bash
- uses: ./.github/actions/package
- uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: ".github/packaging/*.yaml"
distrib: ${{ matrix.distrib }}

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "0.019"
release: "2${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
release: "2${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "0.8"
release: "3${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "0.54"
release: "2${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
release: "1${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
release: "3${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -3,7 +3,7 @@ arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "2.7.2"
release: "1${DIST}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"

View File

@ -86,19 +86,19 @@ WARN : Probably not work for java -version < 7.
=item B<--warning-system>
Warning threshold of System cpuload
Warning threshold of system CPU load.
=item B<--critical-system>
Critical threshold of System cpuload
Critical threshold of system CPU load.
=item B<--warning-process>
Warning threshold of Process cpuload
Warning threshold of process CPU load.
=item B<--critical-process>
Critical threshold of Process cpuload
Critical threshold of process CPU load.
=back

View File

@ -1957,7 +1957,7 @@ __END__
=head1 MODE
Collect and compute HTTP datas.
Collect and compute HTTP data.
=over 8

View File

@ -94,7 +94,7 @@ __END__
=head1 MODE
Cache SNMP datas in a JSON cache file.
Cache SNMP data in a JSON cache file.
=over 8

View File

@ -1646,7 +1646,7 @@ __END__
=head1 MODE
Collect and compute SNMP datas.
Collect and compute SNMP data.
=over 8

View File

@ -111,7 +111,7 @@ __END__
=head1 MODE
Check host cpu utilization.
Check host CPU utilization.
=over 8

View File

@ -115,7 +115,7 @@ __END__
=head1 MODE
Check cluster cpu usage.
Check cluster CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ __END__
=head1 MODE
Check ESX cpu usage.
Check ESX CPU usage.
=over 8

View File

@ -197,7 +197,7 @@ __END__
=head1 MODE
Check virtual machine cpu usage.
Check virtual machine CPU usage.
=over 8

View File

@ -39,7 +39,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU.
=over 8

View File

@ -177,7 +177,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -110,7 +110,7 @@ Example: adding --display-transform-src='dev' --display-transform-dst='run' wil
=item B<--show-cache>
Display cache storage datas.
Display cache storage data.
=item B<--space-reservation>

View File

@ -73,7 +73,7 @@ __END__
=head1 MODE
Check cpu usage (AIRESPACE-SWITCHING-MIB).
Check CPU usage (AIRESPACE-SWITCHING-MIB).
=over 8

View File

@ -185,7 +185,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -84,7 +84,7 @@ __END__
=head1 MODE
Check cpu usage of web security and mail (ASYNCOS-MAIL-MIB, ASYNCOSWEBSECURITYAPPLIANCE-MIB).
Check CPU usage of web security and mail (ASYNCOS-MAIL-MIB, ASYNCOSWEBSECURITYAPPLIANCE-MIB).
=over 8

View File

@ -126,7 +126,7 @@ __END__
=head1 MODE
Check cpu usage (CISCOSBmng.mib).
Check CPU usage (CISCOSBmng.mib).
=over 8

View File

@ -265,13 +265,13 @@ __END__
=head1 MODE
Check cpu usage (CISCO-PROCESS-MIB and CISCO-SYSTEM-EXT-MIB).
Check CPU usage (CISCO-PROCESS-MIB and CISCO-SYSTEM-EXT-MIB).
=over 8
=item B<--check-order>
Check cpu in standard cisco mib. If you have some issue (wrong cpu information in a specific mib), you can change the order
Check CPU in standard cisco mib. If you have some issue (wrong CPU information in a specific mib), you can change the order
(default: 'process,old_sys,system_ext').
=item B<--warning-*> B<--critical-*>

View File

@ -456,7 +456,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -128,7 +128,7 @@ __END__
=head1 MODE
Check cpu load usage.
Check CPU load.
=over 8

View File

@ -161,7 +161,7 @@ __END__
=head1 MODE
Check cpu usage (FASTPATH-SWITCHING-MIB).
Check CPU usage (FASTPATH-SWITCHING-MIB).
=over 8

View File

@ -177,7 +177,7 @@ __END__
=head1 MODE
Check cpu usages.
Check CPU usage.
=over 8

View File

@ -168,7 +168,7 @@ __END__
=head1 MODE
Check system cpu usage (FORTINET-FORTIGATE-MIB).
Check system CPU usage (FORTINET-FORTIGATE-MIB).
=over 8
@ -179,11 +179,11 @@ Can be: 'core', 'average', 'cluster-average'.
=item B<--cluster>
Add cluster cpu informations.
Add cluster CPU informations.
=item B<--filter-core>
Core cpu to monitor (can be a regexp).
Core CPU to monitor (can be a regexp).
=back

View File

@ -184,7 +184,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -307,7 +307,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -93,7 +93,7 @@ Time in minutes before reloading cache file (default: 180).
=item B<--show-cache>
Display cache storage datas.
Display cache storage data.
=item B<--filter-storage-type>

View File

@ -94,19 +94,19 @@ perl centreon_plugins.pl --plugin=apps::tomcat::jmx::plugin --custommode=jolokia
=item B<--warning-system>
Warning threshold of System cpuload
Warning threshold of system CPU load.
=item B<--critical-system>
Critical threshold of System cpuload
Critical threshold of system CPU load.
=item B<--warning-process>
Warning threshold of Process cpuload
Warning threshold of process CPU load.
=item B<--critical-process>
Critical threshold of Process cpuload
Critical threshold of process CPU load.
=back

View File

@ -1534,7 +1534,7 @@ __END__
=head1 MODE
Collect and compute SQL datas.
Collect and compute SQL data.
=over 8

View File

@ -106,7 +106,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -176,7 +176,7 @@ sub add_option_msg {
sub set_ignore_label {
my ($self, %options) = @_;
$self->{option_results}->{output_ignore_label} = 1;
$self->{option_results}->{output_ignore_label} = 1;
}
sub set_status {
@ -208,7 +208,7 @@ sub output_add {
} else {
$self->{global_short_concat_outputs}->{uc($options->{severity})} = $options->{short_msg};
}
push @{$self->{global_short_outputs}->{uc($options->{severity})}}, $options->{short_msg};
$self->set_status(exit_litteral => $options->{severity});
}
@ -231,7 +231,7 @@ sub perfdata_add {
$perfdata->{$_} = $options{$_};
}
if ((defined($self->{option_results}->{use_new_perfdata}) || defined($options{force_new_perfdata})) &&
if ((defined($self->{option_results}->{use_new_perfdata}) || defined($options{force_new_perfdata})) &&
defined($options{nlabel})) {
$perfdata->{label} = $options{nlabel};
}
@ -293,7 +293,7 @@ sub output_json {
outputs => [],
perfdatas => []
}
};
};
foreach my $code_litteral (keys %{$self->{global_short_outputs}}) {
foreach (@{$self->{global_short_outputs}->{$code_litteral}}) {
@ -343,7 +343,7 @@ sub output_xml {
my ($self, %options) = @_;
my $force_ignore_perfdata = (defined($options{force_ignore_perfdata}) && $options{force_ignore_perfdata} == 1) ? 1 : 0;
my $force_long_output = (defined($options{force_long_output}) && $options{force_long_output} == 1) ? 1 : 0;
my ($child_plugin_name, $child_plugin_mode, $child_plugin_exit, $child_plugin_output, $child_plugin_perfdata);
my ($child_plugin_name, $child_plugin_mode, $child_plugin_exit, $child_plugin_output, $child_plugin_perfdata);
my $root = $self->{xml_output}->createElement('plugin');
$self->{xml_output}->setDocumentElement($root);
@ -411,7 +411,7 @@ sub output_xml {
foreach my $perf (@{$self->{perfdatas}}) {
next if ($self->filter_perfdata(perf => $perf));
$self->range_perfdata(ranges => [\$perf->{warning}, \$perf->{critical}]);
my ($child_perfdata);
$child_perfdata = $self->{xml_output}->createElement('perfdata');
$child_plugin_perfdata->addChild($child_perfdata);
@ -593,8 +593,8 @@ sub display {
$self->create_xml_document();
if ($self->{is_output_xml}) {
$self->output_xml(
exit_litteral => $self->get_litteral_status(),
nolabel => $nolabel,
exit_litteral => $self->get_litteral_status(),
nolabel => $nolabel,
force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output
);
return ;
@ -603,7 +603,7 @@ sub display {
$self->create_json_document();
if ($self->{is_output_json}) {
$self->output_json(
exit_litteral => $self->get_litteral_status(),
exit_litteral => $self->get_litteral_status(),
nolabel => $nolabel,
force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output
);
@ -615,7 +615,7 @@ sub display {
}
$self->output_txt(
exit_litteral => $self->get_litteral_status(),
exit_litteral => $self->get_litteral_status(),
nolabel => $nolabel,
force_ignore_perfdata => $force_ignore_perfdata, force_long_output => $force_long_output
);
@ -642,7 +642,7 @@ sub die_exit {
$self->output_json(exit_litteral => $exit_litteral, nolabel => $nolabel, force_ignore_perfdata => 1);
$self->exit(exit_litteral => $exit_litteral);
}
}
}
$self->output_txt(exit_litteral => $exit_litteral, nolabel => $nolabel, force_ignore_perfdata => 1);
$self->exit(exit_litteral => $exit_litteral);
@ -729,13 +729,13 @@ sub get_litteral_status {
sub is_status {
my ($self, %options) = @_;
# $options{value} = string status
# $options{value} = string status
# $options{litteral} = value is litteral
# $options{compare} = string status
# $options{compare} = string status
if (defined($options{litteral})) {
my $value = defined($options{value}) ? $options{value} : $self->get_litteral_status();
if (uc($value) eq uc($options{compare})) {
return 1;
}
@ -906,7 +906,7 @@ sub parameter {
sub add_disco_entry {
my ($self, %options) = @_;
push @{$self->{disco_entries}}, {%options};
}
@ -950,7 +950,7 @@ sub load_eval {
my ($self) = @_;
my ($code) = centreon::plugins::misc::mymodule_load(
output => $self->{output}, module => 'Safe',
output => $self->{output}, module => 'Safe',
no_quit => 1
);
if ($code == 0) {
@ -1140,8 +1140,8 @@ sub apply_pfdata_scale {
if (defined(${$options{perf}}->{max}) && ${$options{perf}}->{max} ne '') {
($value) = centreon::plugins::misc::scale_bytesbit(value => ${$options{perf}}->{max},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
dst_unit => defined($dst_unit) ? $dst_unit : $options{args}->{unit});
${$options{perf}}->{max} = sprintf('%.2f', $value);
}
@ -1153,14 +1153,14 @@ sub apply_pfdata_scale {
if ($result->{start} ne '' && $result->{infinite_neg} == 0) {
($result->{start}) = centreon::plugins::misc::scale_bytesbit(value => $result->{start},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
dst_unit => defined($dst_unit) ? $dst_unit : $options{args}->{unit});
}
if ($result->{end} ne '' && $result->{infinite_pos} == 0) {
($result->{end}) = centreon::plugins::misc::scale_bytesbit(value => $result->{end},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
src_quantity => $src_quantity, src_unit => $src_unit,
dst_quantity => defined($dst_unit) ? $dst_quantity : $options{args}->{quantity},
dst_unit => defined($dst_unit) ? $dst_unit : $options{args}->{unit});
}
@ -1216,7 +1216,7 @@ sub apply_pfdata_percent {
${$options{perf}}->{$threshold} = centreon::plugins::misc::get_threshold_litteral(%$result);
}
${$options{perf}}->{max} = 100;
${$options{perf}}->{max} = 100;
}
sub apply_pfdata_eval {
@ -1364,7 +1364,7 @@ sub parse_perfdata_extend_args {
my ($self, %options) = @_;
# --extend-perfdata=searchlabel,newlabel,method[,[newuom],[min],[max],[warning],[critical]]
my ($pfdata_match, $pfdata_substitute, $method, $uom_sub, $min_sub, $max_sub, $warn_sub, $crit_sub) =
my ($pfdata_match, $pfdata_substitute, $method, $uom_sub, $min_sub, $max_sub, $warn_sub, $crit_sub) =
split /,/, $options{arg};
return if ((!defined($pfdata_match) || $pfdata_match eq '') && $options{type} != 3);
@ -1539,29 +1539,29 @@ remove all metrics whose value equals 0 and that don't have a maximum value.
=item B<--explode-perfdata-max>
Create a new metric for each metric that comes with a maximum limit. The new
metric will be named identically with a '_max' suffix).
metric will be named identically with a '_max' suffix).
Example: it will split 'used_prct'=26.93%;0:80;0:90;0;100
into 'used_prct'=26.93%;0:80;0:90;0;100 'used_prct_max'=100%;;;;
=item B<--change-perfdata> B<--extend-perfdata>
=item B<--change-perfdata> B<--extend-perfdata>
Change or extend perfdata.
Change or extend perfdata.
Syntax: --extend-perfdata=searchlabel,newlabel,target[,[newuom],[min],[max]]
Common examples:
=over 4
Convert storage free perfdata into used: --change-perfdata=free,used,invert()
Convert storage free perfdata into used: --change-perfdata='free,used,invert()'
Convert storage free perfdata into used: --change-perfdata=used,free,invert()
Convert storage free perfdata into used: --change-perfdata='used,free,invert()'
Scale traffic values automatically: --change-perfdata=traffic,,scale(auto)
Scale traffic values automatically: --change-perfdata='traffic,,scale(auto)'
Scale traffic values in Mbps: --change-perfdata=traffic_in,,scale(Mbps),mbps
Scale traffic values in Mbps: --change-perfdata='traffic_in,,scale(Mbps),mbps'
Change traffic values in percent: --change-perfdata=traffic_in,,percent()
Change traffic values in percent: --change-perfdata='traffic_in,,percent()'
=back
@ -1622,7 +1622,7 @@ and an output.
=item B<--output-ignore-label>
Remove the status label ("OK:", "WARNING:", "UNKNOWN:", CRITICAL:") from the
Remove the status label ("OK:", "WARNING:", "UNKNOWN:", CRITICAL:") from the
beginning of the output.
Example: 'OK: Ram Total:...' will become 'Ram Total:...'

View File

@ -158,7 +158,7 @@ Check containers CPU usage and throttled.
=item B<--cpu-attribute>
Set the cpu attribute to match element (must be a PromQL filter, Default: 'cpu="total"')
Set the CPU attribute to match element (must be a PromQL filter, Default: 'cpu="total"')
=item B<--container>

View File

@ -182,7 +182,7 @@ Filter on a specific instance (must be a PromQL filter, Default: 'instance=~".*"
=item B<--cpu>
Filter on a specific cpu (must be a PromQL filter, Default: 'cpu=~".*"')
Filter on a specific CPU (must be a PromQL filter, Default: 'cpu=~".*"')
=item B<--warning-*>

View File

@ -312,7 +312,7 @@ Filter on a specific instance (must be a PromQL filter, Default: 'instance=~".*"
=item B<--cpu>
Filter on a specific cpu (must be a PromQL filter, Default: 'cpu=~".*"')
Filter on a specific CPU (must be a PromQL filter, Default: 'cpu=~".*"')
=item B<--type>

View File

@ -81,7 +81,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -72,7 +72,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU usage.
=over 8

View File

@ -142,7 +142,7 @@ __END__
=head1 MODE
Check device cpu, memory and state.
Check device CPU, memory and state.
=over 8

View File

@ -120,7 +120,7 @@ __END__
=head1 MODE
Check cpu usages.
Check CPU usages.
=over 8

View File

@ -383,7 +383,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -172,7 +172,7 @@ __END__
=head1 MODE
Check cpu usage (AlcatelIND1Health.mib).
Check CPU usage (AlcatelIND1Health.mib).
=over 8

View File

@ -95,7 +95,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -100,7 +100,7 @@ __END__
=head1 MODE
Check cpu (worked since firmware 10.10).
Check CPU (worked since firmware 10.10).
=over 8

View File

@ -45,7 +45,7 @@ Check system CPUs.
=item B<--use-ucd>
Use UCD mib for cpu average.
Use UCD mib for CPU average.
=item B<--warning-average>

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -477,7 +477,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -75,7 +75,7 @@ __END__
=head1 MODE
Check system cpu load.
Check system CPU load.
=over 8

View File

@ -45,6 +45,6 @@ __END__
=head1 PLUGIN DESCRIPTION
Check Beeware equipments in SNMP.
Please use plugin SNMP Linux for system checks ('cpu', 'memory', 'traffic',...).
Please use the SNMP Linux plugin for system checks (CPU, memory, traffic, ...).
=cut

View File

@ -97,7 +97,7 @@ __END__
=head1 MODE
Check system cpu usage (SW.mib).
Check system CPU usage (SW.mib).
=over 8

View File

@ -377,7 +377,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -116,7 +116,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -98,7 +98,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -74,7 +74,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -83,7 +83,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -87,7 +87,7 @@ __END__
=head1 MODE
Check cpu usage (NS-MIB-smiv2).
Check CPU usage (NS-MIB-smiv2).
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -84,7 +84,7 @@ __END__
=head1 MODE
Check cpu usage (sarian-monitor.mib).
Check CPU usage (sarian-monitor.mib).
=over 8

View File

@ -131,7 +131,7 @@ __END__
=head1 MODE
Check cpu usage (env_mib.mib).
Check CPU usage (env_mib.mib).
=over 8

View File

@ -256,13 +256,13 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8
=item B<--check-order>
Check cpu in standard dlink mib. If you have some issue (wrong cpu information in a specific mib), you can change the order
Check CPU in standard dlink mib. If you have some issue (wrong CPU information in a specific mib), you can change the order
(default: 'common,industrial,agent').
=item B<--warning-*> B<--critical-*>

View File

@ -248,7 +248,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -46,6 +46,6 @@ __END__
=head1 PLUGIN DESCRIPTION
Check Efficient IP equipment in SNMP.
Please use plugin SNMP Linux for system checks ('cpu', 'memory', 'traffic',...).
Please use the SNMP Linux plugin for system checks (CPU, memory, traffic, ...).
=cut

View File

@ -260,7 +260,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -201,7 +201,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -56,6 +56,6 @@ __END__
=head1 PLUGIN DESCRIPTION
Check F-5 hardware in SNMP.
Please use plugin SNMP Linux for system checks ('cpu', 'memory', 'traffic',...).
Please use the SNMP Linux plugin for system checks (CPU, memory, traffic, ...).
=cut

View File

@ -79,7 +79,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU usage.
=over 8

View File

@ -168,7 +168,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -73,7 +73,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -72,7 +72,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -72,7 +72,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -120,7 +120,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU usage.
=over 8

View File

@ -101,7 +101,7 @@ __END__
=head1 MODE
Check cpu.
Check CPU usage.
=over 8

View File

@ -173,7 +173,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -81,7 +81,7 @@ __END__
=head1 MODE
Check cpu usage (hpSwitchStat.mib).
Check CPU usage (hpSwitchStat.mib).
=over 8

View File

@ -394,7 +394,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -303,7 +303,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

View File

@ -141,7 +141,7 @@ __END__
=head1 MODE
Check cpu usage.
Check CPU usage.
=over 8

View File

@ -378,7 +378,7 @@ Example: adding --display-transform-src='eth' --display-transform-dst='ens' wil
=item B<--show-cache>
Display cache interface datas.
Display cache interface data.
=back

Some files were not shown because too many files have changed in this diff Show More