Compare commits

...

128 Commits

Author SHA1 Message Date
ponchoh
d82058c571
enh(notification::email): Allow a custom pathname in alert mode (#5085)
Co-authored-by: Sophie Depassio <sdepassio@centreon.com>
2025-07-28 11:16:24 +02:00
sdepassio
ea71dd261a
fix(mosquitto-mqtt): syntax and encoding (#5676)
Co-authored-by: Jochen Platzgummer <jochen.platzgummer@pgum.eu>

Refs: CTOR-1786
2025-07-23 11:18:46 +02:00
technique-ci
de3749d79f
chore(deps): absorb 2025-07 dependabot GitHub Actions updates (#5654) 2025-07-21 13:29:48 +02:00
Stéphane Duret
420edcf3c4
fix(hardware::server::hp::ilo::restapi): exclude enclosure CTOR-1798 (#5671) 2025-07-18 09:49:52 +02:00
Maud
8a0270bdfd
fix(release): update plugins version to 20250800 (#5668) 2025-07-11 12:01:45 +02:00
Paul Oureib
b48e8ed7a0
fix(release): update plugins version to 20250800 2025-07-10 16:35:19 +02:00
pkippes
968b620083
Sync release 20250700 (#5664) 2025-07-08 14:31:17 +02:00
Pieter Kippes
25ed744b13 Merge branch 'master' into sync-release-20250700 2025-07-08 14:21:47 +02:00
pkippes
ff0d3c08ae
Release 20250700 (#5659) 2025-07-08 10:59:58 +02:00
tuntoja
5581042e2a
fix(ci): run plugins-suoders delivery only if packaging is triggered (#5662) 2025-07-07 17:37:24 +02:00
tuntoja
8f4360724e
fix(ci): run plugins-suoders delivery only if packaging is triggered (#5663) 2025-07-07 17:36:33 +02:00
Evan-Adam
9b6cb25b94
fix(snmp-cache): remove cache before robot tests (#5661) 2025-07-07 17:19:33 +02:00
scresto
6bbc7da43b
CTOR-880: New Pack(storage::hp::alletra::restapi) (#5658) 2025-07-07 14:27:07 +02:00
scresto
4565304d18
CTOR-880: New Pack(storage::hp::alletra::restapi) (#5653)
Co-authored-by: Roman Morandell <46994680+rmorandell-pgum@users.noreply.github.com>
2025-07-04 17:50:12 +02:00
scresto
e04e5519b5
Plugin(apps::apache::serverstatus) - Modes (requests - slotstates) : Add nlabel and force new perfdata (#5657)
Breaking change

Refs:CTOR-382
2025-07-04 17:40:37 +02:00
scresto
74f6266ef1
CTOR-1248: Display full curl command in log (#5634)
Co-authored-by: Evan-Adam <152897682+Evan-Adam@users.noreply.github.com>
2025-07-04 17:24:11 +02:00
omercier
226a574d41
feat(apps::vmware::vsphere8::vcenter::plugin): new plugin (#5608)
Co-authored-by: sdepassio <114986849+sdepassio@users.noreply.github.com>
Refs: CTOR-431
2025-07-04 15:54:02 +02:00
Evan-Adam
eec431c060
CTOR-1656-move-centreon-plugins-sudoers-to-centreon-plugin-repository (#5598)
Co-authored-by: Kevin Duret <kduret@centreon.com>
2025-07-03 16:27:06 +02:00
Stéphane Chapron
1e61535258
ci(secu): force full scan on scheduled jobs and manage override (#5655) 2025-07-03 14:14:58 +02:00
scresto
ed7cbedb25
CTOR-1558: Enhance standby mode and extra parameters support (#5645) 2025-07-02 14:58:39 +02:00
Lucie Tirand
e18c959fc2
fix(storage::emc::datadomain::snmp): fixed issue in cleaning mode when default value for timezone is empty leading to unknown (#5631)
Refs: CTOR-1700

Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198.localdomain>
2025-07-01 14:45:57 +02:00
scresto
860959c392
enh(cloud::azure::custom::api): Add option to choose cost-metric (#5648)
Refs: CTOR-711
2025-07-01 14:27:01 +02:00
Maud
7ef086e281
fix(ci-nightly): trigger nightly builds on mondays instead of wednesdays (#5649) 2025-07-01 09:48:14 +02:00
Maud
a0339d805e
feat(ci-nightly): add nightly to centreon-plugins (#5640) 2025-06-30 10:45:53 +02:00
itoussies
d0d4f0ce95
fix(cloud::aws::cloudwatch): fix zeroed option in getmetrics mode (#5619)
Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
Refs: CTOR-1706
2025-06-30 09:57:55 +02:00
Lucie Tirand
1357f4708f
fix(apps::podman::restapi): fixed api endpoint for container-usage (#5646)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198.localdomain>
Refs: CTOR-1794
2025-06-30 09:32:06 +02:00
scresto
f729a24ccb
fix(cloud::kubernetes::mode::listpods): fixed autodisco failure when a pod IP is empty (#5643)
Refs: CTOR-1644
2025-06-26 11:05:45 +02:00
itoussies
4abce275b9
Plugin(cloud::google::gcp::management::stackdriver) - Mode(getmetrics): allow compatibility with DISTRIBUTION type values CTOR-1643 (#5609) 2025-06-25 16:34:30 +02:00
itoussies
da00258077
Plugin(database::mysql::plugin) - Mode(dbi,mysqlcmd): Error when retrieving the server version CTOR-1562 (#5610) 2025-06-25 16:30:34 +02:00
technique-ci
6cbda8a0fa
chore(deps): absorb 2025-06 dependabot GitHub Actions updates (#5607)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-25 11:16:43 +02:00
scresto
f53e19c18b
MON-157861: Update unit-tests docker images (#5617) 2025-06-23 11:08:31 +02:00
Lucie Tirand
e44f537f38
fix(storage::netapp::santricity::restapi): fixed hardware cmd component count (#5630)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198.localdomain>
Refs: CTOR-1771
2025-06-20 09:16:08 +02:00
tuntoja
f83d5d7927
chore(ci): update maven from 3.8.8 to 3.8.9 in packaging dockerfiles (#5636) 2025-06-19 15:27:49 +02:00
Lucie Tirand
c5fed69edd
fix(hardware::server::huawei::hmm::snmp): removed experimental keys on scalar for components (#5635)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198.localdomain>
Refs: CTOR-1776
2025-06-19 13:26:07 +02:00
pkippes
43d6eb6ca1
Sync release 20250600 (#5627) 2025-06-13 16:25:34 +02:00
tuntoja
76b2c6d0cb fix extra blank line in generic plugins 2025-06-13 16:06:42 +02:00
pkippes
22edb5de2f
Merge branch 'develop' into sync-rel-20250600 2025-06-13 16:04:20 +02:00
David Boucher
856d8446bf fix(ci): generic-plugins.yml should be good for the linter 2025-06-13 16:02:23 +02:00
Pieter Kippes
bb56a8f25d Merge branch 'master' into sync-rel-20250600 2025-06-13 15:52:32 +02:00
David Boucher
1361690066 init(ci): introduction of a new workflow generic-plugins.yml to build some Rust code 2025-06-13 15:34:57 +02:00
pkippes
49ed760dcd
Release 20250600 (#5618) 2025-06-13 14:33:22 +02:00
sdepassio
660c4e2db3
enh(cpan-libraires): update cpan libs for noble (#5626)
Co-authored-by: tuntoja <58987095+tuntoja@users.noreply.github.com>
2025-06-13 10:54:42 +02:00
tuntoja
a8849c1c8d
fix(ci): add missing entry for distrib noble in test-packages perl cp... (#5623) 2025-06-12 14:01:30 +02:00
tuntoja
e62c6e97e2
fix(ci): add missing entry for distrib noble in test-packages perl cp… (#5621) 2025-06-12 14:00:04 +02:00
sdepassio
d9bb91e9cd
fix(juniper): fixes after updated packs tests (#5616) 2025-06-11 18:04:46 +02:00
sdepassio
4baf784e5e
feat(network::juniper::common::junos::netconf): New connector network juniper mseries netconf (#5613)
* Move network::juniper::common::junos plugins to network::juniper::common::junos::snmp

* New plugins network::juniper::common::junos::netconf::*

* fix network::juniper::common::junos::snmp::mode::interfaces bias_current to divise by 1000 instead of 100

Co-authored-by: garnier-quentin <garnier.quentin@gmail.com>
2025-06-10 18:03:22 +02:00
Evan-Adam
95a4456d98
fix(apps::backup::rubrik::restapi): api token not cleaned and renewed (#5344)
Co-authored-by: Sylvain Cresto <scresto@centreon.com>

Refs:CTOR-729
2025-06-06 13:29:30 +02:00
Maud
e1b820b744
fix(ci): add concurrency to gitleaks workflow (#5612) 2025-06-06 10:48:27 +02:00
Lucie Tirand
8c2c91d3cc
fix(cloud::microsoft::office365::onedrive): change hash key in listsites mode (#5545)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
2025-06-03 10:37:07 +02:00
Lucie Tirand
0151f65a04
enh(network::fortinet::fortigate::snmp): enhance plugin packaging to handle uptime CTOR-1662 (#5599)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
Co-authored-by: Evan-Adam <152897682+Evan-Adam@users.noreply.github.com>
2025-06-02 17:00:42 +02:00
omercier
7df83451df
enh(vmware-daemon): add missing logrotate file (#5600) 2025-06-02 16:51:22 +02:00
scresto
1e17e91f33
feat(network::f5::bigip::snmp::plugin): add certificates mode (#5602)
Refs: CTOR-1561
2025-06-02 10:01:00 +02:00
Maud
aa85842885
fix(ci): remove condition excluding jammy/noble on package-delivery action (#5605) 2025-05-28 16:38:23 +02:00
omercier
5250f05059
fix(vmware-sdk): remove perl-vmware-sdk workflow (#5585)
Refs: CTOR-342
2025-05-26 16:53:29 +02:00
sfarouq-ext
db81938e6c
enh(qnap): extend modes hardware,pools and volumes for Quts Hero (#5580)
Co-authored-by: Roman Morandell <46994680+rmorandell-pgum@users.noreply.github.com>
2025-05-26 15:51:47 +02:00
Evan-Adam
265331c48d
CTOR-1649-plugin-apps-nmap-cli-need-to-secure-the-execution-of-commands (#5596) 2025-05-26 09:29:18 +02:00
Stéphane Chapron
c674f133d6
ci(secu): deploy checkmarx (#5588) 2025-05-19 11:54:54 +02:00
technique-ci
e201c0018f
chore(deps): absorb 2025-05 dependabot GitHub Actions updates (#5575)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-16 11:00:17 +02:00
pkippes
8b3d0fb8d2
Sync release 20250501 (#5591) 2025-05-16 10:59:37 +02:00
pkippes
fbd013e595
Release 20250501 (#5590) 2025-05-16 10:28:52 +02:00
omercier
4dd5f1611a chore(release): bump vmware-daemon to 20250501
As a new versioning convention has been applied, the changelog has to be
updated accordingly.
2025-05-16 09:55:03 +02:00
omercier
95de81d75a chore(release): bump vmware-daemon to 3.4.1 2025-05-16 09:01:03 +02:00
Stéphane Duret
f287ab6838
Change rights after install (#5578) 2025-05-15 14:33:47 +02:00
scresto
5c5d7f806a
CTOR-1634: Plugin(database::oracle) - Segmentation Fault with glibc Latest Version (#5589)
Refs: CTOR-1634
2025-05-15 10:34:37 +02:00
Stéphane Chapron
358cfd1e39
chore(ci): upgrade gitleaks action (#5587) 2025-05-14 12:34:54 +02:00
pkippes
175ceb6d4c
Sync Release 20250500 (#5586) 2025-05-12 18:27:15 +02:00
pkippes
b36e620225
Release 20250500 (#5584) 2025-05-12 17:21:37 +02:00
Evan-Adam
3463b2e43a
doc(f5OS): fix help message (#5583) 2025-05-12 15:44:34 +02:00
Lucie Dubrunfaut
34aeb1aba4
help(storage::emc::datadomain::snmp::mode::alerts): fix option description (#5581)
Refs: CTOR-1343
2025-05-12 13:03:04 +02:00
sdepassio
c3870bab82
enh(apps::mq::ibmmq::mqi): remove perl lib msqseries dependency (#5582)
Refs: CTOR-1639
2025-05-12 12:53:43 +02:00
Lucie Dubrunfaut
3bb6a33a9e
enh(network::stormshield::api): fix help section (#5563)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
2025-05-12 11:31:10 +02:00
sfarouq-ext
55ec4e4930
ENH plugin(network::cisco::smallbusiness::standard::snmp): add stack mode (#5565)
Co-authored-by: garnier-quentin <garnier.quentin@gmail.com>
2025-05-06 18:10:06 +02:00
Stéphane Duret
df858cf8a4
Change rights after install 2025-05-06 16:43:58 +02:00
scresto
dcd186de24
enh(F5OS): New pack f5 os snmp (#5567)
Co-authored-by: Sylvain Cresto <scresto@chezwouam.home>

Refs:CTOR-293
2025-05-06 11:22:54 +02:00
omercier
51df89411c
fix(cloud::azure::storage::storagesync): fixed thresholds options help (#5577) 2025-05-06 10:11:33 +02:00
sfarouq-ext
17b22d20f5
enh(purestorage::flasharray): Extend perf counter of mode array (#5576)
Co-authored-by: Roman Morandell <46994680+rmorandell-pgum@users.noreply.github.com>
2025-05-05 19:50:36 +02:00
sfarouq-ext
798659439d
Enh(mikrotik): New mode lte-interfaces and list-lte-interfaces (#5553)
Co-authored-by: garnier-quentin <garnier.quentin@gmail.com>
2025-05-05 19:40:17 +02:00
Stéphane Duret
1613e1e588
fix(cloud::azure::storage::storagesync): fixed recalls mode by removing deprecated StorageSyncRecallIOTotalSizeBytes metric (#5559)
Co-authored-by: Lucie Dubrunfaut <123162035+lucie-dubrunfaut@users.noreply.github.com>

Refs: CTOR-1614
2025-05-05 17:20:05 +02:00
sfarouq-ext
43b338ad1d
enh(stormshield): new mode vpn-tunnels and list-vpn-tunnels) (#5554)
Co-authored-by: garnier-quentin <qgarnier@ose-consulting.com>
2025-04-24 14:42:19 +02:00
sfarouq-ext
758b35773e
enh(netvision5-6): new mode battery (#5549)
Co-authored-by: gbin2265 <gebiwork@hotmail.com>
2025-04-24 10:19:41 +02:00
Evan-Adam
7efc01dec9
test(gorgone-unit): add gorgone deps to run new unit tests. (#5558) 2025-04-23 11:53:27 +02:00
omercier
7e0953f4c4
doc(dev): add plugins sequence diagram (#5523)
Co-authored-by: cg-tw <83637804+cg-tw@users.noreply.github.com>
Refs: CTOR-1456
2025-04-17 16:08:48 +02:00
Stéphane Chapron
24702e95de
ci(secu): replace gitleaks secret and remove PRT (#5552) 2025-04-17 16:05:55 +02:00
May
f0844bec5f
enh(ci): implement hash check for actions in actionlint (#5550) 2025-04-17 12:06:08 +02:00
Lucie Dubrunfaut
725ab90d14
CTOR-1598: GitHub issues template is not handled anymore (#5548)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
Co-authored-by: May <110405507+mushroomempires@users.noreply.github.com>
2025-04-15 13:31:45 +02:00
Lucie Dubrunfaut
87dd971b69
CTOR-1598: Github Issues template is not handled anymore (#5547)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
2025-04-14 16:48:41 +02:00
Lucie Dubrunfaut
0a1bb4c002
Rename issue_template.md to ISSUE_TEMPLATE.md (#5546) 2025-04-11 14:24:44 +02:00
technique-ci
1e928fcc33
chore(deps): absorb 2025-04 dependabot GitHub Actions updates (#5537)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: May <110405507+mushroomempires@users.noreply.github.com>
2025-04-10 15:16:49 +02:00
Stéphane Chapron
a5c317cc50
feat(secu): add gitleaks configuration (#5543) 2025-04-10 10:50:19 +02:00
pkippes
5822de6cc1
Sync release 20250400 (#5544) 2025-04-07 18:47:06 +02:00
pkippes
d894389296
Release 20250400 (#5542) 2025-04-07 16:55:42 +02:00
pkippes
23526ce247 Empty-Commit 2025-04-07 11:27:59 +02:00
Lucie Dubrunfaut
59d5ef16d2
fix(network/aruba/aoscx/snmp): fixed hardware help section (#5448)
Co-authored-by: sdepassio <114986849+sdepassio@users.noreply.github.com>
2025-04-04 10:12:00 +02:00
Lucie Dubrunfaut
eab7a046d2
fix(apps::backup::veeam::local): update jobstatus help section (#5492) 2025-04-04 10:01:23 +02:00
sdepassio
781dac79b4
fix(apps::eclipse::mosquitto::mqtt): fixed metrics labels in numeric-value mode (#5534, #5462)
Co-authored-by: rmorandell-pgum@users.noreply.github.com

Refs: CTOR-1447
2025-04-03 15:16:20 +02:00
Lucie Dubrunfaut
d117f13521
enh(centreon-plugin-notification-*) : added missing packages on plugin repository (#5528)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
Co-authored-by: EvanAdam <eadam@centreon.com>
Refs: CTOR-1215
2025-04-02 16:40:34 +02:00
Evan-Adam
5889295b77
enh(mysql) add uptime in plugin output (#5535)
Refs:CTOR-1217

Co-authored-by: SavCent <134679564+SavCent@users.noreply.github.com>
2025-04-02 14:00:09 +02:00
qgarnier
edd04d213c
enh(f5-bigip-snmp): switch to metric v2 + add tests (#4656)
Co-authored-by: sfarouq-ext <116093375+sfarouq-ext@users.noreply.github.com>

Refs: MON-20991
Refs: CTOR-427
2025-04-01 18:06:41 +02:00
sfarouq-ext
5d10adc39b
Ctor 716 plugin network cisco standar (#5455)
Co-authored-by: garnier-quentin <garnier.quentin@gmail.com>
Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
2025-04-01 17:23:09 +02:00
Lucie Dubrunfaut
f2142d2485
fix options (#5527)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
2025-04-01 16:38:50 +02:00
Stéphane Chapron
035e018397
enh(secu): add gitleaks configuration (#5520)
Co-authored-by: sc <sc@centreon>
2025-04-01 12:04:25 +02:00
technique-ci
f7b45b2193
chore(deps): absorb 2025-03 dependabot GitHub Actions updates (#5485)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul Oureib <poureib@centreon.com>
2025-04-01 11:15:20 +02:00
sdepassio
b5c5fb4b61
enh(ups-apc-snmp): improve last time in battery status + fix dereference in script.pm (#5524 + #5412)
- Update the output for the "replace last time" for the battery status mode : it was displayed in seconds, it is now converted to a human readable format.

Refs: CTOR-1077

- $rebuild_args needs to be dereferenced when used in a join because it is a reference to an array. This is done when the script is executed with a non-root user (line 359) but not when called with root.

Authored by eseyman@users.noreply.github.com #5412
2025-03-31 14:28:23 +02:00
Jochen Platzgummer
75873668bf fix(network::sonus::sbc::snmp): fixed unknown call method map instance in dsp-stats mode (#5483)
Refs: CTOR-1460
2025-03-28 15:47:23 +01:00
sfarouq-ext
82074e5f9e feat(f5-bigip-snmp): add cpuusage mode + tests (#5471)
Refs: CTOR-427
2025-03-28 15:43:29 +01:00
sfarouq-ext
7baab38df6 feat(fortinet-fortigate-restapi): add certificates mode + tests (#5515)
Refs: CTOR-1451
2025-03-28 15:43:02 +01:00
sfarouq-ext
08e0e04099 feat(exense-step-restapi): new plugin to monitor plans executions + tests (#5518)
Refs: CTOR-854
2025-03-28 15:43:02 +01:00
Evan-Adam
92a92c0436 fix(veeam): remove unused sub
Refs:CTOR-1321
2025-03-28 15:43:02 +01:00
sfarouq-ext
63fa39cde5 spellcheck 2025-03-28 15:43:02 +01:00
sfarouq-ext
65569fe9e0 NEW TEST mode (jobs & list-jobs) 2025-03-28 15:43:02 +01:00
sfarouq-ext
6de4e7a770 WIP 2025-03-28 15:43:02 +01:00
Lucie Dubrunfaut
391f77555b Fix after user feedback 2025-03-28 15:43:02 +01:00
Lucie Dubrunfaut
480b0b05f8 First test to add replication jobs 2025-03-28 15:43:02 +01:00
omercier
4a50605c36 enh(vmware8-esx): add swap, diskio and network + tests (#5510) 2025-03-28 15:43:02 +01:00
sfarouq-ext
4e0df4ca4a Ctor 1452 plugin network fortinet fortigate snmp new modes switch usage and switches discovery (#5514)
Co-authored-by: Roman Morandell <46994680+rmorandell-pgum@users.noreply.github.com>
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
2025-03-28 15:43:02 +01:00
omercier
6f94314a60 fix(ci): add missing image + fix path for tests on noble 2025-03-28 15:43:02 +01:00
omercier
6027943d65
enh(counters/iplabe-ekara): allow to sort instances on attribute instead of instance key (#5501)
Refs: CTOR-1388
2025-03-21 08:56:35 +01:00
tuntoja
eeac58c17f
fix(release): fix plugins version detection on stable branch runs (#5439) 2025-03-20 10:21:58 +01:00
tuntoja
9a67330f43
feat: add noble to ci packaging and delivery (#5497) 2025-03-20 09:48:37 +01:00
technique-ci
7bcde8e753
chore(ci): update tj-actions/changed-files to 46.0.1 for branch develop (#5511) 2025-03-18 11:28:50 +01:00
Lucie Dubrunfaut
35ea6cf02f
fix(storage::ibm::fs900::snmp): remove wrong default value all CTOR-544 (#5495)
Co-authored-by: Lucie Dubrunfaut <ldubrunfaut@CNTR-PORT-A198>
Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
2025-03-14 09:57:12 +01:00
pkippes
ab9af303e1
Sync release 20250303 (#5507) 2025-03-13 17:30:36 +01:00
pkippes
5726ad44b3
Release 20250303 (#5506) 2025-03-13 17:03:50 +01:00
tuntoja
5da5683f94
fix(packaging): handle specific case of libssh-session packaging name (#5505) 2025-03-13 15:07:22 +01:00
sdepassio
c69ef4f5c5
fix(cpan-libraries): Add revision to update libraries (#5503) 2025-03-13 14:15:07 +01:00
pkippes
33bf4482a5
Release 20250302 (#5499) 2025-03-10 17:24:57 +01:00
sdepassio
800edc6a24
fix(cpan-libraries): Missing provides for some libraries (#5498) 2025-03-10 16:01:25 +01:00
pkippes
a7b7ac2c53
Sync release 20250300 (#5494) 2025-03-07 10:36:51 +01:00
464 changed files with 118075 additions and 2031 deletions

36
.github/CODEOWNERS vendored
View File

@ -1,23 +1,27 @@
* @centreon/owners-connectors
* @centreon/owners-connectors
*.md @centreon/owners-doc
*.mdx @centreon/owners-doc
*.md @centreon/owners-doc
*.mdx @centreon/owners-doc
*.cmake @centreon/owners-cpp
CMakeLists.txt @centreon/owners-cpp
Makefile @centreon/owners-cpp
*.cmake @centreon/owners-cpp
CMakeLists.txt @centreon/owners-cpp
Makefile @centreon/owners-cpp
*.pm @centreon/owners-perl
*.pl @centreon/owners-perl
*.t @centreon/owners-perl
*.pm @centreon/owners-perl
*.pl @centreon/owners-perl
*.t @centreon/owners-perl
*.py @centreon/owners-python
*.py @centreon/owners-python
*.sh @centreon/owners-bash
*.sh @centreon/owners-bash
tests/** @centreon/owners-robot-e2e
tests/** @centreon/owners-robot-e2e
.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-perl
selinux/** @centreon/owners-pipelines
.github/scripts/pod_spell_check.t @centreon/owners-perl
.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-perl
selinux/** @centreon/owners-pipelines
.github/scripts/pod_spell_check.t @centreon/owners-perl
.gitleaks.toml @centreon/owners-security
.gitleaksignore @centreon/owners-security
**/checkmarx-analysis.yml @centreon/owners-security

41
.github/ISSUE_TEMPLATE/1-bug-report.md vendored Normal file
View File

@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report for an issue or a bug
title: '[path::to::the::plugin]: <title>'
labels: ''
assignees: ''
---
Thank you for using Centreon plugins!
Please use this form for actual **bugs** only. See the **Other requests** form for more details.
All existing and future issues related to questions, new plugins or enhancements will be closed.
# Bug report
If you are certain it is a bug, please ensure that there aren't any [similar issues already open](https://github.com/centreon/centreon-plugins/issues) on the same bug.
If the same bug has already been logged, please close your issue and add a comment pointing to the existing one instead.
**For the sake of clarity, please remove the explanations from the issue template before submitting your issue.**
## Quick description
*In one or two sentences, what is your bug about?*
## How to reproduce
*Please provide the initial conditions to reproduce the bug down below*
- **Environment**: result of `uname -a ; cat /etc/redhat-release /etc/debian_version`.
- **Version of the plugin**: version of the package or last commit date if using a clone of this repository.
- **Information about the monitored resource**: the exact model and version of the device, software or product you are trying to monitor.
- **Command line**: the command line that is used.
## Expected result
*What you were expecting to have as a result (output, exit return)?*
## Actual result
*What you actually got. Please put emphasis on what seems wrong to you.*

View File

@ -0,0 +1,32 @@
---
name: Other requests
about: For other requests such as questions or enhancement requests, take a look at this form.
title: ''
labels: ''
assignees: ''
---
Thank you for using Centreon plugins!
# Other requests
## Questions
If you have trouble using our plugins, but are not sure whether it's due to a bug or a misuse, please take the time to ask for help on [The Watch, Data Collection section](https://thewatch.centreon.com/data-collection-6) and become certain that it is a bug before submitting it here.
## New Plugins and modes
There is high demand for new plugins and new functionalities on existing plugins, so we have to rely on our community to help us prioritize them.
How? Post your suggestion on [The Watch Ideas](https://thewatch.centreon.com/ideas) with as much detail as possible and we will pick the most voted topics to add them to our product roadmap.
To develop a plugin/mode, we need the following information, depending on the protocol:
* **SNMP**: MIB files and full snmpwalk of enterprise branch (`snmpwalk -ObentU -v 2c -c public address .1.3.6.1.4.1 > equipment.snmpwalk`) or [SNMP collections](https://thewatch.centreon.com/product-how-to-21/snmp-collection-tutorial-132).
* **HTTP API (SOAP, Rest/Json, XML-RPC)**: the documentation and some curl examples or HTTP [collections](https://thewatch.centreon.com/data-collection-6/centreon-plugins-discover-collection-modes-131).
* **CLI**: command line examples (command + result).
* **SQL**: queries + results + column types or [SQL collections](https://thewatch.centreon.com/product-how-to-21/sql-collection-tutorial-134).
* **JMX**: mbean names and attributes.
If some information is confidential, such as logins or IP addresses, obfuscate them in what is sent publicly and we'll get in touch with you by private message if this information is needed.
Please note that all the developments are open source, we will not commit to a release date. If it is an emergency for you, please contact [Centreon's sales team](https://www.centreon.com/contact/).

View File

@ -0,0 +1,308 @@
name: Workflow incident tracking
description: Create Jira ticket on incident
inputs:
jira_base_url:
required: true
description: jira base url
jira_user_email:
required: true
description: jira user email
jira_api_token:
required: true
description: jira api token
module_name:
required: true
description: module name
ticket_labels:
required: true
description: ticket labels, usually Pipeline + Nightly/Veracode + x
default: 'Pipeline'
ticket_squad:
required: true
description: id of the squad to assign the ticket to
default: 'DevSecOps'
runs:
using: "composite"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get ticket elements from context
id: get_context
run: |
# Safely set/unset IFS in order to properly parse the table of labels
[ -n "${IFS+set}" ] && saved_IFS=$IFS
IFS=', ' read -a ticket_labels <<< $(echo "${{ inputs.ticket_labels }}" | tr -d "[],'")
unset IFS
[ -n "${saved_IFS+set}" ] && { IFS=$saved_IFS; unset saved_IFS; }
# Change the context elements (summary, parent epic, etc.) that are checked depending on these ticket labels
if [[ "${ticket_labels[@]}" =~ "Nightly" ]]; then
parent_epic_id=206242
parent_epic_key="MON-151547"
ticket_summary="$(date '+%Y-%m-%d') ${{ inputs.module_name }}-${{ github.ref_name }} nightly build failure"
JSON_TEMPLATE_FILE="./.github/actions/create-jira-ticket/nightly-ticket-template.json"
sed -i \
-e 's|@MODULE_NAME@|${{ inputs.module_name }}|g' \
-e "s|@DATE@|$(date '+%Y-%m-%d')|g" $JSON_TEMPLATE_FILE
else
echo "::error::Cannot find a valid labelling option for the ticket."
exit 1
fi
case "${{ inputs.ticket_squad }}" in
"DevSecOps")
ticket_squad_id=10524
ticket_board_id=184
squad_name="DEVSECOPS"
project_name="MON"
;;
"Connectors")
ticket_squad_id=10504
ticket_board_id=222
squad_name="CONNECTORS"
project_name="CTOR"
*)
echo "::error::Cannot find a valid squad for value ${{ inputs.ticket_squad }}."
exit 1
;;
esac
echo "Ticket will be assigned to the $squad_name team."
current_sprint=$(curl --request GET \
--url ${{ inputs.jira_base_url }}/rest/agile/1.0/board/$ticket_board_id/sprint?state=active \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header "Accept: application/json" | jq --arg squad_name "$squad_name" '.values[] | select(.name | test($squad_name; "i")) | .id')
echo "[DEBUG] current_sprint: $current_sprint"
# General updates on all template files
sed -i \
-e 's|@GITHUB_BRANCH@|${{ github.base_ref || github.ref_name }}|g' \
-e 's|@GITHUB_SERVER_URL@|${{ github.server_url }}|g' \
-e 's|@GITHUB_REPOSITORY@|${{ github.repository }}|g' \
-e 's|@GITHUB_RUN_ID@|${{ github.run_id }}|g' \
-e 's|@GITHUB_RUN_ATTEMPT@|${{ github.run_attempt }}|g' $JSON_TEMPLATE_FILE
echo "parent_epic_id=$parent_epic_id" >> $GITHUB_OUTPUT
echo "parent_epic_key=$parent_epic_key" >> $GITHUB_OUTPUT
echo "ticket_summary=$ticket_summary" >> $GITHUB_OUTPUT
echo "ticket_board_id=$ticket_board_id" >> $GITHUB_OUTPUT
echo "ticket_squad_id=$ticket_squad_id" >> $GITHUB_OUTPUT
echo "project_name=$project_name" >> $GITHUB_OUTPUT
echo "current_sprint=$current_sprint" >> $GITHUB_OUTPUT
echo "json_template_file=$JSON_TEMPLATE_FILE" >> $GITHUB_OUTPUT
cat $JSON_TEMPLATE_FILE
cat $GITHUB_OUTPUT
shell: bash
env:
GH_TOKEN: ${{ github.token }}
- name: Check if the ticket already exists
id: check_ticket
run: |
# Checking if an incident ticket already exists
response=$(curl \
--write-out "%{http_code}" \
--request POST \
--url "${{ inputs.jira_base_url }}/rest/api/3/search" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data '{
"fields": ["summary"],
"jql": "project = ${{ steps.get_context.outputs.project_name }} AND parentEpic = ${{ steps.get_context.outputs.parent_epic_key }} AND issueType = Technical AND summary ~ \"${{ steps.get_context.outputs.ticket_summary }}\" AND component = \"${{ inputs.module_name }}\" AND resolution = unresolved ORDER BY key ASC",
"maxResults": 1
}'
)
echo "[DEBUG] $response"
if [[ $(echo "$response" | tr -d '\n' | tail -c 3) -ne 200 ]]; then
echo "::error:: Jira API request was not completed properly."
fi
ticket_key=$(echo "$response" | head -c -4 | jq .issues[0].key | xargs)
if [[ "$ticket_key" != "null" ]]; then
echo "abort_ticket_creation=true" >> $GITHUB_ENV
echo "ticket_key=$ticket_key" >> $GITHUB_ENV
echo "::notice::ticket found as $ticket_key aborting ticket creation"
fi
shell: bash
- name: Update existing nightly Jira ticket
if: |
env.abort_ticket_creation == 'true' &&
contains(steps.get_context.outputs.parent_epic_key, 'MON-151547')
run: |
# Adding failed job labels for already existing ticket
[ -n "${IFS+set}" ] && saved_IFS=$IFS
IFS=', ' read -a ticket_labels <<< $(echo "${{ inputs.ticket_labels }}" | tr -d "[],'")
unset IFS
[ -n "${saved_IFS+set}" ] && { IFS=$saved_IFS; unset saved_IFS; }
for label in ${ticket_labels[@]}; do
response=$(curl \
--request PUT \
--url "${{ inputs.jira_base_url }}/rest/api/3/issue/${{ env.ticket_key }}" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data "{ \"update\": { \"labels\": [ { \"add\": \"$label\" } ] } }"
)
done
ticket_description=$(curl --request GET \
--url "${{ inputs.jira_base_url }}/rest/api/3/issue/${{ env.ticket_key }}" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header "Accept: application/json" | jq '.fields.description')
mapfile -t jobs_failed < <(gh run view ${{ github.run_id }} --json jobs -q '.jobs[] | select(.conclusion == "failure") | .name')
echo "[DEBUG] - jobs failed for component ${FAILED_COMPONENTS[index]}: $jobs_failed"
new_list_of_failed_jobs=$(for job in "${jobs_failed[@]}"; do
cat <<EOF
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "$job"
}
]
}
]
}
EOF
done | jq -s '.'
)
updated_ticket_description=$(echo "$ticket_description" | jq --argjson new_list_of_failed_jobs "$new_list_of_failed_jobs" '
(.content[] | select(.type == "bulletList") | .content) = $new_list_of_failed_jobs
')
echo "[DEBUG] - updated_ticket_description = $updated_ticket_description"
curl --request PUT \
--url "${{ inputs.jira_base_url }}/rest/api/3/issue/${{ env.ticket_key }}" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"fields\": {
\"description\": $updated_ticket_description
}
}"
shell: bash
env:
GH_TOKEN: ${{ github.token }}
- name: Create Jira Issue
if: ${{ env.abort_ticket_creation != 'true' }}
run: |
# Get the name of the current job and list it
failed_job_name=$(gh run view ${{ github.run_id }} --json jobs | jq -r --arg job_name "${{ github.job }}" '.jobs[] | select(.name == $job_name) | .name')
CONTENT_TO_ADD_TO_TEMPLATE_FILE=$(jq -n --arg job "$failed_job_name" '{
"type": "bulletList",
"content": [
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": $job
}
]
}
]
}
]
}')
echo "[DEBUG] - CONTENT_TO_ADD_TO_TEMPLATE_FILE: $CONTENT_TO_ADD_TO_TEMPLATE_FILE"
TEMPLATE_FILE=$(cat ${{ steps.get_context.outputs.json_template_file }})
UPDATED_TEMPLATE_FILE=$(jq --argjson NEW_CONTENT "$CONTENT_TO_ADD_TO_TEMPLATE_FILE" '.content += [$NEW_CONTENT]' <<< "$TEMPLATE_FILE")
# Creating a new incident ticket on Jira
DATA=$( cat <<-EOF
{
"fields": {
"summary": "${{ steps.get_context.outputs.ticket_summary }}",
"project": {"key": "${{ steps.get_context.outputs.project_name }}"},
"issuetype": {"id": "10209"},
"parent": {"id": "${{ steps.get_context.outputs.parent_epic_id }}", "key": "${{ steps.get_context.outputs.parent_epic_key }}"},
"labels": ${{ inputs.ticket_labels }},
"components":[{"name": "${{ inputs.module_name }}"}],
"customfield_10902": {"id": "${{ steps.get_context.outputs.ticket_squad_id }}", "value": "${{ inputs.ticket_squad }}"},
"description": $UPDATED_TEMPLATE_FILE
}
}
EOF
)
if [[ ${{ steps.get_context.outputs.current_sprint }} != "null" ]]; then
DATA=$(echo "$DATA" | jq '.fields.customfield_10007 = ${{ steps.get_context.outputs.current_sprint }}')
fi
echo "[DEBUG] - DATA: $DATA"
response=$(curl \
--request POST \
--url "${{ inputs.jira_base_url }}/rest/api/3/issue" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data "$DATA")
if [ $? -ne 0 ]; then
echo "::error::Failed to create ticket: $response"
exit 1
fi
echo $response
ticket_key=$(echo "$response" | jq -r .key)
echo "::notice::Created ticket: $ticket_key"
# Update priority on newly created ticket since you cannot create a ticket with another priority than medium
response=$(curl \
--request PUT \
--url "${{ inputs.jira_base_url }}/rest/api/3/issue/$ticket_key" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{ "fields": { "priority": { "id": "1" } } }'
)
echo $response
# Update ticket status so that squad members can see it in their respective sprints
for transition_id in 11 21; do
response=$(curl \
--request POST \
--url "${{ inputs.jira_base_url }}/rest/api/latest/issue/$ticket_key/transitions" \
--user "${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data "{\"transition\": {\"id\": \"$transition_id\"} }"
)
echo $response
done
shell: bash
env:
GH_TOKEN: ${{ github.token }}

View File

@ -0,0 +1,55 @@
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This ticket was automatically created by the nightly workflow run. Feel free to update it as you need to. If you have any feedback about it, please contact the Delivery team.",
"marks": [
{
"type": "em"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This incident ticket relates to the @MODULE_NAME@ nightly on the @GITHUB_BRANCH@ branch which failed on @DATE@."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Link to the failed nightly",
"marks": [
{
"type": "link",
"attrs": {
"href": "@GITHUB_SERVER_URL@/@GITHUB_REPOSITORY@/actions/runs/@GITHUB_RUN_ID@/attempts/@GITHUB_RUN_ATTEMPT@"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "List of jobs that failed on the @MODULE_NAME@ nightly:"
}
]
}
]
}

View File

@ -18,14 +18,14 @@ runs:
using: 'composite'
steps:
- name: Download Artifacts
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: ${{ inputs.source_name_pattern }}*
path: ${{ inputs.target_name }}
merge-multiple: true
- name: Upload the Regrouped Artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ inputs.target_name }}
path: |

View File

@ -77,7 +77,7 @@ runs:
- if: ${{ inputs.stability != 'stable' }}
name: Restore packages from cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ steps.parse-distrib.outputs.package_extension }}
key: ${{ inputs.cache_key }}
@ -107,7 +107,7 @@ runs:
}
- name: Download packages from testing
if: ${{ inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy' }}
if: ${{ inputs.stability == 'stable' && github.event_name == 'push' }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
@ -170,7 +170,7 @@ runs:
- name: Publish packages to ${{ inputs.stability }}
if: |
contains(fromJson('["testing", "unstable"]'), inputs.stability) ||
(inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy')
(inputs.stability == 'stable' && github.event_name == 'push')
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |

View File

@ -122,7 +122,7 @@ runs:
done
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}
@ -130,7 +130,7 @@ runs:
# Add to your PR the label upload-artifacts to get packages as artifacts
- if: ${{ contains(github.event.pull_request.labels.*.name, 'upload-artifacts') }}
name: Upload package artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension}}

View File

@ -54,6 +54,11 @@ runs:
PACKAGE_DISTRIB_NAME="0ubuntu.22.04"
PACKAGE_EXTENSION="deb"
DISTRIB_FAMILY="ubuntu"
elif [[ "${{ inputs.distrib }}" == "noble" ]]; then
PACKAGE_DISTRIB_SEPARATOR="-"
PACKAGE_DISTRIB_NAME="0ubuntu.24.04"
PACKAGE_EXTENSION="deb"
DISTRIB_FAMILY="ubuntu"
else
echo "::error::Distrib ${{ inputs.distrib }} cannot be parsed"
exit 1

View File

@ -66,14 +66,14 @@ runs:
shell: bash
- name: Promote DEB package to stable
if: ${{ contains(fromJSON('["bullseye", "bookworm", "jammy"]'), inputs.distrib) }}
if: ${{ contains(fromJSON('["bullseye", "bookworm", "jammy", "noble"]'), inputs.distrib) }}
run: |
set -eux
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
echo "[DEBUG] - Distrib: ${{ inputs.module }}"
if [[ "${{ inputs.distrib }}" == "jammy" ]]; then
if [[ "${{ inputs.distrib }}" == "jammy" || "${{ inputs.distrib }}" == "noble" ]]; then
repo="ubuntu-plugins"
else
repo="apt-plugins"

View File

@ -40,7 +40,7 @@ runs:
shell: bash
- name: Restore packages from cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ github.sha }}-${{ github.run_id }}-${{ inputs.package_extension }}-${{ inputs.distrib }}

View File

@ -16,7 +16,7 @@ runs:
steps:
- name: get the cached plugin
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ inputs.package-extension }}
key: ${{ inputs.cache-key }}
@ -24,4 +24,6 @@ runs:
- name: Install, test and remove plugin
shell: bash
run: python3 .github/scripts/test-all-plugins.py ${{ inputs.package-extension }} ${{ inputs.plugin-list }}
run: |
[[ -f /.venv/bin/activate ]] && source /.venv/bin/activate
python3 .github/scripts/test-all-plugins.py ${{ inputs.package-extension }} ${{ inputs.plugin-list }}

View File

@ -11,10 +11,10 @@ dnf install -y \
zstd
cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar zxf apache-maven-3.8.8-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.8/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.8-bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz
tar zxf apache-maven-3.8.9-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.9/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.9-bin.tar.gz
echo '[goreleaser]
name=GoReleaser

View File

@ -11,10 +11,10 @@ dnf install -y \
zstd
cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar zxf apache-maven-3.8.8-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.8/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.8-bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz
tar zxf apache-maven-3.8.9-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.9/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.9-bin.tar.gz
echo '[goreleaser]
name=GoReleaser

View File

@ -13,10 +13,10 @@ apt-get install -y \
zstd
cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar zxf apache-maven-3.8.8-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.8/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.8-bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz
tar zxf apache-maven-3.8.9-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.9/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.9-bin.tar.gz
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list

View File

@ -0,0 +1,30 @@
ARG REGISTRY_URL
FROM ${REGISTRY_URL}/ubuntu:noble
RUN bash -e <<EOF
apt-get update
apt-get install -y \
ca-certificates \
git \
openjdk-17-jdk \
wget \
zstd
cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.9/binaries/apache-maven-3.8.9-bin.tar.gz
tar zxf apache-maven-3.8.9-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.9/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.9-bin.tar.gz
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm=2.41.0
apt-get clean all
EOF
WORKDIR /src

View File

@ -0,0 +1,72 @@
ARG REGISTRY_URL=docker.io
FROM ${REGISTRY_URL}/ubuntu:noble
ENV DEBIAN_FRONTEND=noninteractive
# fix locale
RUN bash -e <<EOF
apt-get update
apt-get install -y locales
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
echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder
apt-get install -y \
aptitude \
ca-certificates \
cpanminus \
curl \
debmake \
devscripts \
dh-make \
dh-make-perl \
fakeroot \
gcc \
git \
git-buildpackage \
jq \
libapp-fatpacker-perl \
libcurl4-openssl-dev \
libczmq-dev \
libczmq-dev\
libfile-copy-recursive-perl \
libjson-perl \
libmodule-build-tiny-perl \
libmodule-install-perl \
libssh-dev \
lintian \
python3 \
quilt \
ruby \
uuid-dev \
zstd
cpanm Module::Build::Tiny
cpanm Module::Install
cpanm Crypt::OpenSSL::Guess
gem install fpm
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm=2.41.0
apt-get clean
EOF
COPY .github/patch/fpm-deb.rb.diff /tmp/fpm-deb.rb.diff
# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released (https://github.com/jordansissel/fpm/pull/1947).
RUN patch -i /tmp/fpm-deb.rb.diff $(find / -type f -name "deb.rb") && /bin/rm -rf /tmp/fpm-deb.rb.diff

View File

@ -12,7 +12,7 @@ dnf clean all
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio
pip3.11 install snmpsim
# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -

View File

@ -12,7 +12,7 @@ dnf clean all
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio
pip3.11 install snmpsim
# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -

View File

@ -28,7 +28,7 @@ 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
pip3 install snmpsim
# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\

View File

@ -27,7 +27,7 @@ apt-get update
apt-get install -y python3 python3-dev python3-pip
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio
pip3 install snmpsim
# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\

View File

@ -27,7 +27,7 @@ apt-get update
apt-get install -y python3 python3-dev python3-pip
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio
pip3 install snmpsim
# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\

View File

@ -0,0 +1,53 @@
ARG REGISTRY_URL=docker.io
FROM ${REGISTRY_URL}/ubuntu:noble
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
# Avoid apt to clean packages cache directory
rm -f /etc/apt/apt.conf.d/docker-clean
apt-get update
# Install requirements for python virtual envs
apt-get install -y python3-venv
python3 -m venv .venv
source .venv/bin/activate
# Install Robotframework
apt-get install -y python3 python3-dev python3-pip
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim
# 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/ubuntu-plugins-testing/ noble main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/ubuntu-plugins-unstable/ noble 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

View File

@ -46,11 +46,11 @@ gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo
dnf install -y gcc make cpan perl-Test2-Suite.noarch perl-Test2-Plugin-NoWarnings.noarch 'perl(Authen::Radius)' 'perl(Convert::Binary::C)' 'perl(Crypt::OpenSSL::RSA)' 'perl(Data::Dumper)' 'perl(Date::Parse)' 'perl(DateTime)' 'perl(DateTime::Duration)' 'perl(DateTime-Format-Duration-ISO8601)' 'perl(DateTime::Format::Strptime)' 'perl(DBD::mysql)' 'perl(DBD::ODBC)' 'perl(DBD::Pg)' 'perl(DBD::Sybase)' 'perl(DBI)' 'perl(Device::Modbus::RTU::Client)' 'perl(Device::Modbus::TCP::Client)' 'perl(Digest::CRC)' 'perl(Digest::MD5)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Sender)' 'perl(Email::Send::SMTP::Gmail)' 'perl(Email::Simple)' 'perl(File::Basename)' 'perl(Filesys::SmbClient)' 'perl(Hash::Ordered)' 'perl(HTML::Template)' 'perl(IO::Select)' 'perl(IO::Socket)' 'perl(IO::Socket::INET)' 'perl(IO::Socket::INET6)' 'perl(IO::Socket::SSL)' 'perl(JMX::Jmx4Perl)' 'perl(JSON)' 'perl(JSON::Path)' 'perl(JSON::WebToken)' 'perl(JSON::XS)' 'perl(Libssh::Session)' 'perl-Mail-IMAPClient' 'perl(MIME::Base64)' 'perl(MongoDB)' 'perl(NetAddr::IP)' 'perl(Net::DHCP::Constants)' 'perl(Net::DHCP::Packet)' 'perl(Net::DNS)' 'perl(Net::FTP)' 'perl(Net::FTPSSL)' 'perl(Net::LDAP)' 'perl(Net::MQTT::Simple)' 'perl(Net::NTP)' 'perl(Net::SSLeay)' 'perl(Net::Subnet)' 'perl(Net::Telnet)' 'perl(Net::TFTP)' 'perl(openwsman)' 'perl(Pod::Parser)' 'perl(POSIX)' 'perl(Redis)' 'perl(RRDs)' 'perl(SNMP)' 'perl(Socket)' 'perl(Text::CSV)' 'perl(Time::HiRes)' 'perl(URI::Encode)' 'perl(URI::Escape)' 'perl(UUID)' 'perl(WWW::Selenium)' 'perl(XML::LibXML)' 'perl(XML::LibXML::Simple)' 'perl(XML::Simple)' 'perl(XML::XPath)' 'perl(ZMQ::LibZMQ4)' 'perl(Data::UUID)'
dnf install -y gcc make cpan perl-Test2-Suite.noarch perl-Test2-Plugin-NoWarnings.noarch 'perl(Authen::Radius)' 'perl(Convert::Binary::C)' 'perl(Crypt::OpenSSL::RSA)' 'perl(Data::Dumper)' 'perl(Date::Parse)' 'perl(DateTime)' 'perl(DateTime::Duration)' 'perl(DateTime-Format-Duration-ISO8601)' 'perl(DateTime::Format::Strptime)' 'perl(DBD::mysql)' 'perl(DBD::ODBC)' 'perl(DBD::Pg)' 'perl(DBD::Sybase)' 'perl(DBI)' 'perl(Device::Modbus::RTU::Client)' 'perl(Device::Modbus::TCP::Client)' 'perl(Digest::CRC)' 'perl(Digest::MD5)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Sender)' 'perl(Email::Send::SMTP::Gmail)' 'perl(Email::Simple)' 'perl(File::Basename)' 'perl(Filesys::SmbClient)' 'perl(Hash::Ordered)' 'perl(HTML::Template)' 'perl(IO::Select)' 'perl(IO::Socket)' 'perl(IO::Socket::INET)' 'perl(IO::Socket::INET6)' 'perl(IO::Socket::SSL)' 'perl(JMX::Jmx4Perl)' 'perl(JSON)' 'perl(JSON::Path)' 'perl(JSON::WebToken)' 'perl(JSON::XS)' 'perl(Libssh::Session)' 'perl-Mail-IMAPClient' 'perl(MIME::Base64)' 'perl(MongoDB)' 'perl(NetAddr::IP)' 'perl(Net::DHCP::Constants)' 'perl(Net::DHCP::Packet)' 'perl(Net::DNS)' 'perl(Net::FTP)' 'perl(Net::FTPSSL)' 'perl(Net::LDAP)' 'perl(Net::MQTT::Simple)' 'perl(Net::NTP)' 'perl(Net::SSLeay)' 'perl(Net::Subnet)' 'perl(Net::Telnet)' 'perl(Net::TFTP)' 'perl(openwsman)' 'perl(Pod::Parser)' 'perl(POSIX)' 'perl(Redis)' 'perl(RRDs)' 'perl(SNMP)' 'perl(Socket)' 'perl(Text::CSV)' 'perl(Time::HiRes)' 'perl(URI::Encode)' 'perl(URI::Escape)' 'perl(UUID)' 'perl(WWW::Selenium)' 'perl(XML::LibXML)' 'perl(XML::LibXML::Simple)' 'perl(XML::Simple)' 'perl(XML::XPath)' 'perl(ZMQ::LibZMQ4)' 'perl(Data::UUID)' 'perl(String::ShellQuote)'
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
dnf -y install 'perl(Crypt::OpenSSL::AES)' 'perl-Net-Curl' 'perl(YAML::XS)' 'perl(Hash::Merge)' 'perl(Clone)' 'perl(CryptX)' 'perl(JSON::XS)' 'perl(JSON::PP)'
dnf -y install 'perl(Hash::Merge)' 'perl(YAML::XS)' 'perl(ZMQ::FFI)' 'perl-CryptX' 'perl(EV)'
dnf -y install 'perl(Crypt::OpenSSL::AES)' 'perl-Net-Curl' 'perl(YAML::XS)' 'perl(Hash::Merge)' 'perl(Clone)' 'perl(CryptX)' 'perl(JSON::XS)' 'perl(JSON::PP)' 'perl(Digest::MD5::File)'
dnf -y install 'perl(Hash::Merge)' 'perl(YAML::XS)' 'perl(ZMQ::FFI)' 'perl-CryptX' 'perl(EV)' 'perl(RRDs)' 'perl(DBI)' 'perl(DBD::SQLite)' 'perl(HTTP::Daemon)' 'perl(HTTP::Daemon::SSL)' 'perl(NetAddr::IP)' 'perl(Mojolicious)' 'perl(Mojo::IOLoop::Signal)' 'perl(Net::Curl)' 'perl(EV)'
dnf -y install git mariadb
dnf clean all
mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

View File

@ -45,10 +45,14 @@ enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo
dnf install -y make cpan perl-Test2-Suite.noarch 'perl(Authen::Radius)' 'perl(Convert::Binary::C)' 'perl(Crypt::OpenSSL::RSA)' 'perl(Data::Dumper)' 'perl(Date::Parse)' 'perl(DateTime)' 'perl(DateTime::Duration)' 'perl(DateTime-Format-Duration-ISO8601)' 'perl(DateTime::Format::Strptime)' 'perl(DBD::mysql)' 'perl(DBD::ODBC)' 'perl(DBD::Pg)' 'perl(DBD::Sybase)' 'perl(DBI)' 'perl(Device::Modbus::RTU::Client)' 'perl(Device::Modbus::TCP::Client)' 'perl(Digest::CRC)' 'perl(Digest::MD5)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Sender)' 'perl(Email::Send::SMTP::Gmail)' 'perl(Email::Simple)' 'perl(File::Basename)' 'perl(Filesys::SmbClient)' 'perl(Hash::Ordered)' 'perl(HTML::Template)' 'perl(IO::Select)' 'perl(IO::Socket)' 'perl(IO::Socket::INET)' 'perl(IO::Socket::INET6)' 'perl(IO::Socket::SSL)' 'perl(JMX::Jmx4Perl)' 'perl(JSON)' 'perl(JSON::Path)' 'perl(JSON::WebToken)' 'perl(JSON::XS)' 'perl(Libssh::Session)' 'perl-Mail-IMAPClient' 'perl(MIME::Base64)' 'perl(MongoDB)' 'perl(NetAddr::IP)' 'perl(Net::DHCP::Constants)' 'perl(Net::DHCP::Packet)' 'perl(Net::DNS)' 'perl(Net::FTP)' 'perl(Net::FTPSSL)' 'perl(Net::LDAP)' 'perl(Net::MQTT::Simple)' 'perl(Net::NTP)' 'perl(Net::SSLeay)' 'perl(Net::Subnet)' 'perl(Net::Telnet)' 'perl(Net::TFTP)' 'perl(openwsman)' 'perl(Pod::Parser)' 'perl(POSIX)' 'perl(Redis)' 'perl(RRDs)' 'perl(SNMP)' 'perl(Socket)' 'perl(Text::CSV)' 'perl(Time::HiRes)' 'perl(URI::Encode)' 'perl(URI::Escape)' 'perl(UUID)' 'perl(WWW::Selenium)' 'perl(XML::LibXML)' 'perl(XML::LibXML::Simple)' 'perl(XML::Simple)' 'perl(XML::XPath)' 'perl(ZMQ::LibZMQ4)' 'perl(Data::UUID)'
dnf install -y make cpan perl-Test2-Suite.noarch 'perl(Authen::Radius)' 'perl(Convert::Binary::C)' 'perl(Crypt::OpenSSL::RSA)' 'perl(Data::Dumper)' 'perl(Date::Parse)' 'perl(DateTime)' 'perl(DateTime::Duration)' 'perl(DateTime-Format-Duration-ISO8601)' 'perl(DateTime::Format::Strptime)' 'perl(DBD::mysql)' 'perl(DBD::ODBC)' 'perl(DBD::Pg)' 'perl(DBD::Sybase)' 'perl(DBI)' 'perl(Device::Modbus::RTU::Client)' 'perl(Device::Modbus::TCP::Client)' 'perl(Digest::CRC)' 'perl(Digest::MD5)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Sender)' 'perl(Email::Send::SMTP::Gmail)' 'perl(Email::Simple)' 'perl(File::Basename)' 'perl(Filesys::SmbClient)' 'perl(Hash::Ordered)' 'perl(HTML::Template)' 'perl(IO::Select)' 'perl(IO::Socket)' 'perl(IO::Socket::INET)' 'perl(IO::Socket::INET6)' 'perl(IO::Socket::SSL)' 'perl(JMX::Jmx4Perl)' 'perl(JSON)' 'perl(JSON::Path)' 'perl(JSON::WebToken)' 'perl(JSON::XS)' 'perl(Libssh::Session)' 'perl-Mail-IMAPClient' 'perl(MIME::Base64)' 'perl(MongoDB)' 'perl(NetAddr::IP)' 'perl(Net::DHCP::Constants)' 'perl(Net::DHCP::Packet)' 'perl(Net::DNS)' 'perl(Net::FTP)' 'perl(Net::FTPSSL)' 'perl(Net::LDAP)' 'perl(Net::MQTT::Simple)' 'perl(Net::NTP)' 'perl(Net::SSLeay)' 'perl(Net::Subnet)' 'perl(Net::Telnet)' 'perl(Net::TFTP)' 'perl(openwsman)' 'perl(Pod::Parser)' 'perl(POSIX)' 'perl(Redis)' 'perl(RRDs)' 'perl(SNMP)' 'perl(Socket)' 'perl(Text::CSV)' 'perl(Time::HiRes)' 'perl(URI::Encode)' 'perl(URI::Escape)' 'perl(UUID)' 'perl(WWW::Selenium)' 'perl(XML::LibXML)' 'perl(XML::LibXML::Simple)' 'perl(XML::Simple)' 'perl(XML::XPath)' 'perl(ZMQ::LibZMQ4)' 'perl(Data::UUID)' 'perl(String::ShellQuote)'
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
dnf -y install 'perl(Crypt::OpenSSL::AES)' 'perl-Net-Curl' 'perl(YAML::XS)' 'perl(Hash::Merge)' 'perl(Clone)' 'perl(CryptX)' 'perl(JSON::XS)' 'perl(JSON::PP)'
dnf -y install 'perl(Hash::Merge)' 'perl(YAML::XS)' 'perl(ZMQ::FFI)' 'perl-CryptX' 'perl(EV)'
dnf -y install 'perl(Crypt::OpenSSL::AES)' 'perl-Net-Curl' 'perl(YAML::XS)' 'perl(Hash::Merge)' 'perl(Clone)' 'perl(CryptX)' 'perl(JSON::XS)' 'perl(JSON::PP)' 'perl(Digest::MD5::File)'
dnf -y install 'perl(ZMQ::FFI)' 'perl(EV)' 'perl(RRDs)' 'perl(DBI)' 'perl(DBD::SQLite)' 'perl(HTTP::Daemon)' 'perl(HTTP::Daemon::SSL)' 'perl(NetAddr::IP)' 'perl(Mojolicious)' 'perl(Mojo::IOLoop::Signal)' 'perl(Net::Curl)'
dnf -y install git mariadb
dnf clean all
dnf clean all
mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

View File

@ -23,10 +23,11 @@ echo "deb https://packages.centreon.com/apt-plugins-testing/ bookworm main" | te
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
apt-get -y install libtest2-harness-perl libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl perl perl-modules
apt-get -y install libtest2-harness-perl libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl perl perl-modules libstring-shellquote-perl
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl
apt-get -y install libhash-merge-perl libyaml-libyaml-perl libzmq-ffi-perl libcryptx-perl libev-perl
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl librrds-perl libdbi-perl libdbd-sqlite3-perl libhttp-daemon-perl libhttp-daemon-ssl-perl libnetaddr-ip-perl libmojolicious-perl libmojo-ioloop-signal-perl libnet-curl-perl libev-perl
apt-get -y install libhash-merge-perl libyaml-libyaml-perl libzmq-ffi-perl libcryptx-perl libev-perl libdigest-md5-file-perl
apt-get -y install git mariadb-client
apt-get clean
EOF

View File

@ -23,10 +23,10 @@ echo "deb https://packages.centreon.com/apt-plugins-testing/ bullseye main" | te
echo "deb https://packages.centreon.com/apt-plugins-unstable/ bullseye 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
apt-get -y install gcc make libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl perl perl-modules libdata-uuid-perl
apt-get -y install gcc make libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl perl perl-modules libdata-uuid-perl libdigest-md5-file-perl libstring-shellquote-perl
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl
apt-get -y install libhash-merge-perl libyaml-libyaml-perl libzmq-ffi-perl libcryptx-perl libev-perl libcpanel-json-xs-perl
apt-get -y install libzmq-ffi-perl libcpanel-json-xs-perl libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl librrds-perl libdbi-perl libdbd-sqlite3-perl libhttp-daemon-perl libhttp-daemon-ssl-perl libnetaddr-ip-perl libmojolicious-perl libmojo-ioloop-signal-perl libnet-curl-perl libev-perl libdigest-md5-file-perl
apt-get -y install git mariadb-client
apt-get clean
NONINTERACTIVE_TESTING=1 PERL_MM_USE_DEFAULT=1 cpan Test2::Harness UUID
EOF

View File

@ -25,9 +25,10 @@ echo "deb https://packages.centreon.com/ubuntu-plugins-unstable/ jammy main" | t
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt-get update
apt-get -y install gcc make libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjmx4perl-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl libzmq-libzmq4-perl perl perl-modules
apt-get -y install gcc make libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjmx4perl-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl libzmq-libzmq4-perl perl perl-modules libstring-shellquote-perl
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl librrds-perl libdbi-perl libdbd-sqlite3-perl libhttp-daemon-perl libhttp-daemon-ssl-perl libnetaddr-ip-perl libmojolicious-perl libmojo-ioloop-signal-perl libnet-curl-perl libev-perl libdigest-md5-file-perl
apt-get -y install git mariadb-client
apt-get clean
NONINTERACTIVE_TESTING=1 PERL_MM_USE_DEFAULT=1 cpan Test2::Harness UUID

View File

@ -0,0 +1,38 @@
ARG REGISTRY_URL=docker.io
FROM ${REGISTRY_URL}/ubuntu:noble
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 gpg
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
# Add Centreon plugins repositories
echo "deb https://packages.centreon.com/ubuntu-plugins-stable/ noble main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/ubuntu-plugins-testing/ noble main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/ubuntu-plugins-unstable/ noble 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
apt-get -y install gcc make libtest2-plugin-nowarnings-perl libauthen-radius-perl libconvert-binary-c-perl libcrypt-openssl-rsa-perl libdata-dump-perl libdatetime-format-dateparse-perl libdatetime-format-strptime-perl libdatetime-perl libdbd-mysql-perl libdbd-odbc-perl libdbd-pg-perl libdbd-sybase-perl libdbi-perl libdigest-crc-perl libdigest-md5-perl libdigest-sha-perl libemail-mime-perl libemail-sender-perl libemail-send-smtp-gmail-perl libfilesys-smbclient-perl libhtml-template-perl libio-socket-inet6-perl libio-socket-ip-perl libjmx4perl-perl libjson-maybexs-perl libjson-perl libjson-webtoken-perl libmail-imapclient-perl libmime-base64-perl libmongodb-perl libnet-dhcp-perl libnet-dns-perl libnet-ldap-perl libnet-mqtt-simple-perl libnet-ntp-perl libnet-ssleay-perl libnet-subnet-perl libnet-telnet-perl libnet-tftp-perl libopenwsman-perl libredis-perl librrds-perl libsnmp-perl libsocket-perl libssh-session-perl libtest-www-selenium-perl libtext-csv-perl libtime-hires-perl libtime-parsedate-perl libuuid-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-simple-perl libxml-xpath-perl libzmq-libzmq4-perl perl perl-modules libstring-shellquote-perl
# this image is used by centreon-perl-libs unit test and centreon-gorgone unit tests.
apt-get -y install libcrypt-openssl-aes-perl libnet-curl-perl libyaml-libyaml-perl libhash-merge-perl libclone-choose-perl libcryptx-perl libjson-xs-perl libjson-pp-perl librrds-perl libdbi-perl libdbd-sqlite3-perl libhttp-daemon-perl libhttp-daemon-ssl-perl libnetaddr-ip-perl libmojolicious-perl libmojo-ioloop-signal-perl libnet-curl-perl libev-perl libdigest-md5-file-perl
apt-get -y install git mariadb-client
apt-get clean
NONINTERACTIVE_TESTING=1 PERL_MM_USE_DEFAULT=1 cpan Test2::Harness UUID
mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/
EOF

View File

@ -53,6 +53,7 @@ overrides:
perl(FindBin),
perl(lib),
perl(sort),
perl(String::ShellQuote),
@RPM_DEPENDENCIES@
]
conflicts:
@ -80,6 +81,7 @@ overrides:
libkeepass-reader-perl,
libdatetime-perl,
libxml-libxml-perl,
libstring-shellquote-perl,
@DEB_DEPENDENCIES@
]
conflicts:

View File

@ -66,6 +66,7 @@ foreach my $plugin (@plugins) {
File::Path::remove_tree('lib');
File::Path::make_path('lib');
my @common_files = (
'centreon/plugins/curllogger.pm',
'centreon/plugins/http.pm',
'centreon/plugins/misc.pm',
'centreon/plugins/mode.pm',

View File

@ -10,8 +10,8 @@ def get_tests_folders(plugin_name):
folder_list = []
pkg_file = open("./packaging/" + plugin_name + "/pkg.json")
packaging = json.load(pkg_file)
for file in packaging["files"]: # loop on "files" array in pkg.json file.
if os.path.isdir("tests/" + file): # check if the path is a directory in the "tests" folder
for file in packaging["files"]: # loop on "files" array in pkg.json file.
if os.path.isdir("tests/" + file): # check if the path is a directory in the "tests" folder
folder_list.append("tests/" + file)
return folder_list
@ -27,8 +27,10 @@ def test_plugin(plugin_name):
print(f"{plugin_name} folders_list : {folders_list}")
if len(folders_list) == 0:
return 0 # no tests present at the moment, but we still have tested the plugin can be installed.
robot_results = subprocess.run("robot --exclude notauto -v ''CENTREON_PLUGINS:" + get_plugin_full_path(plugin_name) + " " + " ".join(folders_list),
shell=True, check=False)
robot_results = subprocess.run(
"robot --exclude notauto -v ''CENTREON_PLUGINS:" + get_plugin_full_path(plugin_name) + " " + " ".join(
folders_list),
shell=True, check=False)
return robot_results.returncode
@ -52,12 +54,13 @@ def launch_snmp_sim():
snmpsim_cmd = "snmpsim-command-responder --logging-method=null --agent-udpv4-endpoint=127.0.0.1:2024 --process-user=snmp --process-group=snmp --data-dir='./tests' &"
try_command(cmd=snmpsim_cmd, error="can't launch snmp sim daemon.")
def refresh_packet_manager(archi):
with open('/var/log/robot-plugins-installation-tests.log', "a") as outfile:
if archi == "deb":
outfile.write("apt-get update\n")
output_status = (subprocess.run(
"apt-get update",
"apt-get update",
shell=True, check=False, stderr=subprocess.STDOUT, stdout=outfile)).returncode
elif archi == "rpm":
return 0
@ -66,17 +69,20 @@ def refresh_packet_manager(archi):
exit(1)
return output_status
def install_plugin(plugin, archi):
with open('/var/log/robot-plugins-installation-tests.log', "a") as outfile:
if archi == "deb":
outfile.write("apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb\n")
outfile.write(
"apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb\n")
output_status = (subprocess.run(
"apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb",
"apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb",
shell=True, check=False, stderr=subprocess.STDOUT, stdout=outfile)).returncode
elif archi == "rpm":
outfile.write("dnf install --setopt=keepcache=True -y ./" + plugin + "*.rpm\n")
output_status = (subprocess.run("dnf install --setopt=keepcache=True -y ./" + plugin + "*.rpm", shell=True, check=False,
stderr=subprocess.STDOUT, stdout=outfile)).returncode
output_status = (
subprocess.run("dnf install --setopt=keepcache=True -y ./" + plugin + "*.rpm", shell=True, check=False,
stderr=subprocess.STDOUT, stdout=outfile)).returncode
else:
print(f"Unknown architecture, expected deb or rpm, got {archi}. Exiting.")
exit(1)
@ -86,17 +92,19 @@ def install_plugin(plugin, archi):
def remove_plugin(plugin, archi):
with open('/var/log/robot-plugins-installation-tests.log', "a") as outfile:
if archi == "deb":
outfile.write("apt-get -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' autoremove -y " + plugin.lower() + "\n")
outfile.write(
"export SUDO_FORCE_REMOVE=yes; apt-get -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' autoremove -y "
+ plugin.lower() + "\n")
output_status = (subprocess.run(
"apt-get -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' autoremove -y " + plugin.lower(),
"export SUDO_FORCE_REMOVE=yes; apt-get -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' autoremove -y " + plugin.lower(),
shell=True, check=False, stderr=subprocess.STDOUT, stdout=outfile)).returncode
# -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' is an option to force apt to keep the package in
# /var/cache/apt/archives, so it do not re download them for every installation.
# 'autoremove', contrary to 'remove' all dependancy while removing the original package.
elif archi == "rpm":
outfile.write("dnf remove --setopt=keepcache=True -y " + plugin + "\n")
output_status = (subprocess.run("dnf remove --setopt=keepcache=True -y " + plugin, shell=True, check=False,
outfile.write("dnf remove --setopt=protected_packages= --setopt=keepcache=True -y " + plugin + "\n")
output_status = (subprocess.run("dnf remove --setopt=protected_packages= --setopt=keepcache=True -y " + plugin, shell=True, check=False,
stderr=subprocess.STDOUT, stdout=outfile)).returncode
else:
print(f"Unknown architecture, expected deb or rpm, got {archi}. Exiting.")
@ -135,7 +143,7 @@ if __name__ == '__main__':
print("plugin : ", plugin)
folders_list = get_tests_folders(plugin)
if len(folders_list) == 0:
print(f"we don't test {plugin} as it don't have any robots tests.")
print(f"we don't test {plugin} as it doesn't have any robot tests.")
continue
nb_plugins += 1
@ -153,7 +161,7 @@ if __name__ == '__main__':
error_purge += tmp
print(f"{nb_plugins} plugins tested.\n there was {error_install} installation error, {error_tests} test "
f"errors, and {error_purge} removal error list of error : {list_plugin_error}",)
f"errors, and {error_purge} removal error list of error : {list_plugin_error}", )
if error_install != 0 or error_tests != 0 or error_purge != 0:
exit(1)

View File

@ -37,6 +37,9 @@ jobs:
-color
shell: bash
- name: Ensure SHA pinned actions
uses: centreon/github-actions-ensure-sha-pinned-actions@47d553c67ceb08ad660deaeb3b994e47a3dd8fc3 # v3.0.23.3
yaml-lint:
runs-on: ubuntu-24.04
steps:

View File

@ -47,7 +47,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-java-jammy
distrib: jammy
- package_extension: deb
image: packaging-plugins-java-noble
distrib: noble
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -102,7 +104,7 @@ jobs:
stability: ${{ needs.get-environment.outputs.stability }}
- name: Save to cache
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ matrix.package_extension }}
key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
@ -130,6 +132,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -0,0 +1,128 @@
name: centreon-plugins-sudoers
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- "dependencies/centreon-plugins-sudoers/**"
push:
branches:
- develop
- master
paths:
- "dependencies/centreon-plugins-sudoers/**"
env:
module_name: centreon-plugins-sudoers
jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml
package:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
strategy:
fail-fast: false
matrix:
include:
- image: packaging-plugins-alma8
distrib: el8
package_extension: rpm
- image: packaging-plugins-alma9
distrib: el9
package_extension: rpm
- image: packaging-plugins-bullseye
distrib: bullseye
package_extension: deb
- image: packaging-plugins-bookworm
distrib: bookworm
package_extension: deb
- image: packaging-plugins-jammy
distrib: jammy
package_extension: deb
- image: packaging-plugins-noble
distrib: noble
package_extension: deb
runs-on: ubuntu-24.04
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}
name: package ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "dependencies/centreon-plugins-sudoers/centreon-plugins-sudoers.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
arch: all
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.run_id }}-${{ matrix.package_extension }}-${{ env.module_name }}-${{ 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 }}
stability: ${{ needs.get-environment.outputs.stability }}
deliver-packages:
needs: [get-environment, package]
if: |
(contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) || ( needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch'))
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- distrib: el8
package_extension: rpm
- distrib: el9
package_extension: rpm
- distrib: bullseye
package_extension: deb
- distrib: bookworm
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Delivery
uses: ./.github/actions/package-delivery
with:
module_name: ${{ env.module_name }}
distrib: ${{ matrix.distrib }}
cache_key: cache-${{ github.run_id }}-${{ matrix.package_extension }}-${{ env.module_name }}-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
release_type: ${{ needs.get-environment.outputs.release_type }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
set-skip-label:
needs: [get-environment, deliver-packages]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
uses: ./.github/workflows/set-pull-request-skip-label.yml

View File

@ -104,7 +104,7 @@ jobs:
get-environment:
if: |
contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) &&
contains(fromJSON('["pull_request"]') , github.event_name) &&
(startsWith(github.base_ref, 'release-') || startsWith(github.base_ref, 'hotfix-'))
uses: ./.github/workflows/get-environment.yml
@ -112,7 +112,7 @@ jobs:
needs: [get-environment, check-status]
runs-on: ubuntu-24.04
if: |
contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) &&
contains(fromJSON('["pull_request"]') , github.event_name) &&
needs.get-environment.outputs.target_stability == 'testing' &&
! contains(needs.get-environment.outputs.labels, 'skip-cherry-pick')

View File

@ -0,0 +1,68 @@
name: Checkmarx scans
on:
workflow_call:
inputs:
module_name:
required: true
type: string
module_directory:
required: false
type: string
secrets:
base_uri:
required: true
cx_tenant:
required: true
cx_client_id:
required: true
cx_client_secret:
required: true
jobs:
pipeline-scan:
name: Run a pipeline scan
runs-on: ubuntu-24.04
steps:
- name: routing
run: |
# Quality gate settings
ENABLE_QG="true"
if [[ "${{ vars.CHECKMARX_QUALITY_GATE }}" != "yes" ]]; then
# disabling all QG in case of incident with the service
ENABLE_QG="false"
echo "Skipping analysis. Caused by QG override"
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.user.id }}" == "49699333" ]]; then
# disabling the QG in case of pull request opened by dependabot bot
# As dependabot will not be able to access GH secrets
ENABLE_QG="false"
echo "Skipping analysis. Caused by dependabot PR"
fi
# Check forced full scan
SCAN_MODE="--sast-incremental"
if [[ "${{ github.event_name }}" == "schedule" || "${{ vars.CHECKMARX_FORCE_FULL_SCAN }}" == "yes" ]]; then
SCAN_MODE="--sast-incremental=false"
fi
echo "scan_mode=$SCAN_MODE" >> $GITHUB_ENV
echo "enable_analysis=$ENABLE_QG" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Checkout
if: env.enable_analysis == 'true'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkmarx One CLI Action
if: env.enable_analysis == 'true'
uses: checkmarx/ast-github-action@88c60148b7b9689d67eb05bf66a65bbb871f2f2c # v2.3.20
with:
project_name: ${{ inputs.module_name }}
base_uri: ${{ secrets.base_uri }}
cx_tenant: ${{ secrets.cx_tenant }}
cx_client_id: ${{ secrets.cx_client_id }}
cx_client_secret: ${{ secrets.cx_client_secret }}
source_dir: "./"
additional_params: --scan-types "sast,sca,api-security" ${{ env.scan_mode }}

View File

@ -48,6 +48,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-jammy
distrib: jammy
- package_extension: deb
image: packaging-plugins-noble
distrib: noble
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -77,7 +80,7 @@ jobs:
stability: ${{ needs.get-environment.outputs.stability }}
- name: Upload apt/dnf packages as artifacts if asked
if: ${{ contains(github.event.pull_request.labels.*.name, 'upload-artifacts') }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: vmware-connector-daemon-${{ matrix.distrib }}
path: centreon-plugin*
@ -106,6 +109,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -63,6 +63,12 @@ jobs:
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-jammy
image: packaging-plugins-java-jammy
- runner: ubuntu-22.04
dockerfile: packaging-plugins-noble
image: packaging-plugins-noble
- runner: ubuntu-22.04
dockerfile: packaging-plugins-java-noble
image: packaging-plugins-java-noble
runs-on: ${{ matrix.runner }}
@ -71,22 +77,22 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- name: Login to proxy registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
file: .github/docker/packaging/Dockerfile.${{ matrix.dockerfile }}
context: .

View File

@ -48,6 +48,10 @@ jobs:
- runner: ubuntu-24.04
dockerfile: jammy
image: jammy
- runner: ubuntu-24.04
dockerfile: noble
image: noble
runs-on: ${{ matrix.runner }}
@ -56,22 +60,22 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- name: Login to proxy registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
file: .github/docker/testing/Dockerfile.testing-plugins-${{ matrix.dockerfile }}
context: .

View File

@ -48,6 +48,9 @@ jobs:
- runner: ubuntu-22.04
dockerfile: jammy
image: jammy
- runner: ubuntu-22.04
dockerfile: noble
image: noble
runs-on: ${{ matrix.runner }}
@ -56,22 +59,22 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- name: Login to proxy registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }}
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
file: .github/docker/unit-tests/Dockerfile.unit-tests-${{ matrix.dockerfile }}
context: .

23
.github/workflows/generic-plugins.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Generic Plugins
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- 'experimental/**'
push:
branches:
- develop
- master
paths:
- 'experimental/**'
jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml
with:
version_file: experimental/Cargo.toml

View File

@ -4,6 +4,9 @@ on:
version_file:
required: false
type: string
nightly_manual_trigger:
required: false
type: boolean
outputs:
version:
description: "version"
@ -17,6 +20,9 @@ on:
target_stability:
description: "Final target branch stability (stable, testing, unstable, canary or not defined if not a pull request)"
value: ${{ jobs.get-environment.outputs.target_stability }}
is_nightly:
description: "if the current workflow run is considered a nightly"
value: ${{ jobs.get-environment.outputs.is_nightly }}
release_type:
description: "type of release (hotfix, release or not defined if not a release)"
value: ${{ jobs.get-environment.outputs.release_type }}
@ -40,6 +46,7 @@ jobs:
target_stability: ${{ steps.get_stability.outputs.target_stability }}
release_type: ${{ steps.get_release_type.outputs.release_type }}
is_targeting_feature_branch: ${{ steps.get_stability.outputs.is_targeting_feature_branch }}
is_nightly: ${{ steps.get_nightly_status.outputs.is_nightly }}
skip_workflow: ${{ steps.skip_workflow.outputs.result }}
labels: ${{ steps.has_skip_label.outputs.labels }}
@ -52,7 +59,7 @@ jobs:
let hasSkipLabel = false;
let labels = [];
if (${{ contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) }} === true) {
if (${{ contains(fromJSON('["pull_request"]') , github.event_name) }} === true) {
try {
const fetchedLabels = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
@ -134,7 +141,7 @@ jobs:
- if: ${{ steps.has_skip_label.outputs.result == 'true' }}
name: Get push changes
id: get_push_changes
uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
since_last_remote_commit: true
json: true
@ -205,7 +212,7 @@ jobs:
script: |
const getStability = (branchName) => {
switch (true) {
case /(^develop$)|(^dev-\d{2}\.\d{2}\.x$)|(^prepare-release-cloud.*)/.test(branchName):
case /(^develop$)|(^dev-\d{2}\.\d{2}\.x$)/.test(branchName):
return 'unstable';
case /(^release.+)|(^hotfix.+)/.test(branchName):
return 'testing';
@ -244,15 +251,70 @@ jobs:
core.setOutput('is_targeting_feature_branch', isTargetingFeatureBranch);
- name: Detect nightly status
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: get_nightly_status
env:
NIGHTLY_MANUAL_TRIGGER: ${{ inputs.nightly_manual_trigger }}
with:
script: |
const getNightlyInput = () => {
const nightly_manual_trigger = process.env.NIGHTLY_MANUAL_TRIGGER;
console.log(nightly_manual_trigger);
if (typeof nightly_manual_trigger === 'undefined' || nightly_manual_trigger === '' || '${{ github.repository }}'.match(/^workflow-.*$/)) {
return 'false';
} else if (context.eventName === 'schedule' || context.eventName === 'workflow_dispatch' && nightly_manual_trigger === 'true' ) {
return 'true';
}
return 'false';
};
core.setOutput('is_nightly', getNightlyInput());
- name: Get version
id: get_version
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { execSync } = require('child_process');
const fs = require('fs');
let version = '';
if ('${{ inputs.version_file }}'.match(/pom\.xml$/)) {
version = execSync(`grep -m 1 "<version>.*</version>" ${{ inputs.version_file }} | sed 's/.*<version>\\(.*\\)<\\/version>.*/\\1/'`).toString().trim();
} else if ('${{ steps.get_stability.outputs.stability }}' === 'stable') {
const { owner, repo } = context.repo;
// Fetch the most recent tag for plugins
const { data: tags } = await github.rest.repos.listTags({
owner,
repo,
per_page: 10
});
let latestTag = null;
let latestDate = 0;
// Filter tags matching format plugins-YYYYMMDD
for (const tag of tags) {
const match = tag.name.match(/^plugins-(\d{8})$/);
const tagDate = parseInt(match[1], 10);
// ensure we get the true latest tag and not the most recent created
if (tagDate > latestDate) {
latestTag = tag.name;
latestDate = tagDate;
}
}
console.log(`Most recent tag found: ${latestTag}`)
// Get current release tag from .version file
version = fs.readFileSync('.version.plugins', 'utf8').trim();
console.log(`Stable version based on .version.plugins file will be: ${version}`)
} else if ('${{ steps.get_stability.outputs.stability }}' === 'testing') {
const branchName = "${{ github.head_ref || github.ref_name }}";
const matches = branchName.match(/^(?:release|hotfix)-(\d{8})$/);
@ -307,6 +369,7 @@ jobs:
['release_type', '${{ steps.get_release_type.outputs.release_type || '<em>not defined because this is not a release</em>' }}'],
['is_targeting_feature_branch', '${{ steps.get_stability.outputs.is_targeting_feature_branch }}'],
['target_stability', '${{ steps.get_stability.outputs.target_stability || '<em>not defined because current run is not triggered by pull request event</em>' }}'],
['is_nightly', '${{ steps.get_nightly_status.outputs.is_nightly }}'],
['skip_workflow', '${{ steps.skip_workflow.outputs.result }}'],
['labels', '${{ steps.has_skip_label.outputs.labels }}'],
];

26
.github/workflows/gitleaks.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: gitleaks
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
workflow_dispatch:
jobs:
scan:
name: gitleaks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: Centreon
GITLEAKS_ENABLE_COMMENTS: false
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
GITLEAKS_ENABLE_SUMMARY: false

View File

@ -47,6 +47,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-jammy
distrib: jammy
- package_extension: deb
image: packaging-plugins-noble
distrib: noble
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -140,6 +143,9 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -100,6 +100,7 @@ jobs:
- spec_file: ""
- no-auto-depends: "false"
- preinstall_cpanlibs: ""
- revision: "1"
- distrib: el8
package_extension: rpm
image: packaging-plugins-alma8
@ -110,6 +111,8 @@ jobs:
rpm_provides: "perl(BSON::Bytes) perl(BSON::Code) perl(BSON::DBRef) perl(BSON::OID) perl(BSON::Raw) perl(BSON::Regex) perl(BSON::Time) perl(BSON::Timestamp) perl(BSON::Types) perl(BSON)"
- name: "Crypt::Argon2"
preinstall_cpanlibs: "Dist::Build"
rpm_provides: "perl-Crypt-Argon2-debuginfo perl(Crypt::Argon2)"
revision: "2"
- name: "DateTime::Format::Duration::ISO8601"
rpm_provides: "perl(DateTime-Format-Duration-ISO8601)"
- name: "Device::Modbus::RTU::Client"
@ -124,12 +127,16 @@ jobs:
no-auto-depends: "true"
- name: "Libssh::Session"
rpm_dependencies: "libssh"
rpm_provides: "perl-Libssh-Session-debuginfo perl(Libssh::Session) perl(Libssh::Sftp)"
revision: "2"
- name: "Mojo::IOLoop::Signal"
rpm_dependencies: "perl-Mojolicious"
rpm_provides: "perl(Mojo::IOLoop::Signal)"
no-auto-depends: "true"
- name: "Net::Curl"
rpm_dependencies: "libcurl"
rpm_provides: "perl-Net-Curl-debuginfo perl(Net::Curl) perl(Net::Curl::Compat) perl(Net::Curl::Easy) perl(Net::Curl::Form) perl(Net::Curl::Multi) perl(Net::Curl::Share)"
revision: "2"
- name: "Net::DHCP"
rpm_provides: "perl(Net::DHCP::Constants) perl(Net::DHCP::Packet)"
- name: "Net::SMTPS"
@ -233,7 +240,7 @@ jobs:
temp_file=$(mktemp)
echo "default.local" | tee /etc/mailname
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")')
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION --iteration ${{ matrix.revision }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")')
# Check package name
if [ -z "$created_package" ]; then
echo "Error: fpm command failed"
@ -263,7 +270,7 @@ jobs:
shell: bash
- if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }}
path: ./*.${{ matrix.package_extension }}
@ -281,7 +288,7 @@ jobs:
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-rpm-${{ matrix.distrib }}
pattern: packages-rpm-${{ matrix.distrib }}-*
@ -318,7 +325,7 @@ jobs:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: packages-rpm-${{ matrix.distrib }}
path: ./
@ -329,7 +336,7 @@ jobs:
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -344,7 +351,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64]
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-noble, packaging-plugins-bullseye-arm64]
name:
[
"ARGV::Struct",
@ -379,13 +386,14 @@ jobs:
include:
- runner_name: ubuntu-24.04
- arch: amd64
- build_names: "bullseye-amd64,bookworm,jammy"
- build_names: "bullseye-amd64,bookworm,jammy,noble"
- deb_dependencies: ""
- rpm_provides: ""
- deb_provides: ""
- version: ""
- use_dh_make_perl: "true"
- no-auto-depends: "false"
- preinstall_cpanlibs: ""
- revision: "1"
- build_name: bullseye-amd64
distrib: bullseye
package_extension: deb
@ -398,6 +406,10 @@ jobs:
distrib: jammy
package_extension: deb
image: packaging-plugins-jammy
- build_name: noble
distrib: noble
package_extension: deb
image: packaging-plugins-noble
- build_name: bullseye-arm64
distrib: bullseye
package_extension: deb
@ -410,31 +422,40 @@ jobs:
use_dh_make_perl: "false"
no-auto-depends: "true"
deb_dependencies: "libexporter-tiny-perl libtime-hires-perl libxsloader-perl"
deb_provides: "libcrypt-argon2-perl-dbgsym"
revision: "2"
- name: "Crypt::OpenSSL::AES"
use_dh_make_perl: "false"
deb_dependencies: "libexporter-tiny-perl libxs-install-perl"
no-auto-depends: "true"
build_names: "bullseye-amd64,bookworm,jammy,bullseye-arm64"
build_names: "bullseye-amd64,bookworm,jammy,noble,bullseye-arm64"
- name: "Device::Modbus::RTU::Client"
build_names: "bookworm"
build_names: "bookworm,noble"
- name: "Device::Modbus::TCP::Client"
build_names: "bookworm"
build_names: "bookworm,noble"
- name: "Digest::SHA1"
build_names: "jammy"
build_names: "jammy,noble"
- name: "Hash::Ordered"
build_names: "bullseye-amd64,bookworm,jammy"
- name: "Libssh::Session"
use_dh_make_perl: "false"
build_names: "bullseye-amd64,bookworm,jammy,bullseye-arm64"
build_names: "bullseye-amd64,bookworm,jammy,noble,bullseye-arm64"
no-auto-depends: "true"
deb_dependencies: "libcarp-assert-perl libdynaloader-functions-perl libexporter-tiny-perl libdevel-overloadinfo-perl libssh-4 libc6"
deb_provides: "libssh-session-perl-dbgsym libssh-session-sftp"
revision: "2"
- name: "Net::Amazon::Signature::V4"
build_names: ["bullseye-amd64", "jammy"]
build_names: "bullseye-amd64,jammy"
- name: "Net::Curl"
use_dh_make_perl: "false"
build_names: "bullseye-amd64,bookworm,jammy,bullseye-arm64"
build_names: "bullseye-amd64,bookworm,jammy,noble,bullseye-arm64"
no-auto-depends: "true"
deb_dependencies: "libcarp-assert-perl libdynaloader-functions-perl libexporter-tiny-perl libdevel-overloadinfo-perl libcurl4"
deb_provides: "libnet-curl-perl-dbgsym libnet-curl-compat-perl libnet-curl-easy-perl libnet-curl-form-perl libnet-curl-share-perl libnet-curl-multi-perl"
revision: "2"
- name: "Net::MQTT::Simple"
version: "1.29"
build_names: "bullseye-amd64,bookworm,jammy"
- name: "Paws"
use_dh_make_perl: "false"
deb_dependencies: "libmoose-perl libmoosex-classattribute-perl libjson-maybexs-perl liburl-encode-perl libargv-struct-perl libmoo-perl libtype-tiny-perl libdatastruct-flat-perl libmodule-find-perl libthrowable-perl liburi-template-perl libnet-amazon-signature-v4-perl"
@ -446,7 +467,7 @@ jobs:
use_dh_make_perl: "false"
version: "0.01"
deb_dependencies: "libzmq5"
build_names: "bullseye-amd64,bookworm,jammy,bullseye-arm64"
build_names: "bullseye-amd64,bookworm,jammy,noble,bullseye-arm64"
name: package ${{ matrix.distrib }} ${{ matrix.arch }} ${{ matrix.name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
@ -483,7 +504,14 @@ jobs:
fi
echo "package_version=$(echo $PACKAGE_VERSION)" >> $GITHUB_OUTPUT
CPAN_PACKAGE_NAME=$(echo $cpan_info | sed 's/.*\///g' | sed 's/-[0-9\.]*\.tar\.gz//g' | tr '[:upper:]' '[:lower:]')
PACKAGE_NAME="lib$CPAN_PACKAGE_NAME-perl"
# Handle specific cases of libssh-session
if [[ "$CPAN_PACKAGE_NAME" == "lib"* ]];then
PACKAGE_NAME="$CPAN_PACKAGE_NAME-perl"
else
PACKAGE_NAME="lib$CPAN_PACKAGE_NAME-perl"
fi
echo "package_name=$(echo $PACKAGE_NAME)" >> $GITHUB_OUTPUT
shell: bash
@ -526,16 +554,33 @@ jobs:
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
if [ -z "${{ matrix.deb_provides }}" ]; then
PACKAGE_PROVIDES=""
else
for PACKAGE_PROVIDE in `echo "${{ matrix.deb_provides }}"`; do
PACKAGE_PROVIDES="$PACKAGE_PROVIDES --provides $PACKAGE_PROVIDE"
done
fi
temp_file=$(mktemp)
echo "default.local" | tee /etc/mailname
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
# Handle specific case for libssh-session
if [[ "${{ matrix.name }}" == "Libssh::Session" ]]; then
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES -v ${{ steps.package-infos.outputs.package_version }} --name ssh-session ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
else
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
fi
# Check package name
if [ -z "$created_package" ]; then
echo "Error: fpm command failed"
exit 1
fi
# Check deb
dpkg-deb --contents $created_package || { echo "Error: dpkg-deb failed for package $created_package"; exit 1; }
dpkg-deb --verbose --contents $created_package || { echo "Error: dpkg-deb failed for package $created_package"; exit 1; }
shell: bash
- if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_names, matrix.build_name) && matrix.use_dh_make_perl == 'true' }}
@ -545,7 +590,7 @@ jobs:
cpanm $CPANLIB_PREINSTALL
done
temp_file=$(mktemp)
created_package=$(DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-infos.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }} | tee "$temp_file" | grep "building package" | grep -oP "(?<=in '..\/).*.deb(?=')") || { echo "Error: dh-make-perl command failed"; exit 1; }
created_package=$(DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-infos.outputs.package_version }} --revision ${{ matrix.revision }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }} | tee "$temp_file" | grep "building package" | grep -oP "(?<=in '..\/).*.deb(?=')") || { echo "Error: dh-make-perl command failed"; exit 1; }
# Check package name
if [ -z "$created_package" ]; then
echo "Error: dh-make-perl command failed"
@ -566,7 +611,7 @@ jobs:
shell: bash
- if: ${{ steps.check-package-existence.outputs.do_not_build == 'false' && contains(matrix.build_names, matrix.build_name) }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}-${{ steps.package-name.outputs.name_with_dash}}
path: ./*.${{ matrix.package_extension }}
@ -580,11 +625,11 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]
distrib: [bullseye, bookworm, jammy, noble]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-deb-${{ matrix.distrib }}
pattern: packages-deb-${{ matrix.distrib }}-*
@ -605,14 +650,14 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]
distrib: [bullseye, bookworm, jammy, noble]
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: packages-deb-${{ matrix.distrib }}
path: ./
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
@ -648,6 +693,11 @@ jobs:
distrib: jammy
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: ubuntu:noble
distrib: noble
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: debian:bullseye
distrib: bullseye
@ -672,7 +722,7 @@ jobs:
- name: Upload error log
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: install_error_log_${{ matrix.distrib }}-${{ matrix.arch }}
path: install_error_${{ matrix.distrib }}_${{ matrix.arch }}.log
@ -700,6 +750,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -63,7 +63,7 @@ jobs:
cp -r ~/rpmbuild/RPMS/x86_64/*.rpm .
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -97,7 +97,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -108,7 +108,7 @@ jobs:
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -129,6 +129,9 @@ jobs:
distrib: bookworm
- image: packaging-plugins-jammy
distrib: jammy
- image: packaging-plugins-noble
distrib: noble
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
@ -155,7 +158,7 @@ jobs:
DEB_BUILD_OPTIONS="nocheck nodocs notest noautodbgsym" dh-make-perl make --dist ${{ matrix.distrib }} --verbose --build --version 4.0${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} perl-filesys-smbclient/
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
@ -183,6 +186,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -50,6 +50,9 @@ jobs:
- image: packaging-plugins-jammy
distrib: jammy
package_extension: deb
- image: packaging-plugins-noble
distrib: noble
package_extension: deb
runs-on: ubuntu-22.04
@ -142,6 +145,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:

View File

@ -55,6 +55,11 @@ jobs:
package_extension: deb
runner: ubuntu-22.04
arch: amd64
- image: packaging-plugins-noble
distrib: noble
package_extension: deb
runner: ubuntu-22.04
arch: amd64
- image: packaging-plugins-bullseye-arm64
distrib: bullseye
package_extension: deb
@ -208,7 +213,7 @@ jobs:
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.${{ matrix.package_extension }}
key: cache-${{ github.sha }}-${{ matrix.package_extension }}-wsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
@ -244,6 +249,10 @@ jobs:
- distrib: jammy
package_extension: deb
arch: amd64
- distrib: noble
package_extension: deb
arch: amd64
name: deliver ${{ matrix.distrib }} ${{ matrix.arch }}
steps:

View File

@ -1,208 +0,0 @@
name: perl-vmware-vsphere
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- 'dependencies/perl-vmware-vsphere/**'
push:
branches:
- develop
- master
paths:
- 'dependencies/perl-vmware-vsphere/**'
jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml
with:
version_file: connectors/vmware/src/centreon/script/centreon_vmware.pm
get-sources:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-22.04
steps:
- name: Download vsphere cli sources
run: |
wget https://gitlab.labexposed.com/centreon-lab/perl-VMware-vSphere/-/raw/master/storage/VMware-vSphere-Perl-SDK-7.0.0-17698549.x86_64.tar.gz
tar zxf VMware-vSphere-Perl-SDK-7.0.0-17698549.x86_64.tar.gz
shell: bash
- name: Build vsphere cli sources
run: |
cd vmware-vsphere-cli-distrib
perl Makefile.PL
sudo make pure_install
shell: bash
- name: Cache vsphere cli sources
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: vmware-vsphere-cli-distrib
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
package:
needs: [get-environment, get-sources]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
strategy:
matrix:
include:
- package_extension: rpm
image: packaging-plugins-alma8
distrib: el8
runner: ubuntu-22.04
arch: amd64
- package_extension: rpm
image: packaging-plugins-alma9
distrib: el9
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-jammy
distrib: jammy
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bullseye-arm64
distrib: bullseye
runner: centreon-collect-arm64
arch: arm64
runs-on: ${{ matrix.runner }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
credentials:
username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}
name: package ${{ matrix.distrib }} ${{ matrix.arch }}
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Import source files
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: vmware-vsphere-cli-distrib
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
fail-on-cache-miss: true
- name: Set paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
if [ "${{ matrix.arch }}" = "amd64" ]; then
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
sed -i "s#@PERL_VENDORARCH@#$PERL_VENDORARCH#g" dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml
cat dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml
shell: bash
- name: 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 }}
arch: ${{ matrix.arch }}
commit_hash: ${{ github.sha }}
version: "7.0.1"
release: "17698549"
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}
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 }}
deliver-packages:
needs: [get-environment, package]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
(contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) || ( needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch')) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- distrib: el8
package_extension: rpm
arch: amd64
- distrib: el9
package_extension: rpm
arch: amd64
- distrib: bullseye
package_extension: deb
arch: amd64
- distrib: bullseye
package_extension: deb
arch: arm64
- distrib: bookworm
package_extension: deb
arch: amd64
- distrib: jammy
package_extension: deb
arch: amd64
name: deliver ${{ matrix.distrib }} ${{ matrix.arch }}
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Delivery
uses: ./.github/actions/package-delivery
with:
module_name: perl-vmware-vsphere-${{ matrix.arch }}
distrib: ${{ matrix.distrib }}
arch: ${{ matrix.arch }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}
stability: ${{ needs.get-environment.outputs.stability }}
release_type: ${{ needs.get-environment.outputs.release_type }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
set-skip-label:
needs: [get-environment, deliver-packages]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
uses: ./.github/workflows/set-pull-request-skip-label.yml

View File

@ -57,7 +57,7 @@ jobs:
cp -r ~/rpmbuild/RPMS/x86_64/*.rpm .
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
@ -102,12 +102,12 @@ jobs:
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-${{ matrix.distrib }}
path: ./*.rpm

41
.github/workflows/plugins-analysis.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: plugins-analysis
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: '30 0 * * 1-5'
pull_request:
branches:
- develop
- master
push:
branches:
- develop
- master
jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml
checkmarx-analysis:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
github.event.pull_request.draft != 'true'
uses: ./.github/workflows/checkmarx-analysis.yml
with:
module_name: centreon-plugins
secrets:
base_uri: ${{ secrets.AST_RND_SCANS_BASE_URI }}
cx_tenant: ${{ secrets.AST_RND_SCANS_TENANT }}
cx_client_id: ${{ secrets.AST_RND_SCANS_CLIENT_ID }}
cx_client_secret: ${{ secrets.AST_RND_SCANS_CLIENT_SECRET }}
set-skip-label:
needs: [get-environment, checkmarx-analysis]
if: needs.get-environment.outputs.skip_workflow == 'false'
uses: ./.github/workflows/set-pull-request-skip-label.yml

View File

@ -1,4 +1,5 @@
name: plugins
run-name: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.nightly_manual_trigger == 'true')) && format('plugins nightly {0}', github.ref_name) || '' }}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -6,6 +7,14 @@ concurrency:
on:
workflow_dispatch:
inputs:
nightly_manual_trigger:
description: 'Set to true to trigger a nightly run'
required: true
default: false
type: boolean
schedule:
- cron: "30 1 * * 1"
pull_request:
paths:
- '.github/workflows/plugins.yml'
@ -27,24 +36,29 @@ on:
jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml
with:
nightly_manual_trigger: ${{ inputs.nightly_manual_trigger || false }}
get-plugins:
changes:
needs: [get-environment]
runs-on: ubuntu-24.04
outputs:
plugins: ${{ steps.get_plugins.outputs.plugins }}
changes_common: ${{ steps.filter.outputs.common || 'true' }}
changes_packages: ${{ steps.filter.outputs.packages || 'false' }}
changes_plugins: ${{ steps.filter.outputs.plugins || 'false' }}
packages_files: ${{ steps.filter.outputs.packages_files }}
plugins_files: ${{ steps.filter.outputs.plugins_files }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.9'
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
if: |
github.event_name == 'pull_request' &&
contains(fromJson('["testing", "unstable", "canary"]'), needs.get-environment.outputs.stability)
with:
base: ${{ github.ref }}
base: ${{ github.head_ref || github.ref_name }}
list-files: shell
filters: |
common:
@ -55,10 +69,24 @@ jobs:
plugins:
- added|modified: src/**
get-plugins:
runs-on: ubuntu-24.04
needs: [get-environment, changes]
outputs:
plugins: ${{ steps.get_plugins.outputs.plugins }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.9'
- name: transform to directories
run: |
folders=()
for f in ${{ steps.filter.outputs.packages_files }}; do
for f in ${{ needs.changes.outputs.packages_files }}; do
echo "Adding $(dirname $f) to folders"
folders+=($(dirname $f))
done
@ -66,7 +94,7 @@ jobs:
jq --compact-output --null-input '$ARGS.positional' --args -- ${unique_folders[@]} > package_directories.txt
files=()
for f in ${{ steps.filter.outputs.plugins_files }}; do
for f in ${{ needs.changes.outputs.plugins_files }}; do
echo "Adding $f to files"
files+=($f)
done
@ -76,9 +104,9 @@ jobs:
- name: Get plugins for build
id: get_plugins
if: ${{ steps.filter.outputs.common == 'true' || steps.filter.outputs.packages == 'true' || steps.filter.outputs.plugins == 'true' }}
if: ${{ needs.changes.outputs.changes_common == 'true' || needs.changes.outputs.changes_packages == 'true' || needs.changes.outputs.changes_plugins == 'true' }}
run: |
PLUGINS="$(python3 .github/scripts/process-plugins.py '${{ steps.filter.outputs.common == 'true' }}')"
PLUGINS="$(python3 .github/scripts/process-plugins.py '${{ needs.changes.outputs.changes_common == 'true' }}')"
echo "plugins=$(echo $PLUGINS)" >> $GITHUB_OUTPUT
if [ "$PLUGINS" == '' ]; then
@ -87,6 +115,20 @@ jobs:
shell: bash
- name: Create Jira ticket on nightly build failure
if: |
needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 &&
failure() &&
startsWith(github.ref_name, 'dev')
uses: ./.github/actions/create-jira-ticket
with:
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
module_name: "monitoring-plugins"
ticket_labels: '["Nightly", "Pipeline", "nightly-${{ github.ref_name }}", "${{ github.job }}"]'
ticket_squad: "DevSecOps"
unit-tests:
needs: [get-environment, get-plugins]
if: |
@ -98,7 +140,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [unit-tests-alma8, unit-tests-alma9, unit-tests-bullseye, unit-tests-bullseye-arm64, unit-tests-bookworm, unit-tests-jammy]
image: [unit-tests-alma8, unit-tests-alma9, unit-tests-bullseye, unit-tests-bullseye-arm64, unit-tests-bookworm, unit-tests-jammy, unit-tests-noble]
include:
- runner_name: ubuntu-24.04
- package_extension: rpm
@ -120,6 +162,9 @@ jobs:
- package_extension: deb
image: unit-tests-jammy
distrib: jammy
- package_extension: deb
image: unit-tests-noble
distrib: noble
runs-on: ${{ matrix.runner_name }}
container:
@ -137,12 +182,26 @@ jobs:
- name: Upload logs as artifacts if tests failed
if: failure()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: plugin-installation-${{ matrix.distrib }}
path: ./lastlog.jsonl
retention-days: 1
- name: Create Jira ticket on nightly build failure
if: |
needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 &&
failure() &&
startsWith(github.ref_name, 'dev')
uses: ./.github/actions/create-jira-ticket
with:
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
module_name: "monitoring-plugins"
ticket_labels: '["Nightly", "Pipeline", "nightly-${{ github.ref_name }}", "${{ github.job }}"]'
ticket_squad: "Connectors"
fatpacker:
needs: [get-environment, get-plugins, unit-tests]
if: |
@ -157,7 +216,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Prepare FatPacker
uses: shogo82148/actions-setup-perl@49c14f24551d2de3bf56fb107a869c3760b1875e # v1.33.0
uses: shogo82148/actions-setup-perl@22423f01bde48fb88785c007e3166fbbbd8e892a # v1.34.0
with:
perl-version: '5.34'
install-modules-with: cpm
@ -168,7 +227,7 @@ jobs:
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@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
@ -206,6 +265,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-jammy
distrib: jammy
- package_extension: deb
image: packaging-plugins-noble
distrib: noble
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -219,7 +281,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
@ -299,6 +361,20 @@ jobs:
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
- name: Create Jira ticket on nightly build failure
if: |
needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 &&
failure() &&
startsWith(github.ref_name, 'dev')
uses: ./.github/actions/create-jira-ticket
with:
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
module_name: "monitoring-plugins"
ticket_labels: '["Nightly", "Pipeline", "nightly-${{ github.ref_name }}", "${{ github.job }}"]'
ticket_squad: "DevSecOps"
test-plugins:
needs: [get-environment, get-plugins, package]
if: |
@ -311,7 +387,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: [testing-plugins-alma8, testing-plugins-alma9, testing-plugins-jammy, testing-plugins-bullseye, testing-plugins-bookworm]
image: [testing-plugins-alma8, testing-plugins-alma9, testing-plugins-jammy, testing-plugins-bullseye, testing-plugins-bookworm, testing-plugins-noble, testing-plugins-bullseye-arm64]
include:
- runner_name: ubuntu-24.04
- package_extension: rpm
@ -329,6 +405,9 @@ jobs:
- package_extension: deb
image: testing-plugins-jammy
distrib: jammy
- package_extension: deb
image: testing-plugins-noble
distrib: noble
- package_extension: deb
image: testing-plugins-bullseye-arm64
distrib: bullseye
@ -353,12 +432,26 @@ jobs:
- name: Upload apt/dnf logs as artifacts if tests failed
if: failure()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: plugin-installation-${{ matrix.distrib }}
path: /var/log/robot-plugins-installation-tests.log
retention-days: 1
- name: Create Jira ticket on nightly build failure
if: |
needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 &&
failure() &&
startsWith(github.ref_name, 'dev')
uses: ./.github/actions/create-jira-ticket
with:
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
module_name: "monitoring-plugins"
ticket_labels: '["Nightly", "Pipeline", "nightly-${{ github.ref_name }}", "${{ github.job }}"]'
ticket_squad: "Connectors"
deliver-packages:
needs: [get-environment, get-plugins, test-plugins]
if: |
@ -385,6 +478,8 @@ jobs:
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:
@ -401,6 +496,20 @@ jobs:
release_type: ${{ needs.get-environment.outputs.release_type }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
- name: Create Jira ticket on nightly build failure
if: |
needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 &&
failure() &&
startsWith(github.ref_name, 'dev')
uses: ./.github/actions/create-jira-ticket
with:
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
module_name: "monitoring-plugins"
ticket_labels: '["Nightly", "Pipeline", "nightly-${{ github.ref_name }}", "${{ github.job }}"]'
ticket_squad: "DevSecOps"
deliver-sources:
needs: [get-environment, fatpacker]
if: |
@ -412,7 +521,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}

View File

@ -5,7 +5,7 @@ concurrency:
cancel-in-progress: true
on:
pull_request_target:
pull_request:
jobs:
set-pull-request-external-label:

View File

@ -5,7 +5,7 @@ on:
jobs:
set-pull-request-skip-label:
if: ${{ success() && contains(fromJSON('["pull_request", "pull_request_target"]') , github.event_name) }}
if: ${{ success() && contains(fromJSON('["pull_request"]') , github.event_name) }}
runs-on: ubuntu-24.04
steps:

View File

@ -30,7 +30,7 @@ jobs:
- added|modified: 'src/**/*.pm'
- name: Install CPAN Libraries
uses: shogo82148/actions-setup-perl@49c14f24551d2de3bf56fb107a869c3760b1875e # v1.33.0
uses: shogo82148/actions-setup-perl@22423f01bde48fb88785c007e3166fbbbd8e892a # v1.34.0
with:
perl-version: '5.34'
install-modules-with: cpm

25
.gitleaks.toml Normal file
View File

@ -0,0 +1,25 @@
title = "Gitleaks custom rules"
[extend]
useDefault = true
[allowlist]
paths = [
'''node_modules\/''',
'''vendor\/''',
'''(.*?)\.rptlibrary''',
'''package\.json''',
'''package-lock\.json''',
'''pnpm-lock\.yaml''',
'''composer\.json''',
'''composer\.lock''',
'''yarn\.lock''',
'''\.gitleaks\.toml$''',
'''(.*?)(jpg|gif|doc|pdf|bin)$'''
]
regexTarget = "match"
regexes = [
'''ABCDEFG1234567890''',
'''s.aBCD123DEF456GHI789JKL012'''
]

1
.version.plugins Normal file
View File

@ -0,0 +1 @@
20250800

View File

@ -1,3 +1,6 @@
2025-05-16 Olivier Mercier <omercier@centreon.com> - 20250501
* Fix: changed permissions for centreon_vmware.json config file.
2024-12-05 Olivier Mercier <omercier@centreon.com> - 3.4.0
* Enhancement: systemd service now takes its options from
/etc/(default|sysconfig)/centreon_vmware.

View File

@ -76,6 +76,10 @@ contents:
type: config|noreplace
packager: deb
- src: "config/logrotate/centreon_vmware"
dst: "/etc/logrotate.d/centreon_vmware"
type: config|noreplace
- src: "config/centreon_vmware-conf.json"
dst: "/etc/centreon/centreon_vmware.json"
type: config|noreplace
@ -86,26 +90,32 @@ scripts:
overrides:
rpm:
depends:
- perl(Class::MethodMaker)
- perl(Crypt::OpenSSL::AES)
- perl(Crypt::SSLeay)
- perl(IO::Socket::INET6)
- perl(JSON::XS)
- perl(LWP::Protocol::https)
- perl(SOAP::Lite)
- perl(Text::Template)
- perl(UUID)
- perl(ZMQ::Constants)
- perl(ZMQ::LibZMQ4)
- perl-Net-Curl
- perl-VMware-vSphere >= 5.1
deb:
depends:
- libclass-methodmaker-perl
- libcrypt-openssl-aes-perl
- libcrypt-ssleay-perl
- libio-socket-inet6-perl
- libjson-xs-perl
- liblwp-protocol-https-perl
- libnet-curl-perl
- libsoap-lite-perl
- libtext-template-perl
- libuuid-perl
- libzmq-constants-perl
- libzmq-libzmq4-perl
- perl-vmware-vsphere
rpm:
signature:

View File

@ -0,0 +1,12 @@
/var/log/centreon/centreon_vmware.log {
copytruncate
weekly
maxsize 50M
rotate 12
compress
delaycompress
notifempty
missingok
su root root
}

View File

@ -9,8 +9,8 @@ function migrateConfigFromPmToJson() {
/usr/bin/centreon_vmware_convert_config_file "$perl_config_file_path" > "$json_config_file_path"
mv "$perl_config_file_path" "${perl_config_file_path}.deprecated"
fi
chown centreon: "$json_config_file_path"
chmod 640 "$json_config_file_path"
chown centreon-gorgone:centreon "$json_config_file_path"
chmod 660 "$json_config_file_path"
}
function applyToSystemD() {

View File

@ -54,7 +54,7 @@ BEGIN {
use base qw(centreon::vmware::script);
my $VERSION = '3.4.0';
my $VERSION = '20250501';
my %handlers = (TERM => {}, HUP => {}, CHLD => {});
my @load_modules = (

View File

@ -45,7 +45,7 @@ sub init_response {
my (%options) = @_;
$manager_response->{code} = 0;
$manager_response->{vmware_connector_version} = '3.4.0';
$manager_response->{vmware_connector_version} = '20250501';
$manager_response->{short_message} = 'OK';
$manager_response->{extra_message} = '';
$manager_response->{identity} = $options{identity} if (defined($options{identity}));

View File

@ -0,0 +1,40 @@
name: "centreon-plugins-sudoers"
arch: "all"
platform: "linux"
version_schema: "none"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"
description: |
Sudoers configuration for centreon plugins
Commit: @COMMIT_HASH@
vendor: "Centreon"
homepage: "https://www.centreon.com"
license: "Apache-2.0"
contents:
- src: ./sudoersCentreonPlugins
dst: /etc/sudoers.d/centreon-plugins
file_info:
mode: 0600
overrides:
rpm:
provides:
- centreon-cwrapper-perl
replaces:
- centreon-cwrapper-perl
depends:
- sudo
deb:
depends:
- sudo
rpm:
summary: Sudoers configuration for centreon plugins
compression: zstd
signature:
key_file: ${RPM_SIGNING_KEY_FILE}
key_id: ${RPM_SIGNING_KEY_ID}

View File

@ -0,0 +1,6 @@
User_Alias CENTREON_COLLECT_USERS=centreon-engine,centreon-gorgone
Defaults:CENTREON_COLLECT_USERS !requiretty
CENTREON_COLLECT_USERS ALL = NOPASSWD: /usr/lib/centreon/plugins/centreon_protocol_dhcp.pl *
CENTREON_COLLECT_USERS ALL = NOPASSWD: /usr/lib/centreon/plugins/centreon_protocol_udp.pl *
CENTREON_COLLECT_USERS ALL = NOPASSWD: /usr/lib/centreon/plugins/centreon_nmap_cli.pl *

View File

@ -1,59 +0,0 @@
name: "perl-VMware-vSphere"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"
description: |
The vSphere SDK for Perl is a client-side Perl framework that provides an easy-to-use scripting interface to the vSphere API.
Administrators and developers who are familiar with Perl can use the vSphere SDK for Perl to automate a wide variety of administrative, provisioning, and monitoring tasks in the vSphere environment.
The vSphere SDK for Perl includes ready-to-use utility applications, which you can immediately put to use in your virtual datacenter.
The vSphere SDK for Perl installation includes the WS-Management Perl Library, which allows you to write scripts that retrieve CIM data from the ESX host using CIMOM, a service that provides standard CIM management functions over a WBEM (Web-Based Enterprise Management).
You can use the SDK to manage ESX 3.0.x, ESX/ESXi 3.5, ESX/ESXi 4.0, ESX/ESXi 4.1, ESXi 5.0, vCenter Server 2.5, vCenter Server 4.0, vCenter Server 4.1, and vCenter Server 5.0.
Commit: @COMMIT_HASH@
vendor: "vmware"
homepage: "https://vmware.com"
license: "GPLv2+"
contents:
- src: "../../../vmware-vsphere-cli-distrib/VMware"
dst: "@PERL_VENDORARCH@/VMware"
- src: "../../../vmware-vsphere-cli-distrib/WSMan"
dst: "@PERL_VENDORARCH@/WSMan"
overrides:
rpm:
provides:
- perl(VMware::VIRuntime)
depends:
- perl-XML-LibXML >= 1.58
- perl-libwww-perl >= 5.8.05
- perl-SOAP-Lite >= 0.67
- perl-UUID >= 0.03
- perl-Class-MethodMaker >= 2.08
deb:
depends:
- libstat-lsmode-perl
- libclass-methodmaker-perl
- libuuid-perl
- libconvert-binhex-perl
- libemail-date-format-perl
- libio-sessiondata-perl
- libmime-lite-perl
- libmime-types-perl
- libmime-tools-perl
- libmailtools-perl
- libnet-smtp-ssl-perl
- libsoap-lite-perl
- libtext-template-perl
- libxml-libxml-perl
rpm:
compression: zstd
signature:
key_file: ${RPM_SIGNING_KEY_FILE}
key_id: ${RPM_SIGNING_KEY_ID}

View File

@ -16,6 +16,7 @@ Table of contents
6. [HTTP](#lib_http)
7. [DBI](#lib_dbi)
8. [Model Classes Usage](#model_class_usage)
9. [Sequence diagram](#sequence_diagram)
*******
<div id='lib_output'/>
@ -1274,4 +1275,13 @@ The following example show 4 new attributes:
* *closure_custom_perfdata*: should be used to manage yourself the perfdata.
* *closure_custom_threshold_check*: should be used to manage yourself the threshold check.
[Table of content (1)](#table_of_contents)
[Table of content (1)](#table_of_contents)
<div id='sequence_diagram'/>
### 9. Sequence diagram
A sequence diagram has been designed to help understand the timeline of a plugin execution.
All the explanations are [here](sequence_diagram.md) and the full diagram is [here](sequence_diagram.mmd).
[Table of content (1)](#table_of_contents)

View File

@ -0,0 +1,178 @@
# Centreon Plugins sequence diagram
## Cookbook
The description of the diagram uses the [Mermaid](https://mermaid.js.org/) syntax, which is natively supported by
Github. You may also check out the file locally and generate the diagram with the following
[mermaid-cli](https://github.com/mermaid-js/mermaid-cli) (`mmdc`) command:
```bash
mmdc -f -i sequence_diagram.mmd -o sequence_diagram.pdf
```
Other output formats such as *png* and *svg* are also available.
## Explanation
### Use case
The provided sequence diagram has been written while debugging this command line:
```bash
perl centreon_plugins.pl --plugin='cloud::azure::database::elasticpool::plugin' --mode='storage'
```
As explained in [plugins_advanced.md](plugins_advanced.md), each mode can use various types of counters, with various
data types and structures. Here, the `maps_counters_type` is of type **3**, which means the most complex case, when
metrics and statuses are associated to instances organized in groups.
The other types are not explained here, but you may find the keys to understanding them.
### Side notes
In the diagram, almost all the `.pm` files' names are constants in every use case, except for two:
- _plugin.pm_: the name is always the same by convention, but its location depends on what is given as the `--plugin` option
- _themode.pm_: stands for the mode of the plugin that is being used (given as the `--mode` option). For example, cpu.pm, memory.pm...
### Complete diagram
The complete diagram can be natively displayed by Github [here](sequence_diagram.mmd).
## Interesting parts of the diagram for developers
When you develop a new mode for a plugin, your responsibility will be to provide the necessary functions in _themode.pm_.
### new()
This constructor must call the inherited one (`$class->SUPER::new()`) and then add the options that are specific to this mode.
```mermaid
sequenceDiagram
script_custom.pm ->> +themode.pm: $self->{modes}{<br/>$self->{mode_name}<br/>}->new()
Note right of themode.pm: Here "themode.pm" stands<br/>for cpu.pm, uptime.pm<br/>or whatever mode file
create participant counter.pm
themode.pm ->> +counter.pm: new()
Note right of counter.pm: counter::new() constructor<br/>inherited by themode.pm
create participant mode.pm
counter.pm ->> +mode.pm: $class->SUPER::new()
create participant perfdata.pm
mode.pm ->> +perfdata.pm: centreon::plugins::<br/>perfdata->new(<br/>output => $options{output})
Note right of perfdata.pm: Stores a reference<br/>to the output object<br/>Initialises thlabel
perfdata.pm -->> -mode.pm: Back from new()
mode.pm -->> -counter.pm: Back from new()
counter.pm -> counter.pm: centreon::plugins::misc::<br/>mymodule_load(...)
Note right of counter.pm: Loads statefile.pm if necessary
counter.pm ->> +themode.pm: $self->set_counters(%options);
Note left of themode.pm: set_counters() must<br/>define the counter's<br/>structure
themode.pm -->> -counter.pm: Back from set_counters()
rect rgb(230, 255, 255)
loop For each counter/subcounter
counter.pm -> counter.pm: get_threshold_prefix(<br/>name => $counter<br/>)
Note right of counter.pm: Builds the thresholds<br/>label (thlabel)
counter.pm ->> options.pm: add_options()
Note right of counter.pm: Adds "very long thresholds<br/>options" with thlabel
counter.pm ->> options.pm: add_options()
Note right of counter.pm: Adds thresholds options<br/>with label redirecting to<br/>the long thresholds
create participant values.pm
counter.pm ->> values.pm: $_->{obj} =<br/>centreon::plugins::values->new(...)
Note right of values.pm: Stores references to<br/>various objects (statefile,<br/>output, perfdata) and initiates others
counter.pm ->> values.pm: $_->{obj}->set()
Note right of values.pm: Stores the counter's<br/>"set" object's attributes<br/>into values' $self<br/>(ie $self->{obj} for counter.pm)
Note right of counter.pm: End of for each counter/subcounter
end
end
Note right of counter.pm: Still in new()
counter.pm -->> -themode.pm: Back to new() after<br/>the inherited constructor
themode.pm ->> options.pm: add_options()
Note left of options.pm: Adds options that<br/>are specific to the mode<br/>such as filters
themode.pm -->> -script_custom.pm: Back from $self-><br/>{modes}{$self->{mode_name}}<br/>->new() to init()
```
### check_options()
This method must check that all mandatory options have been given and control they're valid.
```mermaid
sequenceDiagram
script_custom.pm ->> +themode.pm: $self->{mode}->check_options()
themode.pm ->> +counter.pm: $self->SUPER::check_options()
counter.pm ->> +mode.pm: $self->SUPER::init(%options);
mode.pm -> mode.pm: %{$self->{option_results}} =<br/>>%{$options{option_results}};
mode.pm -> mode.pm: Apply the default options<br/>values when none given
mode.pm -->> -counter.pm: Back to check_options()
counter.pm -> counter.pm: Handle --list-counters option
counter.pm -> counter.pm: If type 2 counter, prepares<br/>the macros substitutions.
rect rgb(230, 255, 255)
loop For each counter/subcounter
counter.pm ->> +values.pm: $sub_counter->{obj}->init(<br/>option_results => $self->{option_results})
values.pm ->> +perfdata.pm: $self->{perfdata}->threshold_validate()
perfdata.pm -> perfdata.pm: centreon::plugins::misc::parse_threshold(<br/>threshold => $options{value});
Note left of perfdata.pm: This function checks the<br/>conformity of threshold<br/>Splits into a global status and<br/>"result_perf" (arobase, end, infinite_neg,<br/>infinite_pos, start)
Note left of perfdata.pm: Stores the result in $self->{threshold_label}->{$options{label}}
perfdata.pm -->> -values.pm: Back to init()
values.pm -->> -counter.pm: Back to check_options()
end
end
counter.pm -> counter.pm: $self->change_macros(...)
Note right of counter.pm: Replaces all the %{macros}<br/>with the adequate<br/>Perl expressions for<br/>future eval
counter.pm -> counter.pm: $self->{statefile_value}->check_options(...);
Note right of counter.pm: If statefile is used
counter.pm -->> -themode.pm: Back to check_options()
Note right of themode.pm: Checks that the mode-specific<br/>options are valid
themode.pm -->> -script_custom.pm: Back to init() from check_options()
```
### set_counters()
This method will describe how you decide to structure the collected data in order to let the plugins classes (`counter`,
`mode`, `perfdata`, `values` and `output`) handle them.
```mermaid
sequenceDiagram
counter.pm ->> +themode.pm: $self->set_counters(%options);
Note left of themode.pm: set_counters() must<br/>define the counter's<br/>structure
themode.pm -->> -counter.pm: Back from set_counters()
```
### manage_selection()
This method is the one that will be the most specific to the plugin and the mode you're working on since it will have to
cope with both the protocol and the data structures in input and in output.
```mermaid
sequenceDiagram
counter.pm ->> +themode.pm: $self->manage_selection(%options)
Note left of themode.pm: Gathers the data and stores<br/>them in the counters<br/>structure
themode.pm -->> -counter.pm: Back from manage_selection()
```
### Callback functions
> The callback functions must be defined in the corresponding _themode.pm_ file but they actually apply to objects with the **values** class (defined in the **values.pm** file). You should bear it in mind while writing these functions, to know what data you can access.
#### closure_custom_calc
This function receives a hash called `%options`, which contains a hash reference under `$options{new_datas}`. The function must feed `$self->{result_values}` for further processing.
The default function that will be called is `centreon::plugins::templates::catalog_functions::catalog_status_calc()`.
```mermaid
sequenceDiagram
values.pm ->> themode.pm: $self->{closure_custom_calc}->(...)
```
#### closure_custom_output
This method must return a string to be displayed in the output using data stored as attributes of `$self->{result_values}` where the available keys are the strings listed in the `key_values` entries.
#### closure_custom_threshold_check
This callback function can be defined to implement custom logic in the evaluation of the returned status.
```mermaid
sequenceDiagram
values.pm ->> +themode.pm: return &{$self->{closure_custom_threshold_check}}($self, %options);
Note right of themode.pm: WARNING: This function is declared in themode.pm but is actually called as a method for class values
Note right of values.pm: If this function closure_custom_threshold_check is defined
themode.pm ->> perfdata.pm: $self->{perfdata}->threshold_check()
themode.pm -->> -values.pm: Back from closure_custom_threshold_check
```

View File

@ -0,0 +1,245 @@
sequenceDiagram
participant centreon_plugins.pl
create participant script.pm
centreon_plugins.pl ->> script.pm: new()
centreon_plugins.pl ->> +script.pm: run()
script.pm ->> +script.pm: get_plugin()
create participant options.pm
Note over options.pm: Package centreon::plugins::options
script.pm ->> options.pm: new()
Note right of options.pm: Imports GetOptions from Getopt::Long
create participant output.pm
Note over output.pm: Package centreon::plugins::output
script.pm ->> +output.pm: new()
output.pm ->> options.pm: add_options()
Note right of output.pm: Adds options for output and perfdata
output.pm -->> -script.pm: Back from new()
script.pm ->> options.pm: set_output()
Note right of options.pm: Stores a reference to output object
script.pm ->> options.pm: add_options()
Note right of options.pm: Adds all the script options<br/>(plugin, list-plugin, help...)
script.pm ->> options.pm: parse_options()
Note right of options.pm: Calls GetOptions(%{$self->{options}})<br/> and empty $self->{options}
script.pm ->> options.pm: get_options()
Note right of options.pm: Stores all the following options:<br/>('plugin', 'list_plugin', 'help', 'version', 'runas',<br/>'environment', 'ignore_warn_msg', 'convert_args')
script.pm ->> output.pm: plugin()
Note right of output.pm: Stores the --plugin name in $self->{plugin}
script.pm ->> options.pm: get_options()
Note right of options.pm: Returns all the options from $self->{options_stored}
script.pm ->> +output.pm: check_options()
Note right of output.pm: Checks all the options obtained right before
output.pm -> output.pm: load_perfdata_extend_args()
Note right of output.pm: Handles "extend perfdata" options if present
output.pm -->> -script.pm: Back to get_plugin()<br/>from check_options()
script.pm ->> options.pm: clean()
Note right of options.pm: Empties $self->{options_stored}
script.pm -->> -script.pm: Back to run()<br/>from get_plugin()
script.pm -> script.pm: [several actions if<br/>not in nominal use]
script.pm ->> +script.pm: check_relaunch()
script.pm -> script.pm: check_relaunch_get_args()
Note right of script.pm: Rewrites the command with all its arguments
script.pm -> script.pm: centreon::plugins::misc::backtick()
script.pm -->> -script.pm: End of check_relaunch()
script.pm -> script.pm: centreon::plugins::misc::<br/>mymodule_load()
Note right of script.pm: Loads the code of the plugin
create participant plugin.pm
script.pm ->> +plugin.pm: new()
create participant script_custom.pm
plugin.pm ->> +script_custom.pm: new()
Note over script_custom.pm: Package centreon::plugins::script_custom
script_custom.pm ->> options.pm: add_options()
Note right of script_custom.pm: mode, dyn-mode, list-mode,<br/>custommode, list-custommode,<br/>multiple
script_custom.pm ->> options.pm: parse_options()
Note right of script_custom.pm: GetOptions(%{$self->{options}})<br/>and empties $self->{options}
script_custom.pm ->> options.pm: get_options()
Note right of script_custom.pm: Retourne $self->{options_stored}
script_custom.pm ->> options.pm: add_help(package => $options{package},<br/> sections => 'PLUGIN DESCRIPTION')
script_custom.pm ->> options.pm: add_help(package => __PACKAGE__, sections => 'GLOBAL OPTIONS')
script_custom.pm ->> output.pm: mode(name => $self->{mode_name})
Note left of output.pm: $self->{mode} = $options{name}
script_custom.pm -->> -plugin.pm: Back from new()
plugin.pm -> plugin.pm: Populates $self->{modes}<br/>with the available modes
plugin.pm -> plugin.pm: Populates $self->{custom_modes}
plugin.pm -->> -script.pm: Back from new() to run()
script.pm ->> +plugin.pm: init(help => $self->{help}, version => $self->{version})
plugin.pm ->> options.pm: add_options()
Note right of plugin.pm: Adds options specific<br/>to the plugin (eg<br/>api-version)
plugin.pm ->> +script_custom.pm: $self->SUPER::<br/>init(%options)
script_custom.pm -> script_custom.pm: display_help() && option_exit()
Note right of script_custom.pm: Displays help/version/<br/>list-mode/list-custommode<br/>if asked
script_custom.pm -> script_custom.pm: load_password_mgr()
script_custom.pm ->> +script_custom.pm: load_custom_mode()
script_custom.pm -> script_custom.pm: centreon::plugins::misc::<br/>mymodule_load(...)
create participant custommode.pm
script_custom.pm ->> +custommode.pm: $self->{custom_modes}<br/>->{$self->{custommode_name}}<br/>->new()
custommode.pm ->> options.pm: add_options()
Note right of custommode.pm: Adds options that are<br/>specific to the custom<br/>mode
custommode.pm ->> options.pm: add_help()
Note right of custommode.pm: Adds options that are<br/>specific to the custom<br/>mode
custommode.pm -> custommode.pm: $self->{output} = $options{output};
custommode.pm -> custommode.pm: Call constructors for<br/>http/lwp/curl, statefile
custommode.pm -->> -script_custom.pm: Back to load_custom_mode()
script_custom.pm -->> -script_custom.pm: Back to init()
script_custom.pm -> script_custom.pm: centreon::plugins::misc::<br/>mymodule_load(...)
Note right of script_custom.pm: Loads the code of the mode
create participant themode.pm
script_custom.pm ->> +themode.pm: $self->{modes}{<br/>$self->{mode_name}<br/>}->new()
Note right of themode.pm: Here "themode.pm" stands<br/>for cpu.pm, uptime.pm<br/>or whatever mode file
create participant counter.pm
themode.pm ->> +counter.pm: new()
Note right of counter.pm: counter::new() constructor<br/>inherited by themode.pm
create participant mode.pm
counter.pm ->> +mode.pm: $class->SUPER::new()
create participant perfdata.pm
mode.pm ->> +perfdata.pm: centreon::plugins::<br/>perfdata->new(<br/>output => $options{output})
Note right of perfdata.pm: Stores a reference<br/>to the output object<br/>Initialises thlabel
perfdata.pm -->> -mode.pm: Back from new()
mode.pm -->> -counter.pm: Back from new()
counter.pm -> counter.pm: centreon::plugins::misc::<br/>mymodule_load(...)
Note right of counter.pm: Loads statefile.pm if necessary
counter.pm ->> +themode.pm: $self->set_counters(%options);
Note left of themode.pm: set_counters() must<br/>define the counter's<br/>structure
themode.pm -->> -counter.pm: Back from set_counters()
rect rgb(230, 255, 255)
loop For each counter/subcounter
counter.pm -> counter.pm: get_threshold_prefix(<br/>name => $counter<br/>)
Note right of counter.pm: Builds the thresholds<br/>label (thlabel)
counter.pm ->> options.pm: add_options()
Note right of counter.pm: Adds "very long thresholds<br/>options" with thlabel
counter.pm ->> options.pm: add_options()
Note right of counter.pm: Adds thresholds options<br/>with label redirecting to<br/>the long thresholds
create participant values.pm
counter.pm ->> values.pm: $_->{obj} =<br/>centreon::plugins::values->new(...)
Note right of values.pm: Stores references to<br/>various objects (statefile,<br/>output, perfdata) and initiates others
counter.pm ->> values.pm: $_->{obj}->set()
Note right of values.pm: Stores the counter's<br/>"set" object's attributes<br/>into values' $self<br/>(ie $self->{obj} for counter.pm)
Note right of counter.pm: End of for each counter/subcounter
end
end
Note right of counter.pm: Still in new()
counter.pm -->> -themode.pm: Back to new() after<br/>the inherited constructor
themode.pm ->> options.pm: add_options()
Note left of options.pm: Adds options that<br/>are specific to the mode<br/>such as filters
themode.pm -->> -script_custom.pm: Back from $self-><br/>{modes}{$self->{mode_name}}<br/>->new() to init()
script_custom.pm ->> options.pm: add_help(...)
Note right of script_custom.pm: Adds help from "MODE"<br/>section from the mode<br/>if --help option is provided
script_custom.pm ->> options.pm: parse_options()
Note right of script_custom.pm: Calls GetOptions(%{$self->{options}})<br/> and empty $self->{options}
script_custom.pm ->> options.pm: get_options()
Note right of script_custom.pm: Stores all the mode-specific options.<br/>At this point, all the<br/>options have been parsed<br/>and stored in $self->{option_results}
script_custom.pm -> script_custom.pm: $self->{pass_mgr}->manage_options()
script_custom.pm -> script_custom.pm: $self->{custommode_current}->set_options(option_results => $self->{option_results});
script_custom.pm -> script_custom.pm: $self->{custommode_current}->set_defaults(default => $self->{customdefault});
script_custom.pm -> script_custom.pm: $self->{custommode_current}->check_options()
script_custom.pm ->> +themode.pm: $self->{mode}->check_options()
themode.pm ->> +counter.pm: $self->SUPER::check_options()
counter.pm ->> +mode.pm: $self->SUPER::init(%options);
mode.pm -> mode.pm: %{$self->{option_results}} =<br/>>%{$options{option_results}};
mode.pm -> mode.pm: Apply the default options<br/>values when none given
mode.pm -->> -counter.pm: Back to check_options()
counter.pm -> counter.pm: Handle --list-counters option
counter.pm -> counter.pm: If type 2 counter, prepares<br/>the macros substitutions.
rect rgb(230, 255, 255)
loop For each counter/subcounter
counter.pm ->> +values.pm: $sub_counter->{obj}->init(<br/>option_results => $self->{option_results})
values.pm ->> +perfdata.pm: $self->{perfdata}->threshold_validate()
perfdata.pm -> perfdata.pm: centreon::plugins::misc::parse_threshold(<br/>threshold => $options{value});
Note left of perfdata.pm: This function checks the<br/>conformity of threshold<br/>Splits into a global status and<br/>"result_perf" (arobase, end, infinite_neg,<br/>infinite_pos, start)
Note left of perfdata.pm: Stores the result in $self->{threshold_label}->{$options{label}}
perfdata.pm -->> -values.pm: Back to init()
values.pm -->> -counter.pm: Back to check_options()
end
end
counter.pm -> counter.pm: $self->change_macros(...)
Note right of counter.pm: Replaces all the %{macros}<br/>with the adequate<br/>Perl expressions for<br/>future eval
counter.pm -> counter.pm: $self->{statefile_value}->check_options(...);
Note right of counter.pm: If statefile is used
counter.pm -->> -themode.pm: Back to check_options()
Note right of themode.pm: Checks that the mode-specific<br/>options are valid
themode.pm -->> -script_custom.pm: Back to init() from check_options()
script_custom.pm -->> -plugin.pm: Back from $self->SUPER::init(%options)
plugin.pm -->> -script.pm: Back from init() to run()
script.pm ->> +plugin.pm: $plugin->run()
Note right of plugin.pm: No run() defined => call inherited
plugin.pm ->> +script_custom.pm: run()
Note right of script_custom.pm: Displays the disco-format if asked
Note right of script_custom.pm: Displays the disco-show if asked
script_custom.pm ->> +themode.pm: $self->{mode}->run(...)
Note right of themode.pm: No run() defined => call inherited
themode.pm ->> +counter.pm: run(...)
counter.pm ->> +themode.pm: $self->manage_selection(%options)
Note left of themode.pm: Gathers the data and stores<br/>them in the counters<br/>structure
themode.pm -->> -counter.pm: Back from manage_selection()
counter.pm -> counter.pm: $self->{statefile_value}->read(statefile => $self->{cache_name})
Note right of counter.pm: Reads statefile (cache) if needed
rect rgb(230, 255, 255)
loop For each $self->{maps_counters_type}
counter.pm -> counter.pm: $self->run_global(...)
Note right of counter.pm: If counter is of type 0.<br/>Not detailed here.
counter.pm -> counter.pm: $self->run_instances(...)
Note right of counter.pm: If counter is of type 1.<br/>Not detailed here.
counter.pm -> counter.pm: $self->run_group(...)
Note right of counter.pm: If counter is of type 2.<br/>Not detailed here.
counter.pm ->> +counter.pm: $self->run_multiple(...)
Note right of counter.pm: If counter is of type 3
counter.pm ->> output.pm: output_add(...)
Note right of counter.pm: Sets the default output and status to OK
rect rgb(255, 230, 255)
loop For each sub-entry
counter.pm ->> +counter.pm: $self->call_object_callback( method_name => $options{config}->{cb_long_output}, instance => $instance, instance_value => $self->{$options{config}->{name}}->{$instance} )
Note right of counter.pm: Calls the callback function given as the cb_long_output attribute of the current entry of $self->{maps_counters_type}
counter.pm -->> -counter.pm: Back from call_object_callback() to run_multiple()
counter.pm ->> +output.pm: $self->{output}->output_add(long_msg => <previous result>)
output.pm -->> -counter.pm: Back from output_add() to run_multiple()
counter.pm ->> +counter.pm: $self->call_object_callback(method_name => $options{config}->{cb_prefix_output}, instance => $instance, instance_value => $self->{$options{config}->{name}}->{$instance})
Note right of counter.pm: Calls the callback function given as the cb_prefix_output attribute of the current entry of $self->{maps_counters_type}
counter.pm -->> -counter.pm: Back from call_object_callback() to run_multiple()
rect rgb(255, 255, 230)
loop For each group
counter.pm ->> +counter.pm: $self->run_multiple_instances(config => $group, multiple_parent => $multiple, instance_parent => $instance, indent_long_output => $indent_long_output);
counter.pm ->> counter.pm: $self->call_object_callback(method_name => $options{config}->{cb_init})
Note left of counter.pm: Calls the callback function given as the cb_init attribute of the current entry of $self->{maps_counters_type}
counter.pm ->> output.pm: $self->{output}->use_new_perfdata()
Note right of counter.pm: Returns 1 if the new labels (nlabel) must be used
loop For each instance under that group
loop For each configured counter in that group
counter.pm ->> values.pm: $obj->set(instance => $instance);
Note right of values.pm: Sets the $obj instance attribute to the given value
counter.pm ->> +values.pm: $obj->execute( new_datas => $self->{new_datas}, values => $self->{$options{config}->{name}}->{$id})
loop For each item in "key_values"
Note right of values.pm: exit the loop if "no_values" given
values.pm ->> themode.pm: $self->{closure_custom_calc}->(...)
Note right of values.pm: If this function is defined
Note right of values.pm: Else
values.pm ->> +values.pm: $self->calc()
values.pm ->> values.pm: Copies the "key_value" entry (eg. display, storage_used, ...) or the diff between last check and current check or the ratio into $self->{result_values}
values.pm -->> -values.pm: Back to execute()
end
values.pm -->> -counter.pm: Back from execute()
counter.pm ->> +values.pm: $obj->threshold_check()
values.pm ->> +themode.pm: return &{$self->{closure_custom_threshold_check}}($self, %options);
Note right of themode.pm: WARNING: This function is declared in themode.pm but is actually called as a method for class values
Note right of values.pm: If this function closure_custom_threshold_check is defined
themode.pm ->> perfdata.pm: $self->{perfdata}->threshold_check()
themode.pm -->> -values.pm: Back from closure_custom_threshold_check
values.pm ->> perfdata.pm: return $self->{perfdata}->threshold_check()
Note right of values.pm: If this function closure_custom_threshold_check is NOT defined
values.pm -->> -counter.pm: Back from threshold_check()
end
end
counter.pm -->> -counter.pm: Back from run_multiple_instances()
Note right of counter.pm: If the group's type is 1
counter.pm ->> counter.pm: $self->run_global( config => $group, multiple_parent => $multiple, called_multiple => 1, force_instance => $instance, indent_long_output => $indent_long_output)
Note right of counter.pm: If the group's type is 0.<br/>Not detailed here.
end
end
end
end
counter.pm -->> -counter.pm: Back from run_multiple()
end
end
counter.pm -->> -themode.pm: Back from run()
themode.pm -->> -script_custom.pm: Back from run()
plugin.pm -->> -script.pm: Back from run() to run()
script.pm -->> -centreon_plugins.pl: End of run()

View File

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

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Applications-Exense-Step-Restapi",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_exense_step_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"apps/exense/step/restapi/"
]
}

View File

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

View File

@ -1,5 +1,3 @@
{
"dependencies": [
"perl-mqseries"
]
"dependencies": []
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Hardware-Storage-Hpe-Alletra-Restapi",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_hpe_alletra_restapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"storage/hp/alletra/restapi/"
]
}

View File

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

View File

@ -7,7 +7,8 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/uptime.pm",
"snmp_standard/mode/resources/",
"centreon/common/fortinet/fortigate/snmp/",
"network/fortinet/fortigate/snmp/"
]

View File

@ -8,10 +8,10 @@
"snmp_standard/mode/cpudetailed.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/resources/",
"snmp_standard/mode/memory.pm",
"snmp_standard/mode/swap.pm",
"network/juniper/common/ive",
"network/juniper/sa"
"network/juniper/common/ive/snmp",
"network/juniper/sa/snmp"
]
}

View File

@ -7,10 +7,10 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/resources/",
"snmp_standard/mode/liststorages.pm",
"snmp_standard/mode/storage.pm",
"network/juniper/common/junos",
"network/juniper/srx"
"network/juniper/common/junos/snmp",
"network/juniper/srx/snmp"
]
}

View File

@ -7,8 +7,8 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"network/juniper/common/screenos",
"network/juniper/ssg"
"snmp_standard/mode/resources/",
"network/juniper/common/screenos/snmp",
"network/juniper/ssg/snmp"
]
}

View File

@ -5,6 +5,6 @@
"files": [
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"network/juniper/ggsn/"
"network/juniper/ggsn/snmp/"
]
}

View File

@ -7,7 +7,7 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/resources/",
"network/juniper/common/screenos/snmp/",
"network/juniper/isg/snmp/"
]

View File

@ -7,10 +7,10 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/resources/",
"snmp_standard/mode/memory.pm",
"snmp_standard/mode/swap.pm",
"network/juniper/common/ive",
"network/juniper/mag"
"network/juniper/common/ive/snmp",
"network/juniper/mag/snmp"
]
}

View File

@ -0,0 +1,7 @@
{
"dependencies": [
"plink",
"libssh-session-perl",
"libxml-libxml-simple-perl"
]
}

View File

@ -0,0 +1,13 @@
{
"pkg_name": "centreon-plugin-Network-Routers-Juniper-Mseries-Netconf",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_juniper_mseries_netconf.pl",
"files": [
"centreon/plugins/script_custom.pm",
"centreon/plugins/backend/ssh/",
"centreon/plugins/ssh.pm",
"network/juniper/common/junos/netconf/custom/",
"network/juniper/common/junos/netconf/mode/",
"network/juniper/mseries/netconf/"
]
}

View File

@ -0,0 +1,7 @@
{
"dependencies": [
"plink",
"perl(Libssh::Session)",
"perl(XML::LibXML::Simple)"
]
}

View File

@ -1,16 +1,16 @@
{
"pkg_name": "centreon-plugin-Network-Routers-Juniper-Mseries-Snmp",
"pkg_summary": "Centreon Plugin",
"plugin_name": "centreon_juniper_mseries.pl",
"plugin_name": "centreon_juniper_mseries_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/resources/",
"snmp_standard/mode/liststorages.pm",
"snmp_standard/mode/storage.pm",
"network/juniper/common/junos/",
"network/juniper/mseries/"
"network/juniper/common/junos/snmp/",
"network/juniper/mseries/snmp/"
]
}

View File

@ -7,10 +7,10 @@
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"snmp_standard/mode/resources/",
"snmp_standard/mode/resources/",
"snmp_standard/mode/liststorages.pm",
"snmp_standard/mode/storage.pm",
"network/juniper/common/junos/",
"network/juniper/ex/"
"network/juniper/common/junos/snmp/",
"network/juniper/ex/snmp/"
]
}

View File

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

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Notification-Foxbox",
"pkg_summary": "Centreon Plugin to send notifications by Foxbox",
"plugin_name": "centreon_notification_foxbox.pl",
"files": [
"centreon/plugins/script_simple.pm",
"notification/foxbox"
]
}

View File

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

View File

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

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Notification-Jasminsms-Httpapi",
"pkg_summary": "Centreon Plugin to send notifications by Jasmin SMS HTTP-API",
"plugin_name": "centreon_notification_jasminsms-httpapi.pl",
"files": [
"centreon/plugins/script_custom.pm",
"notification/jasminsms/httpapi"
]
}

View File

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

View File

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

View File

@ -0,0 +1,9 @@
{
"pkg_name": "centreon-plugin-Notification-Ovhsms",
"pkg_summary": "Centreon Plugin to send notifications by OVH SMS API",
"plugin_name": "centreon_notification_ovhsms.pl",
"files": [
"centreon/plugins/script_simple.pm",
"notification/ovhsms"
]
}

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