Skip to content

Commit 640f1d6

Browse files
[8.9] [DOCS] Adds shards object to Create pack and Update pack API (elastic#166363) (elastic#166631)
# Backport This will backport the following commits from `main` to `8.9`: - [[DOCS] Adds shards object to Create pack and Update pack API (elastic#166363)](elastic#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (elastic#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (elastic#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (elastic#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
1 parent cc4c9b9 commit 640f1d6

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/api/osquery-manager/packs/create.asciidoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ experimental[] Create packs.
3333

3434
`policy_ids`:: (Optional, array) A list of agents policy IDs.
3535

36+
`shards`:: (Required, object) An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.
37+
3638
`queries`:: (Required, object) An object of queries.
3739

3840

@@ -56,8 +58,13 @@ $ curl -X POST api/osquery/packs \
5658
"description": "My pack",
5759
"enabled": true,
5860
"policy_ids": [
59-
"my_policy_id"
61+
"my_policy_id",
62+
"fleet-server-policy"
6063
],
64+
"shards": {
65+
"my_policy_id": 35,
66+
"fleet-server-policy": 58
67+
},
6168
"queries": {
6269
"my_query": {
6370
"query": "SELECT * FROM listening_ports;",
@@ -67,7 +74,10 @@ $ curl -X POST api/osquery/packs \
6774
"field": "port"
6875
},
6976
"tags": {
70-
"value": ["tag1", "tag2"]
77+
"value": [
78+
"tag1",
79+
"tag2"
80+
]
7181
}
7282
}
7383
}

docs/api/osquery-manager/packs/update.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ WARNING: You are unable to update a prebuilt pack (`read_only = true`).
3838

3939
`policy_ids`:: (Optional, array) A list of agent policy IDs.
4040

41+
`shards`:: (Optional, object) An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.
42+
4143
`queries`:: (Required, object) An object of queries.
4244

4345

0 commit comments

Comments
 (0)