Commit 7092e79
authored
[Fleet] sync pipelines from package policy stream vars (#217834)
## Summary
Closes #206245
To test:
- enable feature flag `xpack.fleet.enableExperimental:
['enableSyncIntegrationsOnRemote']`
- Add `Custom Filestream Logs` integration and set `Ingest Pipeline` var
e.g. `filestream-pipeline1`
- Create Ingest Pipeline with the same name
- Wait a few minutes for the sync task to run, check that the ingest
pipeline appears in the sync index
- Set up a second cluster to enable CCR by following this guide:
https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/dev_docs/local_setup/remote_clusters_ccr.md
- Verify that the ingest pipeline is synced to the remote cluster
- Use a remote ES output as data output on the agent policy with the
filestream policy
- Enroll an agent to the agent policy in a multipass VM
- Verify that data is being ingested in the remote cluster to the
filestream dataset and the field in the pipeline is set
<img width="1105" alt="image"
src="https://github.com/user-attachments/assets/751b6f23-6ea7-4fbf-b6cc-fd441ca848e1"
/>
<img width="1591" alt="image"
src="https://github.com/user-attachments/assets/9ef159f3-f399-4d4e-8e57-ecdf52bf4f6f"
/>
```
GET fleet-synced-integrations/_search
{
"_index": "fleet-synced-integrations",
"_id": "fleet-synced-integrations",
"_score": 1,
"_source": {
"remote_es_hosts": [
{
"name": "remote1",
"hosts": [
"http://192.168.64.1:9200"
],
"sync_integrations": true
}
],
"integrations": [
],
"custom_assets": {
"ingest_pipeline:filestream-pipeline1": {
"type": "ingest_pipeline",
"name": "filestream-pipeline1",
"package_name": "filestream",
"package_version": "1.1.0",
"is_deleted": false,
"pipeline": {
"processors": [
{
"set": {
"field": "test_field",
"value": "value"
}
}
],
"version": 2
}
}
}
}
GET fleet-synced-integrations-ccr-main/_search
# same content should be in the ccr index
```
<img width="2545" alt="image"
src="https://github.com/user-attachments/assets/127e5e6e-cf7e-4549-817d-88df10f4f523"
/>
### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios1 parent 49ffc02 commit 7092e79
File tree
7 files changed
+319
-16
lines changed7 files changed
+319
-16
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
Lines changed: 57 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
447 | 457 | | |
448 | 458 | | |
449 | 459 | | |
| |||
464 | 474 | | |
465 | 475 | | |
466 | 476 | | |
| 477 | + | |
467 | 478 | | |
468 | 479 | | |
469 | 480 | | |
| |||
554 | 565 | | |
555 | 566 | | |
556 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
557 | 575 | | |
558 | 576 | | |
559 | 577 | | |
560 | 578 | | |
561 | 579 | | |
562 | | - | |
| 580 | + | |
563 | 581 | | |
564 | 582 | | |
565 | 583 | | |
| |||
571 | 589 | | |
572 | 590 | | |
573 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
574 | 597 | | |
575 | 598 | | |
576 | 599 | | |
| |||
642 | 665 | | |
643 | 666 | | |
644 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
645 | 675 | | |
646 | 676 | | |
647 | 677 | | |
| |||
677 | 707 | | |
678 | 708 | | |
679 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
680 | 721 | | |
681 | 722 | | |
682 | 723 | | |
| |||
760 | 801 | | |
761 | 802 | | |
762 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
763 | 811 | | |
764 | 812 | | |
765 | 813 | | |
| |||
784 | 832 | | |
785 | 833 | | |
786 | 834 | | |
| 835 | + | |
787 | 836 | | |
788 | 837 | | |
789 | 838 | | |
| |||
807 | 856 | | |
808 | 857 | | |
809 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
810 | 866 | | |
811 | 867 | | |
812 | 868 | | |
| |||
x-pack/platform/plugins/shared/fleet/server/tasks/sync_integrations/compare_synced_integrations.ts
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| |||
Lines changed: 143 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
9 | 23 | | |
10 | 24 | | |
11 | 25 | | |
| |||
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
57 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
60 | 78 | | |
| |||
102 | 120 | | |
103 | 121 | | |
104 | 122 | | |
| 123 | + | |
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
| |||
171 | 190 | | |
172 | 191 | | |
173 | 192 | | |
| 193 | + | |
174 | 194 | | |
175 | 195 | | |
176 | 196 | | |
| |||
218 | 238 | | |
219 | 239 | | |
220 | 240 | | |
| 241 | + | |
221 | 242 | | |
222 | 243 | | |
223 | 244 | | |
| |||
227 | 248 | | |
228 | 249 | | |
229 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
230 | 371 | | |
231 | 372 | | |
232 | 373 | | |
| |||
0 commit comments