Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Options section for integrations. #5962

Merged
merged 9 commits into from
Sep 4, 2023

Conversation

GabrielEValenzuela
Copy link
Member

@GabrielEValenzuela GabrielEValenzuela commented Mar 8, 2023

Description

This PR addresses and closes #5927 . It expands on the integrations examples using the new feature options.

With the changes to this PR, the following issues would be fixed:

The changes that have been made are as follows:

  • Add new tag inside integrations, called options that supports a custom JSON object to add or modify the different tags of the integrations.
<options>JSON</options> <!-- Replace with your custom JSON object -->
  • Add links to the different APIs so that the user has direct access to the fields he can modify.
  • Add a quick example to the ossec.conf reference.

Checks

  • Compiles without warnings.
  • Uses present tense, active voice, and semi-formal registry.
  • Uses short, simple sentences.
  • Uses bold for user interface elements, italics for key terms or emphasis, and code font for Bash commands, file names, REST paths, and code.
  • Uses three spaces indentation.
  • Adds or updates meta descriptions accordingly.
  • Updates the redirects.js script if necessary (check this guide).

Fix: Formats
@GabrielEValenzuela GabrielEValenzuela marked this pull request as ready for review March 9, 2023 20:40
@MarcelKemp MarcelKemp self-requested a review March 10, 2023 12:44
@GabrielEValenzuela GabrielEValenzuela self-assigned this Mar 10, 2023
Copy link
Member

@MarcelKemp MarcelKemp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is necessary to add a Shuffle API reference that has the variables that can be modified for the options field.

Add: JSON format to Pagerduty section
@javimed javimed added level/task Task issue type/enhancement Enhancement issue labels Aug 25, 2023
@javimed
Copy link
Member

javimed commented Aug 28, 2023

@GabrielEValenzuela

  • If this is meant for 4.7.0 release, the base for the PR needs to be 4.7.0 and not master.
  • In user-manual/reference/ossec-conf/integration.html#configuration-example, rather than showing <options>JSON</options> <!-- Replace with your custom JSON object --> we could show a specific use example, e.g. <options>{"pretext": "Custom Title"}</options> <!-- Replace with your custom JSON object --> for a Slack configuration example.

@GabrielEValenzuela GabrielEValenzuela changed the base branch from master to 4.7.0 August 29, 2023 12:15
@GabrielEValenzuela
Copy link
Member Author

@javimed

Thanks Javi, the changes have been applied correctly 😃

</integration>

<!-- Integration with PagerDuty -->
<integration>
<name>pagerduty</name>
<api_key>API_KEY</api_key> <!-- Replace with your PagerDuty API key -->
<options>{"pretext": "Custom title"}</options> <!-- Replace with your custom JSON object -->
<alert_format>json</alert_format> <!-- With the new script this is mandatory -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What new script? maybe some context is needed if commenting like this

Copy link
Member Author

@GabrielEValenzuela GabrielEValenzuela Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @javimed !

I spoke with @MarcelKemp and the new script is being maintained.

Mainly, the change is based on the fact that pagerduty previously had a shell script and now it is in python.
For this reason, as most of the python scripts of integrations, the format of the alert that it expects is in JSON and for this reason it is necessary to change this parameter in the configuration.

Here I let you the associate PR and issue 😃

javimed
javimed previously approved these changes Aug 31, 2023
@javimed javimed dismissed their stale review August 31, 2023 11:19

Let's revise that mandatory json format comment in the configuration

@javimed javimed merged commit 14ee7e2 into 4.7.0 Sep 4, 2023
@javimed javimed deleted the 5927_custom_notifications_in_integrations branch September 4, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve integrations documentation
3 participants