Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(http-collection): merge community PR + add tests #5043

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
357de14
fix(collectio): infinite loop and json encoding
Feb 15, 2024
c70b7be
fix(collectio): infinite loop and json encoding
Feb 15, 2024
5414016
fix indent
Feb 15, 2024
5b19033
add(collection): add full_url and function system
Feb 16, 2024
c696a50
add(collection): add full_url and function system
Feb 16, 2024
2187c82
change parse structure position
Mar 5, 2024
ad528da
allow character minus
Mar 6, 2024
aa3e925
Update src/apps/protocols/http/mode/collection.pm
garnier-quentin Apr 12, 2024
c76fd56
Update src/apps/protocols/http/mode/collection.pm
garnier-quentin Apr 12, 2024
61bc01f
add scenario_stopped_first attribute
Apr 12, 2024
9f2dd4a
fix(ci): fix installation path of perl libraries (#4913)
kduret Feb 15, 2024
c431ff8
enh(readme): restructuring the readme file (#4907)
omercier Feb 19, 2024
f62b305
fix(plugin): fixed an error in the recognition of the product version…
omercier Feb 20, 2024
e9edb36
fix(errmsg): attempt to fix #4703 (renew old PR) (#4892)
omercier Feb 27, 2024
157a702
Ctor 378 fix snmp collections random issue (#4918)
omercier Feb 27, 2024
c19e81a
chore(ci): upgrade gha (#4929)
sc979 Feb 29, 2024
874f0d8
[CTOR-306] [Plugin] [CommunityPR] Allow to filter ActiveMQ Brokers by…
lucie-dubrunfaut Mar 4, 2024
7ec611b
chore(ci): downgrade action (#4935)
sc979 Mar 4, 2024
66bc9dc
more info on --data
BenoitPoulet Dec 27, 2023
9d1fa89
new(pkg): build the nrpe daemon as nrpe4 (#4931)
omercier Mar 8, 2024
2d1d5a5
[CTOR-284] new Datacore plugin with rest api (#4896)
Evan-Adam Mar 11, 2024
b589744
Empty-Commit
pkippes Mar 11, 2024
a6ab2ce
CTOR-439-datacore-plugin-bad-path-in-pkg-json-source-code-is-not-prop…
Evan-Adam Mar 15, 2024
5293b84
Changed the 'experimental' message of Veeam WSMAN modules as we are g…
omercier Mar 18, 2024
635895b
Fix random test on Linux local plugin (#4949)
omercier Mar 19, 2024
aaf4374
Update mockoon version + adapt existing tests (#4938)
sdepassio Mar 20, 2024
f31a7c2
Ctor 302 windows services decode filter (#4955)
omercier Mar 25, 2024
b48c77d
Support the use of a regexp to filter interface IDs (#4956)
omercier Mar 25, 2024
f8c2dfb
fix(syntax): added missing curly bracket (#4963)
omercier Mar 26, 2024
5e64a89
enh(powershell/updates): Substituion of special charactere for Fr, Es…
Tpo76 Mar 26, 2024
5adbf04
better compat between map-values and convert-custom-values options (#…
tanguyvda Mar 29, 2024
921f7e4
CTOR-473-tests-folder-structure-must-follow-code-folder-structure (#4…
Evan-Adam Apr 4, 2024
c6d1630
Update alert.pm (#4982)
Tpo76 Apr 8, 2024
1b135f9
take into account reserved space (#4978)
s-duret Apr 8, 2024
4582a00
enh: Information grid restapi (#4961)
lucie-dubrunfaut Apr 9, 2024
6a4836a
fix(azure-cloud-eventgrid): fix help threshold (#4992)
itoussies Apr 12, 2024
f6fc292
[CTOR-38][Plugin] New pack Avigilon camera snmp (#4994)
lucie-dubrunfaut Apr 23, 2024
1ae209e
[CTOR-38][Plugin] Fix Packaging- New pack Avigilon camera snmp (#4997)
lucie-dubrunfaut Apr 26, 2024
623344f
[CTOR-38][Plugin] Fix Packaging again - New pack Avigilon camera snmp…
lucie-dubrunfaut Apr 26, 2024
5198425
[CTOR-26][Plugin] New Pack : oVirt (#4999)
lucie-dubrunfaut Apr 29, 2024
cf22129
enh(promote): handle debian package promotion for multiple distributi…
tuntoja Apr 30, 2024
d6211ad
[CTOR-514] [Plugin] New Pack RRDCached (#5003)
lucie-dubrunfaut Apr 30, 2024
bf265f8
fix(promote): fix pattern used for promote upload (#5006)
tuntoja Apr 30, 2024
1f58c22
ci(plugins-tests) Use docker to install and test each plugins
Evan-Adam May 2, 2024
484990f
[CTOR-566][Plugin] New pack Quanta Restapi (#5019)
lucie-dubrunfaut May 7, 2024
a6674d2
[CTOR-566][Plugin] New pack Quanta Restapi (Fix) (#5021)
lucie-dubrunfaut May 7, 2024
6704157
fix(plugin) cifs,sftp,ftp plugin now check recursively folders (#5015)
Evan-Adam May 14, 2024
e5a3cf8
enh(plugin): refactored the RRDcached plugin (#5025)
omercier May 14, 2024
b407c44
ci(plugin) update JSON::Path dep on alma8 to same version as other OS
Evan-Adam May 15, 2024
9d63de6
CTOR-320-community-pr-fix-status-mapping-on-citrix-psu (#5022)
Evan-Adam May 15, 2024
3dc745a
fix(plugin) Json PATH lib - CTOR-525 (#5027)
lucie-dubrunfaut May 16, 2024
2c74e5b
Empty-Commit
pkippes May 16, 2024
82bc373
enh(promote): handle debian package promotion for multiple distributi…
tuntoja Apr 30, 2024
5473525
fix(promote): fix pattern used for promote upload (#5007)
tuntoja Apr 30, 2024
c8039a3
fix(promote): fix pattern for debian promote (#5010)
tuntoja Apr 30, 2024
35bdfc0
fix(docker): add ruby-devel as required by npfm for perl-cpan builds
tuntoja May 16, 2024
c4c39bc
enh(tests): make install_plugins function more robust for debian inst…
tuntoja May 20, 2024
0732568
chore(deps): absorb May-24 dependabot dependencies (#5034)
mushroomempires May 20, 2024
750f0ac
fix(packaging) CTOR-591 TrendMicro - Iwsva: List-mode inaccurate (#5039)
lucie-dubrunfaut May 24, 2024
9bf1081
enh(library) Package Paws CPAN library in our repository (#5036)
sdepassio May 24, 2024
1ebbdc5
style(plugin): adjust indentation - CTOR-586 (#5033)
lucie-dubrunfaut May 24, 2024
43bb542
fix(packaging) CTOR-591 Trendmicro IWSVA packaging (#5042)
lucie-dubrunfaut May 27, 2024
daa3171
wip: first commit with collection test
omercier May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tests/** @centreon/owners-robot-e2e
.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-pipelines
selinux/** @centreon/owners-pipelines
.github/scripts/pod_spell_check.t @centreon/owners-perl
2 changes: 1 addition & 1 deletion .github/actions/deb-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
fail-on-cache-miss: true

- if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
9 changes: 6 additions & 3 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down Expand Up @@ -62,10 +62,13 @@ runs:
- name: Promote DEB package to stable
if: ${{ contains(fromJSON('["bullseye", "bookworm"]'), inputs.distrib) }}
run: |
set -eux

echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
echo "[DEBUG] - Distrib: ${{ inputs.module }}"

echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*.deb | jq -r '.[].path')
SRC_PATHS=$(jf rt search --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')

if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
Expand All @@ -86,7 +89,7 @@ runs:
jf rt download $ARTIFACT --flat
done

for ARTIFACT_DL in $(dir|grep -E "*.deb"); do
for ARTIFACT_DL in $(dir -1|grep -E ".+${{ inputs.distrib }}.+\.deb"); do
ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1)
echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH."
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/rpm-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/rpm-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
39 changes: 0 additions & 39 deletions .github/actions/runner-docker/action.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/actions/test-plugins/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "test-plugins"
description: "Test plugin that are passed as parameters"
inputs:
cache-key:
description: "The packaged plugin's cache key"
required: true
plugin-list:
description: "List of plugins to install from the cache"
required: true
package-extension:
description: "Either 'rpm' or 'deb'. Needed to determine the package manager command (dnf or apt-get)."
required: true

runs:
using: "composite"
steps:

- name: get the cached plugin
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ./*.${{ inputs.package-extension }}
key: ${{ inputs.cache-key }}
fail-on-cache-miss: true

- name: Install, test and remove plugin
shell: bash
run: |
python3 .github/scripts/test-all-plugins.py ${{ inputs.package-extension }} ${{ inputs.plugin-list }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:8

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:9

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bookworm

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bullseye

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/centos:7

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/ubuntu:jammy

Expand Down
68 changes: 68 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-alma8
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:8

RUN bash -e <<EOF

dnf install -y 'dnf-command(config-manager)' epel-release zstd jq
dnf config-manager --set-enabled powertools
dnf clean all

# Install Robotframework
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio

# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -
yum install -y nodejs

# Install mockoon
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo -e '[centreon-plugins-stable]\n\
name=centreon plugins stable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/stable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-stable-noarch]\n\
name=centreon plugins stable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/stable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing]\n\
name=centreon plugins testing x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/testing/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing-noarch]\n\
name=centreon plugins testing noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/testing/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable]\n\
name=centreon plugins unstable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/unstable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable-noarch]\n\
name=centreon plugins unstable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/unstable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

dnf clean all

EOF
67 changes: 67 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-alma9
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:9

RUN bash -e <<EOF

dnf install -y 'dnf-command(config-manager)' epel-release zstd jq
dnf config-manager --set-enabled crb
dnf clean all

# Install Robotframework
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio

# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -
yum install -y nodejs
# Install mockoon
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo -e '[centreon-plugins-stable]\n\
name=centreon plugins stable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/stable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-stable-noarch]\n\
name=centreon plugins stable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/stable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing]\n\
name=centreon plugins testing x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/testing/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing-noarch]\n\
name=centreon plugins testing noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/testing/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable]\n\
name=centreon plugins unstable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/unstable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable-noarch]\n\
name=centreon plugins unstable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/unstable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

dnf clean all

EOF
48 changes: 48 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bookworm

ENV DEBIAN_FRONTEND noninteractive

# fix locale
RUN bash -e <<EOF

apt-get update
apt-get install -y locales libcurl4-openssl-dev curl wget zstd jq
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean

EOF

ENV LANG en_US.utf8

RUN bash -e <<EOF
apt-get update
# Install Robotframework
apt-get install -y python3-dev python3-pip
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio

# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\
apt-get install -y nodejs

# Install mockoon (needs nodejs)
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo "deb https://packages.centreon.com/apt-plugins-stable/ bookworm main" | tee /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-testing/ bookworm main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-unstable/ bookworm main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt-get update

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

apt-get clean

EOF
Loading
Loading