Skip to content

Plugin(notification::microsoft::office365::teams): Modify the URI build and fix notification output#5388

Merged
omercier merged 13 commits into
developfrom
MON-155920
Aug 8, 2025
Merged

Plugin(notification::microsoft::office365::teams): Modify the URI build and fix notification output#5388
omercier merged 13 commits into
developfrom
MON-155920

Conversation

@itoussies

@itoussies itoussies commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

Refs: MON-155920

Centreon team (internal PR)

Description

Add an option to modify how the URI is built to avoid setting '&' in macros (they are removed by Centreon Engine by default). Added a new option, --teams-workflow-params, to set the params.
Example:
perl ~/centreon-plugins/src/centreon_plugins.pl --plugin=notification::microsoft::office365::teams::plugin --mode=alert --custommode=workflowapi --teams-workflow='https://workflow.url:443/workflows/1045fa0c922a4b3780bd30244ed8395b/triggers/manual/paths/invoke' --notification-type='PROBLEM' --host-name='Test' --service-description='Deployment' --service-state='WARNING' --service-output='WARNING: output' --date='13-01-2024 17:00:00' --action-links --centreon-url='localhost' --extra-info='' --teams-workflow-params='param1' --teams-workflow-params='param2' --teams-workflow-params='param3'

The old method with only the --teams-workflow option is still functional.

Fixes # (issue)
Fix #5519

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Modify how the URI is build to avoid setting '&'
in macros

Refs: MON-155920
@itoussies itoussies requested a review from a team as a code owner January 13, 2025 15:44
@itoussies itoussies requested a review from Evan-Adam January 13, 2025 15:44
@itoussies itoussies marked this pull request as draft January 21, 2025 09:21
Modify how the URI is build to avoid setting '&'
in macros

Refs: MON-155920
Modify how the URI is build to avoid setting '&'
in macros

Refs: MON-155920
@s-duret s-duret marked this pull request as ready for review February 5, 2025 09:51
@itoussies itoussies marked this pull request as draft February 5, 2025 10:13
@itoussies itoussies marked this pull request as ready for review February 10, 2025 12:43
@itoussies itoussies marked this pull request as draft February 10, 2025 15:51
@itoussies

Copy link
Copy Markdown
Contributor Author

Converted again to draft as --teams-workflow-params won't be mandatory anymore

@lucie-tirand lucie-tirand added the internal Centreon internal PR label Apr 4, 2025
Add an option to modify how the URI is build to
avoid setting '&' in macros

Refs: MON-155920
@itoussies itoussies marked this pull request as ready for review June 3, 2025 15:14
@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown

Logo
Checkmarx One – Scan Summary & Detailsa806ef44-dbe4-4e69-b804-36fe2121a647

Great job! No new security vulnerabilities introduced in this pull request

Comment thread src/notification/microsoft/office365/teams/custom/workflowapi.pm Outdated
Comment thread src/notification/microsoft/office365/teams/custom/workflowapi.pm Outdated
Refs:CTOR-1379

Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
Refs:CTOR-1379

Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
omercier
omercier previously approved these changes Jul 29, 2025
@itoussies itoussies requested a review from a team as a code owner July 29, 2025 13:39
@omercier omercier merged commit cfba599 into develop Aug 8, 2025
38 checks passed
@omercier omercier deleted the MON-155920 branch August 8, 2025 12:07
scresto31 pushed a commit that referenced this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[notification::microsoft::office365::teams::mode::alert] - not all information are displayed

3 participants