Merge pull request from centreon/release-20230706

Release 20230706
This commit is contained in:
David Boucher 2023-07-06 18:37:29 +02:00 committed by GitHub
commit abf27fca30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1584 changed files with 11535 additions and 6556 deletions
.github
doc
CI.md
en/developer
fr/developer
packaging
centreon-plugin-Applications-Cisco-Ssms-Restapi
centreon-plugin-Applications-Databases-Elasticsearch
centreon-plugin-Applications-Monitoring-Centreon-Central
centreon-plugin-Applications-Monitoring-Iplabel-Datametrie-Restapi
centreon-plugin-Applications-Protocol-Snmp
centreon-plugin-Applications-Sailpoint-Identitynow-Restapi
centreon-plugin-Applications-Tosca-Restapi
centreon-plugin-Applications-Veeam-Vbem-Restapi
centreon-plugin-Applications-Video-Openheadend-Snmp
centreon-plugin-Cloud-Aws-Cloudwatch-Api
centreon-plugin-Cloud-Aws-Cloudwatchlogs-Api
centreon-plugin-Cloud-Azure-Compute-VirtualMachine-Api
centreon-plugin-Cloud-Azure-Management-Monitor-Api
centreon-plugin-Cloud-Azure-Management-Resource-Api
centreon-plugin-Cloud-Azure-Network-LoadBalancer-Api
centreon-plugin-Cloud-Azure-Network-NetworkInterface-Api
centreon-plugin-Cloud-Azure-Storage-StorageAccount-Api
centreon-plugin-Hardware-Devices-Masterclock-Ntp100gps-Snmp
centreon-plugin-Hardware-Sensors-Rittal-Cmc3-Snmp
centreon-plugin-Hardware-Servers-Hp-Ilo-Xmlapi
centreon-plugin-Hardware-Servers-Ibm-Imm-Snmp
centreon-plugin-Hardware-Storage-Oracle-Zs-Snmp
centreon-plugin-Network-Cisco-Meraki-Restapi
centreon-plugin-Network-Fortinet-Fortimail-Snmp
centreon-plugin-Network-Fritzbox-Upnp
centreon-plugin-Network-Routers-Atrica-Snmp
centreon-plugin-Operatingsystems-Hpux-Snmp
src/apps
antivirus
apache/serverstatus/mode
automation/ansible/tower/mode
backup
arcserve/udp/mssql/mode
backupexec/local/mode
commvault/commserve/restapi
netapp/snapcenter/restapi/mode
netbackup/local/mode

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
* @centreon/perl-reviewers
.github/ @centreon/perl-reviewers @centreon/automation-reviewers

View File

@ -24,10 +24,11 @@ runs:
using: "composite"
steps:
- name: Use cache DEB files
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ./*.deb
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- name: Publish DEBs to Nexus
run: |

View File

@ -24,10 +24,11 @@ runs:
using: "composite"
steps:
- name: Use cache DEB files
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ./*.deb
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- uses: jfrog/setup-jfrog-cli@v3
env:

View File

@ -1,84 +1,85 @@
name: package
description: Package module
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 (el8, bullseye...)
required: true
image_name:
description: The docker image name
required: true
script_name:
description: The packaging script name
plugins:
description: List of plugins to package
description: The package distrib
required: true
version:
description: The plugins version
required: true
description: The package version
required: false
release:
description: The release number
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
sign:
description: Wether to sign the package or not
default: ""
registry_url:
description: Docker registry url
rpm_gpg_key:
description: The rpm gpg key
required: true
registry_username:
description: Docker registry username
rpm_gpg_signing_key_id:
description: The rpm gpg signing key identifier
required: true
registry_password:
description: Docker registry password
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true
runs:
using: composite
steps:
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry_url }}
username: ${{ inputs.registry_username }}
password: ${{ inputs.registry_password }}
- 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: Package
uses: ./.github/actions/runner-docker
with:
script_name: ${{ inputs.script_name }}
image_name: ${{ inputs.image_name }}
image_version: latest
registry_url: ${{ inputs.registry_url }}
registry_username: ${{ inputs.registry_username }}
registry_password: ${{ inputs.registry_password }}
params: ${{ inputs.version }} ${{ inputs.release }} "${{ inputs.plugins }}"
- 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 }}"
- name: Sign
if: ${{ inputs.sign != '' && inputs.package_extension == 'rpm' }}
uses: ./.github/actions/runner-docker
with:
script_name: rpm-signing
image_name: rpm-signing
image_version: ubuntu
registry_url: ${{ inputs.registry_url }}
registry_username: ${{ inputs.registry_username }}
registry_password: ${{ inputs.registry_password }}
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
else
export DIST=""
fi
- name: Cache packaged files
uses: actions/cache@v3
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}
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"
- if: ${{ inputs.distrib == 'el8' }}
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@v3
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension }}
retention-days: 1
- name: Cache packages
uses: actions/cache/save@v3
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}

View File

@ -36,10 +36,11 @@ runs:
using: "composite"
steps:
- name: Use cache RPM files
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ./*.rpm
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- name: Setup awscli
run: |

View File

@ -21,10 +21,11 @@ runs:
using: "composite"
steps:
- name: Use cache RPM files
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ./*.rpm
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- uses: jfrog/setup-jfrog-cli@v3
env:

View File

@ -10,7 +10,7 @@ baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo
dnf -y install git gettext rpm-build dos2unix python3 epel-release nfpm zstd
dnf -y install git gettext rpm-build dos2unix python3 epel-release nfpm jq zstd
dnf -y install perl-App-cpanminus perl-JSON
cpanm App::FatPacker
cpanm File::Copy::Recursive

View File

@ -10,7 +10,7 @@ baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo
dnf -y install git gettext rpm-build dos2unix python3 epel-release nfpm zstd
dnf -y install git gettext rpm-build dos2unix python3 epel-release nfpm jq zstd
dnf -y install perl-App-cpanminus perl-JSON
cpanm App::FatPacker
cpanm File::Copy::Recursive

View File

@ -10,8 +10,8 @@ baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo
yum -y install git gettext rpm-build dos2unix python3 epel-release nfpm zstd
yum -y install perl-App-FatPacker perl-File-Copy-Recursive perl-JSON
yum -y install git gettext rpm-build dos2unix python3 epel-release nfpm
yum -y install perl-App-FatPacker perl-File-Copy-Recursive perl-JSON jq zstd
yum clean all
EOF

View File

@ -0,0 +1,88 @@
name: "@PACKAGE_NAME@"
arch: "all"
platform: "linux"
version_schema: "none"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"
description: |
@SUMMARY@
Commit: @COMMIT_HASH@
vendor: "Centreon"
homepage: "https://centreon.com"
license: "Apache-2.0"
contents:
- src: "../../build/@PLUGIN_NAME@/*"
dst: "/usr/lib/centreon/plugins/"
file_info:
mode: 0775
conflicts:
[@CONFLICTS@]
replaces:
[@REPLACES@]
provides:
[@PROVIDES@]
overrides:
rpm:
depends: [
perl(Digest::MD5),
perl(Pod::Find),
perl-Net-Curl,
perl(URI::Encode),
perl(LWP::UserAgent),
perl(LWP::Protocol::https),
perl(IO::Socket::SSL),
perl(URI),
perl(HTTP::ProxyPAC),
perl-CryptX,
perl(MIME::Base64),
perl(JSON::XS),
perl-JSON-Path,
perl-KeePass-Reader,
perl(Storable),
perl(POSIX),
perl(Encode),
@RPM_DEPENDENCIES@
]
conflicts:
[@RPM_CONFLICTS@]
replaces:
[@RPM_REPLACES@]
provides:
[@RPM_PROVIDES@]
deb:
depends: [
libpod-parser-perl,
libnet-curl-perl,
liburi-encode-perl,
libwww-perl,
liblwp-protocol-https-perl,
libhttp-cookies-perl,
libio-socket-ssl-perl,
liburi-perl,
libhttp-proxypac-perl,
libcryptx-perl,
libjson-xs-perl,
libjson-path-perl,
libcrypt-argon2-perl,
libkeepass-reader-perl,
libdatetime-perl,
@DEB_DEPENDENCIES@
]
conflicts:
[@DEB_CONFLICTS@]
replaces:
[@DEB_REPLACES@]
provides:
[@DEB_PROVIDES@]
rpm:
compression: xz
signature:
key_file: ${RPM_SIGNING_KEY_FILE}
key_id: ${RPM_SIGNING_KEY_ID}

View File

@ -1,24 +0,0 @@
Package: @NAME@
Architecture: all
Description: @SUMMARY@@CUSTOM_PKG_DATA@
Depends:
${shlibs:Depends},
${misc:Depends},
libpod-parser-perl,
libnet-curl-perl,
liburi-encode-perl,
libwww-perl,
liblwp-protocol-https-perl,
libhttp-cookies-perl,
libio-socket-ssl-perl,
liburi-perl,
libhttp-proxypac-perl,
libcryptx-perl,
libjson-xs-perl,
libjson-path-perl,
libcrypt-argon2-perl,
libkeepass-reader-perl,
libdatetime-perl,
@REQUIRES@

View File

@ -1,12 +0,0 @@
Source: centreon-plugins
Section: net
Priority: optional
Maintainer: Centreon <contact@centreon.com>
Build-Depends:
debhelper-compat (= 12),
libapp-fatpacker-perl,
libfile-copy-recursive-perl,
libjson-perl
Standards-Version: 4.5.0
Homepage: https://www.centreon.com

View File

@ -1,29 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: centreon-collect
Upstream-Contact: Centreon <contact@centreon.com>
Source: https://www.centreon.com
Files: *
Copyright: 2023 Centreon
License: Apache-2.0
Files: debian/*
Copyright: 2023 Centreon
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

View File

@ -1 +0,0 @@
plugins/@DIR@/@NAME@ usr/lib/centreon/plugins

View File

@ -1,7 +0,0 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_clean:
override_dh_auto_build:

View File

@ -1 +0,0 @@
3.0 (quilt)

View File

@ -1,48 +0,0 @@
Name: @NAME@
Version: @VERSION@
Release: @RELEASE@%{?dist}
Source0: %{name}-%{version}.tar.gz
Summary: @SUMMARY@
Group: Development/Libraries
License: Apache-2.0
URL: https://www.centreon.com/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
AutoReqProv: no
AutoReqProv: no
Requires: perl(Digest::MD5)
Requires: perl(Pod::Find)
Requires: perl-Net-Curl
Requires: perl(URI::Encode)
Requires: perl(LWP::UserAgent)
Requires: perl(LWP::Protocol::https)
Requires: perl(IO::Socket::SSL)
Requires: perl(URI)
Requires: perl(HTTP::ProxyPAC)
Requires: perl-CryptX
Requires: perl(MIME::Base64)
Requires: perl(JSON::XS)
Requires: perl-JSON-Path
Requires: perl-KeePass-Reader
Requires: perl(Storable)
Requires: perl(POSIX)
Requires: perl(Encode)
@REQUIRES@
@CUSTOM_PKG_DATA@
%description
Centreon plugin
%prep
%setup -q
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/lib/centreon/plugins/
%{__install} -m 775 *.pl %{buildroot}%{_prefix}/lib/centreon/plugins/
%files
%defattr(-,root,root,-)
%{_prefix}/lib/centreon/plugins/@PLUGIN_NAME@

View File

@ -1,55 +0,0 @@
#!/bin/bash
set -e
VERSION="$1"
RELEASE="$2"
PLUGINS="$3"
cd /src
mkdir -p centreon-plugins/plugins
cp -R .github/packaging/debian centreon-plugins/debian
mv centreon-plugins/debian/control.head.template centreon-plugins/debian/control
for PLUGIN in $PLUGINS; do
PACKAGE_PATH=$PLUGIN
if [[ "$PLUGIN" =~ (.+)"=>"(.+) ]]; then
PACKAGE_PATH=$(echo ${BASH_REMATCH[1]})
PLUGIN=$(echo ${BASH_REMATCH[2]})
fi
PLUGIN_NAME_LOWER=$(echo "$PLUGIN" | tr '[:upper:]' '[:lower:]')
echo "::group::Preparing $PLUGIN_NAME_LOWER"
mkdir centreon-plugins/plugins/$PLUGIN
cp -R build/$PLUGIN/*.pl centreon-plugins/plugins/$PLUGIN
# Process package files
pkg_values=($(cat "packaging/$PACKAGE_PATH/pkg.json" | jq -r '.pkg_name,.plugin_name'))
pkg_summary=$(echo "${pkg_values[0]}")
plugin_name=$(echo "${pkg_values[1]}")
deb_dependencies=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.dependencies | join(",\\n ")')
deb_custom_pkg_data=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.custom_pkg_data // "" | if . != "" then ("\\n" + .) else "" end')
sed -e "s/@NAME@/$PLUGIN_NAME_LOWER/g" \
-e "s/@SUMMARY@/$pkg_summary/g" \
-e "s/@REQUIRES@/$deb_dependencies/g" \
-e "s/@CUSTOM_PKG_DATA@/$deb_custom_pkg_data/g" \
< centreon-plugins/debian/control.body.template \
>> centreon-plugins/debian/control
# .install file
sed -e "s/@DIR@/$PLUGIN/g" -e "s/@NAME@/$plugin_name/g" < centreon-plugins/debian/plugin.install.template >> centreon-plugins/debian/$PLUGIN_NAME_LOWER.install
echo "::endgroup::"
done
rm -f centreon-plugins/debian/*.template
tar czf centreon-plugins-${VERSION}-${RELEASE}.tar.gz centreon-plugins
cd centreon-plugins
debmake -f "Centreon" -e "contact@centreon.com" -u "${VERSION}-${RELEASE}" -y -r "bullseye"
debuild-pbuilder --no-lintian

View File

@ -1,37 +0,0 @@
#!/bin/bash
set -e
VERSION="$1"
RELEASE="$2"
PLUGINS="$3"
for PLUGIN_NAME in $PLUGINS; do
echo "::group::Packaging $PLUGIN_NAME"
PACKAGE_PATH=$PLUGIN_NAME
if [[ "$PLUGIN_NAME" =~ (.+)"=>"(.+) ]]; then
PACKAGE_PATH=$(echo ${BASH_REMATCH[1]})
PLUGIN_NAME=$(echo ${BASH_REMATCH[2]})
fi
# Process specfile
rm -f plugin.specfile
python3 .github/scripts/create-spec-file.py "$PACKAGE_PATH" "$PLUGIN_NAME" "$VERSION" "$RELEASE"
rm -rf $HOME/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p $HOME/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
mv build/$PLUGIN_NAME $PLUGIN_NAME-$VERSION
tar czf $PLUGIN_NAME-$VERSION.tar.gz $PLUGIN_NAME-$VERSION
mv $PLUGIN_NAME-$VERSION.tar.gz $HOME/rpmbuild/SOURCES/
cd $PLUGIN_NAME-$VERSION
rpmbuild -ba ../plugin.specfile
find $HOME/rpmbuild/RPMS -name *.rpm -exec mv {} /src/ \;
cd -
echo "::endgroup::"
done

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -ex
export GPG_TTY=$(tty)
rpmsign --addsign /src/*.rpm

View File

@ -29,6 +29,7 @@ jobs:
package:
needs:
- get-environment
runs-on: ubuntu-22.04
strategy:
matrix:
include:
@ -41,18 +42,32 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: package ${{ matrix.distrib }}
uses: ./.github/workflows/package.yml
with:
nfpm_file_pattern: "connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
image_name: ${{ matrix.image }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
secrets: inherit
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Package
uses: ./.github/actions/package
with:
nfpm_file_pattern: "connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
commit_hash: ${{ github.sha }}
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 }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
deliver-rpm:
needs:

View File

@ -1,117 +0,0 @@
on:
workflow_call:
inputs:
nfpm_file_pattern:
type: string
description: The pattern of the nfpm configuration file(s)
required: true
distrib:
type: string
description: The distrib
required: true
package_extension:
type: string
description: The package extension (deb or rpm)
required: true
image_name:
type: string
description: The image name
required: true
version:
type: string
description: The package version
required: false
release:
type: string
description: The release number
required: false
source_cache_key:
type: string
description: The source files cache key
required: false
source_cache_path:
type: string
description: The source files path
required: false
cache_key:
type: string
description: The package files cache key
required: true
jobs:
package:
runs-on: ubuntu-22.04
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ inputs.image_name }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Import gpg key
env:
RPM_GPG_SIGNING_KEY: ${{ secrets.RPM_GPG_SIGNING_KEY }}
run: echo -n "$RPM_GPG_SIGNING_KEY" > key.gpg
shell: bash
- if: ${{ inputs.source_cache_key != '' && inputs.source_cache_path != '' }}
name: Import source files
uses: actions/cache/restore@v3
with:
path: ${{ inputs.source_cache_path }}
key: ${{ inputs.source_cache_key }}
fail-on-cache-miss: true
- name: Build ${{ inputs.package_extension }} files
env:
RPM_GPG_SIGNING_KEY_ID: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
RPM_GPG_SIGNING_PASSPHRASE: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
run: |
export VERSION="${{ inputs.version }}"
export RELEASE="${{ inputs.release }}"
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
export APACHE_USER="apache"
export APACHE_GROUP="apache"
else
export DIST=""
export APACHE_USER="www-data"
export APACHE_GROUP="www-data"
fi
export PERL_SITELIB="$(eval "$(perl -V:installsitelib)"; echo $installsitelib)"
export PERL_VENDORLIB="$(eval "$(perl -V:installvendorlib)"; echo $installvendorlib)"
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@/${{ github.sha }}/g; s#@PERL_SITELIB@#${PERL_SITELIB}#g; s#@PERL_VENDORLIB@#${PERL_VENDORLIB}#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@v3
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension }}
retention-days: 1
- name: Cache packages
uses: actions/cache@v3
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}

View File

@ -49,6 +49,7 @@ jobs:
package:
needs:
- get-sources
runs-on: ubuntu-22.04
strategy:
matrix:
include:
@ -61,18 +62,37 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: package ${{ matrix.distrib }}
uses: ./.github/workflows/package.yml
with:
nfpm_file_pattern: "dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
image_name: ${{ matrix.image }}
source_cache_key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
source_cache_path: vmware-vsphere-cli-distrib
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
secrets: inherit
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Import source files
uses: actions/cache/restore@v3
with:
path: vmware-vsphere-cli-distrib
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
fail-on-cache-miss: true
- name: Package
uses: ./.github/actions/package
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 }}
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 }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
deliver-rpm:
needs:

View File

@ -46,10 +46,11 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- name: Deliver sources
uses: ./.github/actions/release-sources
@ -66,7 +67,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distrib: [el7, el8, el9]
distrib: [el7]
steps:
- name: Checkout sources
@ -82,11 +83,12 @@ jobs:
artifactory_token: ${{ secrets.artifactory_token }}
deliver-rpm-legacy:
if: ${{ inputs.stability == 'stable' }}
runs-on: [self-hosted, common]
strategy:
fail-fast: false
matrix:
distrib: [el7, el8]
distrib: [el7]
major_version: ["21.10", "22.04", "22.10"]
steps:
@ -107,6 +109,7 @@ jobs:
stability: ${{ inputs.stability }}
deliver-deb:
if: ${{ inputs.stability == 'REMOVE-LINE' }}
runs-on: [self-hosted, common]
strategy:
fail-fast: false
@ -126,6 +129,7 @@ jobs:
artifactory_token: ${{ secrets.artifactory_token }}
deliver-deb-legacy:
if: ${{ inputs.stability == 'RESET-TO-STABLE' }}
runs-on: [self-hosted, common]
strategy:
fail-fast: false

View File

@ -1,88 +0,0 @@
on:
workflow_call:
inputs:
plugins:
required: true
type: string
version:
required: true
type: string
release:
required: true
type: string
secrets:
registry_username:
required: true
registry_password:
required: true
jobs:
fatpacker:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Prepare FatPacker
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.34'
install-modules-with: cpm
install-modules: App::FatPacker File::Copy::Recursive JSON
- name: Run FatPacker
run: |
COMMIT=$(git log -1 HEAD --pretty=format:%h)
perl .github/scripts/plugins-source.container.pl "${{ inputs.plugins }}" "${{ inputs.version }} ($COMMIT)"
- uses: actions/cache@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
package:
runs-on: ubuntu-22.04
needs: [fatpacker]
strategy:
matrix:
include:
- package_extension: rpm
image: packaging-plugins-centos7
distrib: el7
- package_extension: rpm
image: packaging-plugins-alma8
distrib: el8
- package_extension: rpm
image: packaging-plugins-alma9
distrib: el9
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
name: "package ${{ matrix.distrib }}"
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
- uses: ./.github/actions/package
with:
package_extension: ${{ matrix.package_extension }}
distrib: ${{ matrix.distrib }}
image_name: ${{ matrix.image }}
script_name: plugin-packaging-${{ matrix.package_extension }}
plugins: ${{ inputs.plugins }}
version: ${{ inputs.version }}
release: ${{ inputs.release }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
sign: true
registry_url: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
registry_username: ${{ secrets.registry_username }}
registry_password: ${{ secrets.registry_password }}

View File

@ -84,17 +84,144 @@ jobs:
fi
shell: bash
package:
fatpacker:
if: ${{ needs.get-plugins.outputs.plugins != '' }}
needs: [get-environment, get-plugins]
uses: ./.github/workflows/plugin-package.yml
with:
plugins: ${{ needs.get-plugins.outputs.plugins }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
secrets:
registry_username: ${{ secrets.DOCKER_REGISTRY_ID }}
registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Prepare FatPacker
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.34'
install-modules-with: cpm
install-modules: App::FatPacker File::Copy::Recursive JSON
- name: Run FatPacker
run: |
COMMIT=$(git log -1 HEAD --pretty=format:%h)
perl .github/scripts/plugins-source.container.pl "${{ needs.get-plugins.outputs.plugins }}" "${{ needs.get-environment.outputs.version }} ($COMMIT)"
- uses: actions/cache/save@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
package:
runs-on: ubuntu-22.04
needs: [get-environment, get-plugins, fatpacker]
strategy:
fail-fast: false
matrix:
include:
- package_extension: rpm
image: packaging-plugins-centos7
distrib: el7
- package_extension: rpm
image: packaging-plugins-alma8
distrib: el8
- package_extension: rpm
image: packaging-plugins-alma9
distrib: el9
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: "package ${{ matrix.distrib }}"
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache/restore@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- run: |
PLUGINS="${{ needs.get-plugins.outputs.plugins }}"
for PLUGIN in $PLUGINS; do
PACKAGE_PATH=$PLUGIN
if [[ "$PLUGIN" =~ (.+)"=>"(.+) ]]; then
PACKAGE_PATH=$(echo ${BASH_REMATCH[1]})
PLUGIN=$(echo ${BASH_REMATCH[2]})
fi
PLUGIN_NAME_LOWER=$(echo "$PLUGIN" | tr '[:upper:]' '[:lower:]')
echo "::group::Preparing $PLUGIN_NAME_LOWER"
# Process package files
pkg_values=($(cat "packaging/$PACKAGE_PATH/pkg.json" | jq -r '.pkg_name,.plugin_name'))
pkg_summary=$(echo "${pkg_values[0]}")
plugin_name=$(echo "${pkg_values[1]}")
conflicts=$(cat "packaging/$PACKAGE_PATH/pkg.json" | jq -r '.conflicts // [] | join(",")')
replaces=$(cat "packaging/$PACKAGE_PATH/pkg.json" | jq -r '.replaces // [] | join(",")')
provides=$(cat "packaging/$PACKAGE_PATH/pkg.json" | jq -r '.provides // [] | join(",")')
deb_dependencies=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.dependencies // [] | join(",")')
deb_conflicts=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.conflicts // [] | join(",")')
deb_replaces=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.replaces // [] | join(",")')
deb_provides=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.provides // [] | join(",")')
rpm_dependencies=$(cat "packaging/$PACKAGE_PATH/rpm.json" | jq -r '.dependencies // [] | join(",")')
rpm_conflicts=$(cat "packaging/$PACKAGE_PATH/rpm.json" | jq -r '.conflicts // [] | join(",")')
rpm_replaces=$(cat "packaging/$PACKAGE_PATH/rpm.json" | jq -r '.replaces // [] | join(",")')
rpm_provides=$(cat "packaging/$PACKAGE_PATH/rpm.json" | jq -r '.provides // [] | join(",")')
sed -e "s/@PLUGIN_NAME@/$PLUGIN/g;" \
-e "s/@SUMMARY@/$pkg_summary/g" \
-e "s/@CONFLICTS@/$conflicts/g" \
-e "s/@REPLACES@/$replaces/g" \
-e "s/@PROVIDES@/$provides/g" \
-e "s/@DEB_DEPENDENCIES@/$deb_dependencies/g" \
-e "s/@DEB_CONFLICTS@/$deb_conflicts/g" \
-e "s/@DEB_REPLACES@/$deb_replaces/g" \
-e "s/@DEB_PROVIDES@/$deb_provides/g" \
-e "s/@RPM_DEPENDENCIES@/$rpm_dependencies/g" \
-e "s/@RPM_CONFLICTS@/$rpm_conflicts/g" \
-e "s/@RPM_REPLACES@/$rpm_replaces/g" \
-e "s/@RPM_PROVIDES@/$rpm_provides/g" \
< .github/packaging/centreon-plugin.yaml.template \
>> .github/packaging/$PLUGIN.yaml
if [ "${{ matrix.package_extension }}" = "rpm" ]; then
sed -i "s/@PACKAGE_NAME@/$PLUGIN/g" \
.github/packaging/$PLUGIN.yaml
else
sed -i "s/@PACKAGE_NAME@/$PLUGIN_NAME_LOWER/g" \
.github/packaging/$PLUGIN.yaml
fi
cat .github/packaging/$PLUGIN.yaml
echo "::endgroup::"
done
shell: bash
- uses: ./.github/actions/package
with:
nfpm_file_pattern: ".github/packaging/*.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
commit_hash: ${{ github.sha }}
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 }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
deliver:
needs: [get-environment, package]

View File

@ -1,26 +1,37 @@
name: Run mock API server
name: Functional tests
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- MON-**
pull_request:
paths:
- 'src/**'
- 'tests/functional/**'
jobs:
test:
runs-on: ubuntu-latest
AWS_tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "14.x"
node-version: "16.x"
- name: Install Mockoon CLI
run: npm install -D @mockoon/cli
- name: Install perl dependencies
uses: perl-actions/install-with-cpm@stable
uses: shogo82148/actions-setup-perl@v1
with:
install: |
perl-version: '5.34'
install-modules-with: cpm
install-modules: |
DateTime
Digest::MD5
Encode
@ -35,8 +46,10 @@ jobs:
Storable
URI
URI::Encode
- name: Run Mockoon CLI
run: npx mockoon-cli start --data tests/resources/mockoon/cloud-aws-cloudtrail.json --port 3000
- name: Run plugin
run: |
sudo chmod -R +x tests/functional/

View File

@ -90,12 +90,6 @@ The following files are included by default:
* centreon/plugins/templates/hardware.pm,
* centreon/plugins/values.pm.
Extra entries can be used, for example to make a package obsoleting another one:
```bash
"custom_pkg_data": "Obsoletes: centreon-plugin-Old-Plugin",
```
#### Create package dependencies management files
In the previously created directory, create two new JSON files named *rpm.json* and *deb.json*.
@ -126,6 +120,14 @@ Example of *deb.json* file:
}
```
Extra entries can be used in *rpm.json* and *deb.json*, for example to make a package obsoleting another one:
```bash
"conflicts": "centreon-plugin-Old-Plugin",
"replaces": "centreon-plugin-Old-Plugin",
"provides": "centreon-plugin-Old-Plugin",
```
### Commit and push changes
In the project directory, create a new branch:

View File

@ -1727,11 +1727,11 @@ Add a description of the mode options:
=item B<--warning>
Threshold warning for dropped packets in packets per second.
Warning threshold for dropped packets in packets per second.
=item B<--critical>
Threshold critical for dropped packets in packets per second.
Critical threshold for dropped packets in packets per second.
=back

View File

@ -1743,11 +1743,11 @@ Ajouter une description aux options du mode :
=item B<--warning>
Threshold warning for dropped packets in packets per second.
Warning threshold for dropped packets in packets per second.
=item B<--critical>
Threshold critical for dropped packets in packets per second.
Critical threshold for dropped packets in packets per second.
=back

View File

@ -1,5 +1,6 @@
{
"dependencies": [
],
"custom_pkg_data": "Provides: centreon-plugin-network-cisco-ssms-restapi\\nReplaces: centreon-plugin-network-cisco-ssms-restapi\\nConflicts: centreon-plugin-network-cisco-ssms-restapi"
"dependencies": [],
"provides": ["centreon-plugin-network-cisco-ssms-restapi"],
"replaces": ["centreon-plugin-network-cisco-ssms-restapi"],
"conflicts": ["centreon-plugin-network-cisco-ssms-restapi"]
}

View File

@ -1,5 +1,5 @@
{
"dependencies": [
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Network-Cisco-Ssms-Restapi"
"replaces": ["centreon-plugin-Network-Cisco-Ssms-Restapi"]
}

View File

@ -1,5 +1,4 @@
{
"dependencies": [
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Applications-Elasticsearch"
"dependencies": [],
"replaces": ["centreon-plugin-Applications-Elasticsearch"]
}

View File

@ -6,5 +6,5 @@
"perl(DBI)",
"perl(DBD::mysql)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-meta"
"replaces": ["centreon-plugin-meta"]
}

View File

@ -1,9 +0,0 @@
{
"pkg_name": "centreon-plugin-Applications-Monitoring-Iplabel-Datametrie-Restapi",
"pkg_summary": "Centreon Plugin IP-Label datametrie rest api",
"plugin_name": "centreon_monitoring_iplabel_datametrie_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"apps/monitoring/iplabel/datametrie/restapi/"
]
}

View File

@ -4,5 +4,5 @@
"perl(Digest::MD5)",
"perl(NetAddr::IP)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Generic-Snmp"
"replaces": ["centreon-plugin-Generic-Snmp"]
}

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Applications-Sailpoint-Identitynow-Restapi",
"pkg_summary": "Centreon Plugin to monitor SailPoint IdentityNow throught RestAPI",
"plugin_name": "centreon_sailpoint_identitynow_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"apps/sailpoint/identitynow/restapi/"
]
}

View File

@ -0,0 +1,4 @@
{
"dependencies": [
]
}

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Applications-Tosca-Restapi",
"pkg_summary": "Centreon Plugin to monitor Tosca throught Tosca Commander REST Webservice (TCRS)",
"plugin_name": "centreon_tosca_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"apps/tosca/restapi/"
]
}

View File

@ -0,0 +1,4 @@
{
"dependencies": [
]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"libdatetime-perl"
]
}

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Applications-Veeam-Vbem-Restapi",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_veeam_vbem_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"apps/backup/veeam/vbem/restapi/"
]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"perl(DateTime)"
]
}

View File

@ -2,5 +2,5 @@
"dependencies": [
"perl(SNMP)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-App-Video-Openheadend-Snmp"
"replaces": ["centreon-plugin-App-Video-Openheadend-Snmp"]
}

View File

@ -2,5 +2,5 @@
"dependencies": [
"perl(DateTime)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Aws-Api"
"replaces": ["centreon-plugin-Cloud-Aws-Api"]
}

View File

@ -2,5 +2,5 @@
"dependencies": [
"perl(DateTime)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Aws-Api"
"replaces": ["centreon-plugin-Cloud-Aws-Api"]
}

View File

@ -3,5 +3,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Compute-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Compute-Api"]
}

View File

@ -3,5 +3,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Monitor-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Monitor-Api"]
}

View File

@ -5,5 +5,5 @@
"perl(DateTime-Format-Duration-ISO8601)",
"perl(DateTime::Duration)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Resources-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Resources-Api"]
}

View File

@ -3,5 +3,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Nework-LoadBalancer-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Nework-LoadBalancer-Api"]
}

View File

@ -3,5 +3,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Network-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Network-Api"]
}

View File

@ -3,5 +3,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Cloud-Azure-Storage-Api"
"replaces": ["centreon-plugin-Cloud-Azure-Storage-Api"]
}

View File

@ -1,5 +1,8 @@
{
"dependencies": [
"libsnmp-perl"
]
],
"replaces": ["centreon-plugin-hardware-devices-masterclock-ntpserver-snmp"],
"conflicts": ["centreon-plugin-hardware-devices-masterclock-ntpserver-snmp"],
"provides": ["centreon-plugin-hardware-devices-masterclock-ntpserver-snmp"]
}

View File

@ -7,6 +7,5 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/uptime.pm",
"hardware/devices/masterclock/ntp100gps/snmp/"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Hardware-Devices-Masterclock-Ntpserver-Snmp"
]
}

View File

@ -1,5 +1,8 @@
{
"dependencies": [
"perl(SNMP)"
]
],
"replaces": ["centreon-plugin-Hardware-Devices-Masterclock-Ntpserver-Snmp"],
"conflicts": ["centreon-plugin-Hardware-Devices-Masterclock-Ntpserver-Snmp"],
"provides": ["centreon-plugin-Hardware-Devices-Masterclock-Ntpserver-Snmp"]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"libsnmp-perl"
]
}

View File

@ -0,0 +1,10 @@
{
"pkg_name": "centreon-plugin-Hardware-Sensors-Rittal-Cmc-Snmp",
"pkg_summary": "Centreon Plugin Sensor Rittal CMC3",
"plugin_name": "centreon_sensors_rittal_cmc3_snmp.pl",
"files": [
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"hardware/sensors/rittal/cmc3/snmp/"
]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"perl(SNMP)"
]
}

View File

@ -2,5 +2,5 @@
"dependencies": [
"perl(XML::Simple)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Hardware-Servers-Hp-Ilo-Xmlapii"
"replaces": ["centreon-plugin-Hardware-Servers-Hp-Ilo-Xmlapii"]
}

View File

@ -8,5 +8,5 @@
"hardware/server/ibm/mgmt_cards/imm/snmp/",
"snmp_standard/mode/ntp.pm"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Hardware-servers-ibm-imm-snmp"
"replaces": ["centreon-plugin-Hardware-servers-ibm-imm-snmp"]
}

View File

@ -2,5 +2,5 @@
"dependencies": [
"perl(SNMP)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Hardware-Storage-Oracle-Zfs-Snmp"
"replaces": ["centreon-plugin-Hardware-Storage-Oracle-Zfs-Snmp"]
}

View File

@ -1,5 +1,5 @@
{
"dependencies": [
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Network-Cisco-Meraki-Restap"
"replaces": ["centreon-plugin-Network-Cisco-Meraki-Restap"]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"libsnmp-perl"
]
}

View File

@ -0,0 +1,14 @@
{
"pkg_name": "centreon-plugin-Network-Fortinet-Fortimail-Snmp",
"pkg_summary": "Centreon Plugin Fortinet FortiMail SNMP",
"plugin_name": "centreon_fortinet_fortimail_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/fortinet/fortimail/snmp/"
]
}

View File

@ -0,0 +1,5 @@
{
"dependencies": [
"perl(SNMP)"
]
}

View File

@ -4,5 +4,5 @@
"perl(DateTime)",
"perl(Digest::SHA)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Network-Fritzbox"
"replaces": ["centreon-plugin-Network-Fritzbox"]
}

View File

@ -5,6 +5,9 @@
"files": [
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"network/atrica/snmp/"
]
}
}

View File

@ -3,5 +3,5 @@
"perl(SNMP)",
"perl(DateTime)"
],
"custom_pkg_data": "Obsoletes: centreon-plugin-Operatingsystems-Hpuux-Snmp"
"replaces": ["centreon-plugin-Operatingsystems-Hpuux-Snmp"]
}

View File

@ -247,32 +247,32 @@ Antivirus daily.cvd file (Default: '/var/lib/clamav/daily.cvd').
=item B<--warning-engine-status>
Set warning threshold for status (Default: '')
Define the conditions to match for the status to be WARNING (Default: '')
You can use the following variables: %{last_engine_version}, %{current_engine_version}
=item B<--critical-engine-status>
Set critical threshold for status (Default: '%{last_engine_version} ne %{current_engine_version}').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_engine_version} ne %{current_engine_version}').
You can use the following variables: %{last_engine_version}, %{current_engine_version}
=item B<--warning-maindb-status>
Set warning threshold for status (Default: '')
Define the conditions to match for the status to be WARNING (Default: '')
You can use the following variables: %{last_maindb_version}, %{current_maindb_version}, %{current_maindb_timediff}
=item B<--critical-maindb-status>
Set critical threshold for status (Default: '%{last_maindb_version} ne %{current_maindb_version}').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_maindb_version} ne %{current_maindb_version}').
You can use the following variables: %{last_maindb_version}, %{current_maindb_version}, %{current_maindb_timediff}
=item B<--warning-dailydb-status>
Set warning threshold for status (Default: '')
Define the conditions to match for the status to be WARNING (Default: '')
You can use the following variables: %{last_dailydb_version}, %{current_dailydb_version}, %{current_dailydb_timediff}
=item B<--critical-dailydb-status>
Set critical threshold for status (Default: '%{last_dailydb_version} ne %{current_dailydb_version} || %{current_dailydb_timediff} > 432000').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_dailydb_version} ne %{current_dailydb_version} || %{current_dailydb_timediff} > 432000').
You can use the following variables: %{last_dailydb_version}, %{current_dailydb_version}, %{current_dailydb_timediff}
=back

View File

@ -297,22 +297,22 @@ Check antivirus software deployment status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'progress' (counter or %), 'failed', 'expiring', 'expired'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'progress' (counter or %), 'failed', 'expiring', 'expired'.
=item B<--percent>

View File

@ -120,22 +120,22 @@ Check events status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'events'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'events'.
=back

View File

@ -118,22 +118,22 @@ Check full scan status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'not-scanned'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'not-scanned'.
=back

View File

@ -152,23 +152,23 @@ Check logical network status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'new-hosts', 'groups', 'not-connected-long-time',
'not-controlled'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'new-hosts', 'groups', 'not-connected-long-time',
'not-controlled'.

View File

@ -162,23 +162,23 @@ Check protection status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'no-antivirus', 'no-real-time', 'not-acceptable-level',
'not-cured-objects', 'too-many-threats'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'no-antivirus', 'no-real-time', 'not-acceptable-level',
'not-cured-objects', 'too-many-threats'.

View File

@ -197,22 +197,22 @@ Check updates status.
=item B<--warning-status>
Set warning threshold for status. (Default: '%{status} =~ /Warning/i').
Define the conditions to match for the status to be WARNING. (Default: '%{status} =~ /Warning/i').
Can use special variables like: %{status}
=item B<--critical-status>
Set critical threshold for status. (Default: '%{status} =~ /Critical/i').
Define the conditions to match for the status to be CRITICAL. (Default: '%{status} =~ /Critical/i').
Can use special variables like: %{status}
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'last-server-update', 'not-updated'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'last-server-update', 'not-updated'.
=item B<--timezone>

View File

@ -98,12 +98,12 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'clients', 'sockets'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'clients', 'sockets'.
=back

View File

@ -142,13 +142,13 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'legitimate', 'blocked', 'blocked-by-am',
'blocked-by-mf', 'blocked-by-uf'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'legitimate', 'blocked', 'blocked-by-am',
'blocked-by-mf', 'blocked-by-uf'.

View File

@ -144,12 +144,12 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'malware-detected', 'category'
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'malware-detected', 'category'
=back

View File

@ -135,13 +135,13 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.

View File

@ -151,13 +151,13 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'request', 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'request', 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.

View File

@ -152,13 +152,13 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning.
Warning threshold.
Can be: 'request', 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.
=item B<--critical-*>
Threshold critical.
Critical threshold.
Can be: 'request', 'client-to-proxy', 'server-to-proxy',
'proxy-to-client', 'proxy-to-server'.

View File

@ -169,12 +169,12 @@ Only display some counters (regexp can be used).
=item B<--warning-*>
Threshold warning on last update.
Warning threshold on last update.
Can be: 'dat-version', 'tsdb-version', 'proactive-version'.
=item B<--critical-*>
Threshold critical on last update.
Critical threshold on last update.
Can be: 'dat-version', 'tsdb-version', 'proactive-version'.
=back

View File

@ -148,23 +148,23 @@ Set HTTP headers (Multiple option)
=item B<--unknown-status>
Threshold warning for http response code
Warning threshold for http response code
=item B<--warning-status>
Threshold warning for http response code
Warning threshold for http response code
=item B<--critical-status>
Threshold critical for http response code (Default: '%{http_code} < 200 or %{http_code} >= 300')
Critical threshold for http response code (Default: '%{http_code} < 200 or %{http_code} >= 300')
=item B<--warning>
Threshold warning in seconds (server-status page response time)
Warning threshold in seconds (server-status page response time)
=item B<--critical>
Threshold critical in seconds (server-status page response time)
Critical threshold in seconds (server-status page response time)
=back

View File

@ -145,17 +145,17 @@ Display failed hosts list in verbose output.
=item B<--unknown-job-status>
Set unknown threshold for status (Default: '%{last_job_status} =~ /default/').
Define the conditions to match for the status to be UNKNOWN (Default: '%{last_job_status} =~ /default/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-job-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{last_job_status}, %{display}
=item B<--critical-job-status>
Set critical threshold for status (Default: '%{last_job_status} =~ /failed/').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_job_status} =~ /failed/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-*> B<--critical-*>

View File

@ -215,17 +215,17 @@ Number of seconds between retries (Default : 10).
=item B<--unknown-job-status>
Set unknown threshold for status (Default: '%{last_job_status} =~ /default/').
Define the conditions to match for the status to be UNKNOWN (Default: '%{last_job_status} =~ /default/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-job-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{last_job_status}, %{display}
=item B<--critical-job-status>
Set critical threshold for status (Default: '%{last_job_status} =~ /failed/').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_job_status} =~ /failed/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-*> B<--critical-*>

View File

@ -166,17 +166,17 @@ Filter schedule name (Can use regexp).
=item B<--unknown-job-status>
Set unknown threshold for status (Default: '%{last_job_status} =~ /default/').
Define the conditions to match for the status to be UNKNOWN (Default: '%{last_job_status} =~ /default/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-job-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{last_job_status}, %{display}
=item B<--critical-job-status>
Set critical threshold for status (Default: '%{last_job_status} =~ /failed/').
Define the conditions to match for the status to be CRITICAL (Default: '%{last_job_status} =~ /failed/').
You can use the following variables: %{last_job_status}, %{display}
=item B<--warning-*> B<--critical-*>

View File

@ -230,17 +230,17 @@ Timezone of mssql server (If not set, we use current server execution timezone).
=item B<--ok-status>
Set ok threshold for status (Default: '%{status} == 1')
Define the conditions to match for the status to be OK (Default: '%{status} == 1')
You can use the following variables: %{display}, %{status}
=item B<--warning-status>
Set warning threshold for status (Default: '%{status} == 1')
Define the conditions to match for the status to be WARNING (Default: '%{status} == 1')
You can use the following variables: %{display}, %{status}, %{type}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} != 1').
Define the conditions to match for the status to be CRITICAL (Default: '%{status} != 1').
You can use the following variables: %{display}, %{status}, %{type}
=item B<--warning-total>

View File

@ -277,12 +277,12 @@ Only get alerts by severity (can be a regexp).
=item B<--warning-status>
Set warning threshold for status (Default: '%{severity} =~ /warning/i')
Define the conditions to match for the status to be WARNING (Default: '%{severity} =~ /warning/i')
You can use the following variables: %{name}, %{severity}, %{source}, %{category}, %{timeraised}, %{message}
=item B<--critical-status>
Set critical threshold for status (Default: '%{severity} =~ /error/i').
Define the conditions to match for the status to be CRITICAL (Default: '%{severity} =~ /error/i').
You can use the following variables: %{name}, %{severity}, %{source}, %{category}, %{timeraised}, %{message}
=item B<--warning-*> B<--critical-*>

View File

@ -304,12 +304,12 @@ Filter disks by type (can be a regexp).
=item B<--warning-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{status}, %{name}, %{type}.
=item B<--critical-status>
Set critical threshold for status.
Define the conditions to match for the status to be CRITICAL.
You can use the following variables: %{status}, %{name}, %{type}.
=item B<--warning-*> B<--critical-*>

View File

@ -307,12 +307,12 @@ Filter job with end time greater than current time less value in seconds (Defaul
=item B<--warning-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{name}, %{status}, %{subStatus}, %{type}, %{isActive}.
=item B<--critical-status>
Set critical threshold for status (Default: 'not %{status} =~ /succeeded/i').
Define the conditions to match for the status to be CRITICAL (Default: 'not %{status} =~ /succeeded/i').
You can use the following variables: %{name}, %{status}, %{subStatus}, %{type}, %{isActive}.
=item B<--warning-long>

View File

@ -16,7 +16,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Authors : Roman Morandell - ivertix
#
package apps::backup::commvault::commserve::restapi::custom::api;

View File

@ -211,12 +211,12 @@ Filter alerts by type (can be a regexp).
=item B<--warning-status>
Set warning threshold for status (Default: '%{severity} =~ /warning/')
Define the conditions to match for the status to be WARNING (Default: '%{severity} =~ /warning/')
You can use the following variables: %{severity}, %{status}, %{type}, %{name}, %{since}
=item B<--critical-status>
Set critical threshold for status (Default: '%{severity} =~ /critical/').
Define the conditions to match for the status to be CRITICAL (Default: '%{severity} =~ /critical/').
You can use the following variables: %{severity}, %{status}, %{type}, %{name}, %{since}
=item B<--memory>

View File

@ -265,12 +265,12 @@ Set timeframe in seconds (E.g '3600' to check last 60 minutes).
=item B<--warning-status>
Set warning threshold for status (Default: '%{status} =~ /abnormal/i')
Define the conditions to match for the status to be WARNING (Default: '%{status} =~ /abnormal/i')
You can use the following variables: %{display}, %{status}, %{type}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} =~ /errors|failed/i').
Define the conditions to match for the status to be CRITICAL (Default: '%{status} =~ /errors|failed/i').
You can use the following variables: %{display}, %{status}, %{type}
=item B<--warning-long>

View File

@ -177,17 +177,17 @@ Filter media agents by name (Can be a regexp).
=item B<--unknown-device-status>
Set unknown threshold for status.
Define the conditions to match for the status to be UNKNOWN.
You can use the following variables: %{status}, %{name}
=item B<--warning-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{status}, %{is_maintenance}, %{offline_reason}, %{name}
=item B<--critical-status>
Set critical threshold for status (Default: '%{is_maintenance} eq "no" and %{status} eq "offline"').
Define the conditions to match for the status to be CRITICAL (Default: '%{is_maintenance} eq "no" and %{status} eq "offline"').
You can use the following variables: %{status}, %{is_maintenance}, %{offline_reason}, %{name}
=item B<--warning-*> B<--critical-*>

View File

@ -166,17 +166,17 @@ Filter storage pools by name (can be a regexp).
=item B<--unknown-status>
Set unknown threshold for status.
Define the conditions to match for the status to be UNKNOWN.
You can use the following variables: %{status}, %{display}
=item B<--warning-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{status}, %{display}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} !~ /online/i').
Define the conditions to match for the status to be CRITICAL (Default: '%{status} !~ /online/i').
You can use the following variables: %{status}, %{display}
=item B<--warning-*> B<--critical-*>

View File

@ -16,7 +16,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Authors : Roman Morandell - ivertix
#
package apps::backup::commvault::commserve::restapi::plugin;

View File

@ -251,17 +251,17 @@ Set timezone (If not set, we use current server execution timezone).
=item B<--unknown-status>
Set unknown threshold for status.
Define the conditions to match for the status to be UNKNOWN.
You can use the following variables: %{display}, %{status}, %{type}
=item B<--warning-status>
Set warning threshold for status (Default: '%{status} =~ /warning/i').
Define the conditions to match for the status to be WARNING (Default: '%{status} =~ /warning/i').
You can use the following variables: %{display}, %{status}, %{type}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} =~ /failed/i').
Define the conditions to match for the status to be CRITICAL (Default: '%{status} =~ /failed/i').
You can use the following variables: %{display}, %{status}, %{type}
=item B<--warning-total>

View File

@ -206,12 +206,12 @@ Set critical threshold in percent.
=item B<--warning-status>
Set warning threshold for status.
Define the conditions to match for the status to be WARNING.
You can use the following variables: %{display}, %{status}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} !~ /up/i').
Define the conditions to match for the status to be CRITICAL (Default: '%{status} !~ /up/i').
You can use the following variables: %{display}, %{status}
=back

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