Commit 54f7174
[Fleet] fix content package task interval config (#230369)
## Summary
Follow up for elastic/ingest-dev#5685
Fix fleet config to change auto install content packages task interval:
```
# enable feature flag
xpack.fleet.enableExperimental: ['enableAutoInstallContentPackages']
# change interval
xpack.fleet.autoInstallContentPackages.taskInterval: 15s
```
Also use prerelease flag from settings to be able to test auto install
prerelease content package like system_otel:
<img width="875" height="1006" alt="image"
src="https://github.com/user-attachments/assets/7d22bbc8-5b32-4af5-97ec-fb4dca644f42"
/>
Added `discovery.datasets` field to `system_otel` package to test with,
but for some reason the datasets values are not showing up in the EPR
response ([PR](elastic/integrations#14770))
Tested with the package built locally and starting a local registry:
[system_otel-0.2.0.zip](https://github.com/user-attachments/files/21574295/system_otel-0.2.0.zip)
Update: this now works, had to pull the latest registry docker image
```
# start local registry
docker run -v /Users/juliabardi/kibana/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_registry_config.yml:/package-registry/config.yml -v /Users/juliabardi/kibana/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages:/packages/test-packages -v /Users/juliabardi/kibana/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips:/packages/signed-test-packages -p 12345:8080 docker.elastic.co/package-registry/distribution:lite
# use local registry in kibana config
xpack.fleet.registryUrl: http://localhost:12345
http://localhost:12345/search?prerelease=true&type=content&spec.min=2.3&spec.max=3.4&discovery=datasets:hostmetricsreceiver.otel
[
{
name: "system_otel",
title: "System OpenTelemetry Assets",
version: "0.2.0",
release: "beta",
description: "Dashboards for the OpenTelemetry data collected with the `hostmetrics` receiver.",
type: "content",
...
discovery: {
datasets: [
{
name: "hostmetricsreceiver.otel"
}
]
}
}
]
```
Generated some otel data by following the instructions in OpenTelemetry
integration in a multipass VM:
```
arch=$(if ([[ $(arch) == "arm" || $(arch) == "aarch64" ]]); then echo "arm64"; else echo $(arch); fi)
curl --output elastic-distro-9.1.0-linux-$arch.tar.gz --url https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-9.1.0-linux-$arch.tar.gz --proto '=https' --tlsv1.2 -fL && mkdir -p elastic-distro-9.1.0-linux-$arch && tar -xvf elastic-distro-9.1.0-linux-$arch.tar.gz -C "elastic-distro-9.1.0-linux-$arch" --strip-components=1 && cd elastic-distro-9.1.0-linux-$arch
rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i 's#\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i 's#\${env:ELASTIC_ENDPOINT}#http://192.168.64.1:9200#g' ./otel.yml && sed -i 's/\${env:ELASTIC_API_KEY}/NEdfc2RKZ0JobV8xTXQxMjk0cUY6XzliVWIzSDRYZVBFSU9Ea05FTFdJdw==/g' ./otel.yml
```
And updating pipelines:
```
vim otel.yml
service:
extensions: [file_storage]
pipelines:
metrics/hostmetrics:
receivers: [hostmetrics/system]
processors: [resourcedetection, attributes/dataset, resource/process]
exporters: [elasticsearch/otel]
# start collector
sudo ./otelcol --config otel.yml
```
For some reason the ES|QL query in the task doesn't return the
`hostmetricsreceiver.otel` dataset, but is returned when running the
same query in dev tools. Might be a permission issue.
```
FROM logs-*,metrics-*,traces-*
| KEEP @timestamp, data_stream.dataset | WHERE @timestamp > NOW() - 15 minutes
| STATS COUNT(*) BY data_stream.dataset
{
"took": 6,
"is_partial": false,
"documents_found": 5752,
"values_loaded": 5752,
"columns": [
{
"name": "COUNT(*)",
"type": "long"
},
{
"name": "data_stream.dataset",
"type": "keyword"
}
],
"values": [
[
115,
"elastic_agent"
],
[
27,
"elastic_agent.filebeat"
],
[
3,
"elastic_agent.status_change"
],
[
1696,
"elastic_agent.metricbeat"
],
[
3336,
"elastic_agent.fleet_server"
],
[
271,
"fleet_server.agent_versions"
],
[
271,
"fleet_server.agent_status"
]
]
}
```
<img width="2511" height="1101" alt="image"
src="https://github.com/user-attachments/assets/03721494-6ad0-4d69-8c79-a23d82ac1c84"
/>
Update: Yes, it seems `kibana_system` didn't have privileges to read the
integration data streams.
Tested locally by adding read access, and now the query returns the
expected results and installs the otel content package.
I'll create a pr to the elasticsearch repo. Here it is:
elastic/elasticsearch#132400
```
# checkout ES pr, start es from source
yarn es source --license trial -E xpack.security.authc.api_key.enabled=true -E xpack.security.authc.token.enabled=true --source-path=/Users/juliabardi/elasticsearch -E path.data=/tmp/es-data -E xpack.ml.enabled=false -E http.host=0.0.0.0
# kibana logs that run the task
[2025-08-04T15:51:43.748+02:00][DEBUG][plugins.fleet.fleet:auto-install-content-packages-task:1.0.1] [AutoInstallContentPackagesTask] Found datasets with data: hostmetricsreceiver.otel, elastic_agent, fleet_server.agent_status, system.process.summary, system.socket_summary, elastic_agent.filebeat_input, elastic_agent.metricbeat, elastic_agent.filebeat, system.memory, elastic_agent.elastic_agent, generic.otel, elastic_agent.status_change, hostmetricsreceiver, elastic_agent.fleet_server, system.uptime, system.cpu, system.process, system.filesystem, system.fsstat, system.load, fleet_server.agent_versions, system.network, system.diskio
[2025-08-04T15:51:43.748+02:00][DEBUG][plugins.fleet.fleet:auto-install-content-packages-task:1.0.1] [AutoInstallContentPackagesTask] Content packages to install: system_otel@0.2.0
[2025-08-04T15:51:43.748+02:00][DEBUG][plugins.fleet] Kicking off install of system_otel-0.2.0 from registry
```
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
### Identify risks
Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.
- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>1 parent 12172bd commit 54f7174
File tree
9 files changed
+183
-14
lines changed- oas_docs
- output
9 files changed
+183
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21581 | 21581 | | |
21582 | 21582 | | |
21583 | 21583 | | |
| 21584 | + | |
| 21585 | + | |
| 21586 | + | |
| 21587 | + | |
| 21588 | + | |
| 21589 | + | |
| 21590 | + | |
| 21591 | + | |
| 21592 | + | |
| 21593 | + | |
| 21594 | + | |
| 21595 | + | |
| 21596 | + | |
| 21597 | + | |
| 21598 | + | |
21584 | 21599 | | |
21585 | 21600 | | |
21586 | 21601 | | |
| |||
23714 | 23729 | | |
23715 | 23730 | | |
23716 | 23731 | | |
| 23732 | + | |
| 23733 | + | |
| 23734 | + | |
| 23735 | + | |
| 23736 | + | |
| 23737 | + | |
| 23738 | + | |
| 23739 | + | |
| 23740 | + | |
| 23741 | + | |
| 23742 | + | |
| 23743 | + | |
| 23744 | + | |
| 23745 | + | |
| 23746 | + | |
23717 | 23747 | | |
23718 | 23748 | | |
23719 | 23749 | | |
| |||
24647 | 24677 | | |
24648 | 24678 | | |
24649 | 24679 | | |
| 24680 | + | |
| 24681 | + | |
| 24682 | + | |
| 24683 | + | |
| 24684 | + | |
| 24685 | + | |
| 24686 | + | |
| 24687 | + | |
| 24688 | + | |
| 24689 | + | |
| 24690 | + | |
| 24691 | + | |
| 24692 | + | |
| 24693 | + | |
| 24694 | + | |
24650 | 24695 | | |
24651 | 24696 | | |
24652 | 24697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21581 | 21581 | | |
21582 | 21582 | | |
21583 | 21583 | | |
| 21584 | + | |
| 21585 | + | |
| 21586 | + | |
| 21587 | + | |
| 21588 | + | |
| 21589 | + | |
| 21590 | + | |
| 21591 | + | |
| 21592 | + | |
| 21593 | + | |
| 21594 | + | |
| 21595 | + | |
| 21596 | + | |
| 21597 | + | |
| 21598 | + | |
21584 | 21599 | | |
21585 | 21600 | | |
21586 | 21601 | | |
| |||
23714 | 23729 | | |
23715 | 23730 | | |
23716 | 23731 | | |
| 23732 | + | |
| 23733 | + | |
| 23734 | + | |
| 23735 | + | |
| 23736 | + | |
| 23737 | + | |
| 23738 | + | |
| 23739 | + | |
| 23740 | + | |
| 23741 | + | |
| 23742 | + | |
| 23743 | + | |
| 23744 | + | |
| 23745 | + | |
| 23746 | + | |
23717 | 23747 | | |
23718 | 23748 | | |
23719 | 23749 | | |
| |||
24647 | 24677 | | |
24648 | 24678 | | |
24649 | 24679 | | |
| 24680 | + | |
| 24681 | + | |
| 24682 | + | |
| 24683 | + | |
| 24684 | + | |
| 24685 | + | |
| 24686 | + | |
| 24687 | + | |
| 24688 | + | |
| 24689 | + | |
| 24690 | + | |
| 24691 | + | |
| 24692 | + | |
| 24693 | + | |
| 24694 | + | |
24650 | 24695 | | |
24651 | 24696 | | |
24652 | 24697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24051 | 24051 | | |
24052 | 24052 | | |
24053 | 24053 | | |
| 24054 | + | |
| 24055 | + | |
| 24056 | + | |
| 24057 | + | |
| 24058 | + | |
| 24059 | + | |
| 24060 | + | |
| 24061 | + | |
| 24062 | + | |
| 24063 | + | |
24054 | 24064 | | |
24055 | 24065 | | |
24056 | 24066 | | |
| |||
25220 | 25230 | | |
25221 | 25231 | | |
25222 | 25232 | | |
| 25233 | + | |
| 25234 | + | |
| 25235 | + | |
| 25236 | + | |
| 25237 | + | |
| 25238 | + | |
| 25239 | + | |
| 25240 | + | |
| 25241 | + | |
| 25242 | + | |
25223 | 25243 | | |
25224 | 25244 | | |
25225 | 25245 | | |
| |||
25851 | 25871 | | |
25852 | 25872 | | |
25853 | 25873 | | |
| 25874 | + | |
| 25875 | + | |
| 25876 | + | |
| 25877 | + | |
| 25878 | + | |
| 25879 | + | |
| 25880 | + | |
| 25881 | + | |
| 25882 | + | |
| 25883 | + | |
25854 | 25884 | | |
25855 | 25885 | | |
25856 | 25886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26293 | 26293 | | |
26294 | 26294 | | |
26295 | 26295 | | |
| 26296 | + | |
| 26297 | + | |
| 26298 | + | |
| 26299 | + | |
| 26300 | + | |
| 26301 | + | |
| 26302 | + | |
| 26303 | + | |
| 26304 | + | |
| 26305 | + | |
26296 | 26306 | | |
26297 | 26307 | | |
26298 | 26308 | | |
| |||
27462 | 27472 | | |
27463 | 27473 | | |
27464 | 27474 | | |
| 27475 | + | |
| 27476 | + | |
| 27477 | + | |
| 27478 | + | |
| 27479 | + | |
| 27480 | + | |
| 27481 | + | |
| 27482 | + | |
| 27483 | + | |
| 27484 | + | |
27465 | 27485 | | |
27466 | 27486 | | |
27467 | 27487 | | |
| |||
28093 | 28113 | | |
28094 | 28114 | | |
28095 | 28115 | | |
| 28116 | + | |
| 28117 | + | |
| 28118 | + | |
| 28119 | + | |
| 28120 | + | |
| 28121 | + | |
| 28122 | + | |
| 28123 | + | |
| 28124 | + | |
| 28125 | + | |
28096 | 28126 | | |
28097 | 28127 | | |
28098 | 28128 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
336 | 341 | | |
337 | 342 | | |
338 | 343 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | | - | |
174 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | | - | |
199 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| |||
Lines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | | - | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments