Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix bug with -i option #2585

Conversation

AlexRuiz7
Copy link
Member

@AlexRuiz7 AlexRuiz7 commented Nov 8, 2023

Related issue
#2583

Description

This PR fixes a small bug when using the -i option of the indexer-ism-init.sh script.

It also adds the possibility of using a custom value for the policy.

Logs example

bash indexer-ism-init.sh -a 30d -d 1000 -i 192.168.56.10 -s 5 -p SecretPassword -P 1
Parameters:
  -a|--min-index-age: 30d
  -d|--min-doc-count: 1000
  -i|--indexer-hostname: 192.168.56.10
  -p|--indexer-password: SecretPassword
  -P|--priority: 1
  -s|--min-shard-size: 5

Global variable:
  - INDEXER_URL: https://192.168.56.10:9200/
  - C_AUTH: -u admin:SecretPassword

Constants:
  - POLICY_NAME: rollover_policy
  - ISM_INDEX_PATTERNS: ["wazuh-alerts-*", "wazuh-archives-*", "-wazuh-alerts-4.x-sample*"]
bash indexer-ism-init.sh                                                            
Parameters:
  -a|--min-index-age: 7d
  -d|--min-doc-count: 200000000
  -i|--indexer-hostname: localhost
  -p|--indexer-password: admin
  -P|--priority: 50
  -s|--min-shard-size: 25

Global variable:
  - INDEXER_URL: https://localhost:9200
  - C_AUTH: -u admin:admin

Constants:
  - POLICY_NAME: rollover_policy
  - ISM_INDEX_PATTERNS: ["wazuh-alerts-*", "wazuh-archives-*", "-wazuh-alerts-4.x-sample*"]

Tests

  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary
  • Tests for Linux deb
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • Package install/remove/install
    • Package install/purge/install
    • Check file permissions after installing the package
  • Tests for macOS
    • Test the package from macOS Sierra to Mojave
  • Tests for Solaris
    • Test the package on Solaris 10
    • Test the package on Solaris 11
    • Check file permissions on Solaris 11 template
  • Tests for IBM AIX
    • %files section is correctly updated if necessary
    • Check the changes from IBM AIX 5 to 7

@AlexRuiz7 AlexRuiz7 self-assigned this Nov 8, 2023
@AlexRuiz7 AlexRuiz7 linked an issue Nov 8, 2023 that may be closed by this pull request
2 tasks
@c-bordon c-bordon merged commit 48263fb into 4.8.0 Nov 8, 2023
4 checks passed
@c-bordon c-bordon deleted the 2583-ism-rollover-bug-when-trying-to-use-the-i-option-in-the-ism-script branch November 8, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISM rollover] Bug when trying to use the -i option in the ISM script
2 participants