-
-
Notifications
You must be signed in to change notification settings - Fork 21
Feat/graylog assert #197
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
base: main
Are you sure you want to change the base?
Feat/graylog assert #197
Changes from all commits
4fe1869
ebd995e
2c8e99d
6f6e08f
00b14f7
d189bb1
b609b69
5a54dd2
df27a8a
a2dcb75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,12 @@ graylog_datanode__password_secret: 'Linuxfabrik_GmbH' | |
| * Type: String. | ||
| * Default: `'mongodb://127.0.0.1/graylog'` | ||
|
|
||
| `graylog_datanode__node_search_cache_size` | ||
|
|
||
| * Cache size for searchable snaphots. This space will be automatically reserved if `graylog_datanode__path_repo` is configured. See [docs.opensearch.org - Supported Units](https://docs.opensearch.org/latest/api-reference/units/) for a list of possible options. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mention that this cache is on the disk, not in memory
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. trailing whitespace - make sure you have the |
||
| * Type: String | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a |
||
| * Default: `10gb` | ||
|
|
||
| `graylog_datanode__opensearch_data_location` | ||
|
|
||
| * Set this OpenSearch folder if you need OpenSearch to be located in a special place. | ||
|
|
@@ -90,6 +96,17 @@ graylog_datanode__password_secret: 'Linuxfabrik_GmbH' | |
| * Type: String. | ||
| * Default: 50% of system memory, e.g. `'8g'` | ||
|
|
||
| `graylog_datanode__path_repo` | ||
|
|
||
| * Filesystem paths where searchable snapshots should be stored | ||
| * Type: List of Strings | ||
| * Default: `[]` | ||
|
|
||
| `graylog_datanode__raw` | ||
| * Multiline string. Raw content which will be appended to the `datanode.conf` config file. | ||
|
Comment on lines
+105
to
+106
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing empty newline |
||
| * Type: String | ||
| * Default: unset | ||
|
|
||
| `graylog_datanode__service_enabled` | ||
|
|
||
| * Enables or disables the graylog-datanode service, analogous to `systemctl enable/disable --now`. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,8 +1,10 @@ | ||||||
| graylog_datanode__bind_address: '127.0.0.1' | ||||||
| graylog_datanode__datanode_http_port: 8999 | ||||||
| graylog_datanode__mongodb_uri: 'mongodb://127.0.0.1/graylog' | ||||||
| graylog_datanode__node_search_cache_size: '10gb' | ||||||
| graylog_datanode__opensearch_data_location: '/var/lib/graylog-datanode/opensearch/data' | ||||||
| graylog_datanode__opensearch_heap: '{{ [((ansible_facts["memtotal_mb"] * 0.5) | int), 31744] | min }}m' | ||||||
| graylog_datanode__mongodb_uri: 'mongodb://127.0.0.1/graylog' | ||||||
| graylog_datanode__path_repo: [] | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use plural for lists.
Suggested change
|
||||||
| graylog_datanode__service_enabled: true | ||||||
|
|
||||||
| # ------ | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,3 +1,23 @@ | ||||||
| - block: | ||||||
|
|
||||||
| - name: 'Validate that graylog_datanode__password_secret length >= 16 characters' | ||||||
| ansible.builtin.assert: | ||||||
| that: | ||||||
| - 'graylog_datanode__password_secret | length >= 16' | ||||||
| fail_msg: 'graylog_datanode__password_secret must at least 16 characters' | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| quiet: true | ||||||
|
|
||||||
| - name: 'Validate that graylog_datanode__node_search_cache_size follows OpenSearch Bytes format' | ||||||
| ansible.builtin.assert: | ||||||
| that: | ||||||
| - 'graylog_datanode__node_search_cache_size | regex_search("^[0-9]+(b|kb|mb|gb|tb|pb)$")' | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also please fix the inconsistent indentation |
||||||
| fail_msg: '"{{ graylog_datanode__node_search_cache_size }}" does not follow OpenSearch Bytes format' | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| quiet: true | ||||||
|
|
||||||
| tags: | ||||||
| - 'graylog_datanode' | ||||||
| - 'graylog_datanode:configure' | ||||||
|
|
||||||
|
Comment on lines
+17
to
+20
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just use the |
||||||
| - block: | ||||||
|
|
||||||
| - name: 'Install graylog-datanode' | ||||||
|
|
@@ -62,6 +82,15 @@ | |||||
| group: 'graylog-datanode' | ||||||
| mode: 0o755 | ||||||
|
|
||||||
| - name: 'mkdir -p {{ item }}; chown graylog-datanode:graylog-datanode {{ item }}' | ||||||
| ansible.builtin.file: | ||||||
| path: '{{ item }}' | ||||||
| state: 'directory' | ||||||
| owner: 'graylog-datanode' | ||||||
| group: 'graylog-datanode' | ||||||
| mode: 0o740 | ||||||
| loop: '{{ graylog_datanode__path_repo }}' | ||||||
|
|
||||||
| tags: | ||||||
| - 'graylog_datanode' | ||||||
| - 'graylog_datanode:configure' | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -163,3 +163,13 @@ opensearch_logs_location = /var/log/graylog-datanode/opensearch | |
| # indexer_jwt_auth_token_expiration_duration = 180s | ||
|
|
||
| opensearch_heap = {{ graylog_datanode__opensearch_heap }} | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dont forget to update the timestamp in the header of the templates |
||
| #### Data Tiering Properties | ||
|
|
||
| node_search_cache_size = {{ graylog_datanode__node_search_cache_size }} | ||
| path_repo = {{ graylog_datanode__path_repo | join(',') }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this work if
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and is it really comma separated? |
||
|
|
||
| {% if graylog_datanode__raw is defined and graylog_datanode__raw | length %} | ||
| #### Raw #### | ||
| {{ graylog_datanode__raw }} | ||
| {% endif %} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,16 @@ | ||
| - block: | ||
|
|
||
| - name: 'Validate that graylog_server__password_secret length >= 16 characters' | ||
| ansible.builtin.assert: | ||
| that: | ||
| - 'graylog_server__password_secret | length >= 16' | ||
| fail_msg: 'graylog_server__password_secret must be at least 16 characters' | ||
| quiet: true | ||
|
|
||
| tags: | ||
| - 'graylog_server' | ||
| - 'graylog_server:configure' | ||
|
|
||
|
Comment on lines
+10
to
+13
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just use the |
||
| - block: | ||
|
|
||
| - name: 'Install graylog-server' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new variables are missing in the example block at the bottom of this section