Commit ab6f7c6
[Fleet] Create API to report status of integrations synchronization (elastic#216178)
Closes elastic#192363
## Summary
Add endpoint that compares integrations installed on remote cluster with
integrations in ccr index `fleet-synced-integrations-ccr-<outputId>`.
Feature flag: `enableSyncIntegrationsOnRemote`
- Use the [ccr info
api](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html)
to check that the ccr index is active
- Compare the content of the two indices and report the sync status for
each integration:
```
GET kbn:/api/fleet/remote_synced_integrations/status
{
"integrations": [
{
"package_name": "akamai",
"package_version": "2.28.0",
"updated_at": "2025-03-27T10:29:52.485Z",
"sync_status": true
},
{
"package_name": "auth0",
"package_version": "1.21.0",
"updated_at": "2025-03-26T12:06:26.268Z",
"sync_status": false,
"error": "Installation status: not_installed"
},
]
```
- Check that the integrations have custom assets and report their sync
status (follow up of elastic#215504)
### Testing
Setup local env with the guide added in dev_docs
([preview](https://github.com/elastic/kibana/blob/b438a719ee34d0dfb19a7a6cbbafc616936581bb/x-pack/platform/plugins/shared/fleet/dev_docs/local_setup/remote_clusters_ccr.md))
- Install some integrations on local cluster, wait that they are synced
on remote
- From remote cluster dev tools, run
```
GET kbn:/api/fleet/remote_synced_integrations/status
```
- To verify that custom assets are synced choose an integration, for
instance `system`
- From the package policy select a var, advanced options and add a
custom mapping and a custom pipeline. In my example I used `system`
<img width="1195" alt="Screenshot 2025-04-01 at 11 18 40"
src="https://github.com/user-attachments/assets/c339d6f0-4404-4e9b-b489-7b37977f201b"
/>
- Run the endpoint again and you should see the status of custom assets
too:
```
{
"integrations": [
{
"package_name": "akamai",
"package_version": "2.28.0",
"updated_at": "2025-03-27T10:29:52.485Z",
"sync_status": "completed"
},
{
"package_name": "elastic_agent",
"package_version": "2.2.0",
"updated_at": "2025-03-26T14:06:29.216Z",
"sync_status": "completed"
},
{
"package_name": "synthetics",
"package_version": "1.4.1",
"updated_at": "2025-03-26T14:06:31.909Z",
"sync_status": "completed"
},
{
"package_name": "system",
"package_version": "1.67.3",
"updated_at": "2025-03-28T10:08:00.602Z",
"sync_status": "completed"
}
],
"custom_assets": {
"component_template:logs-system.auth@custom": {
"name": "logs-system.auth@custom",
"type": "component_template",
"package_name": "system",
"package_version": "1.67.3",
"sync_status": "completed"
},
"ingest_pipeline:logs-system.auth@custom": {
"name": "logs-system.auth@custom",
"type": "ingest_pipeline",
"package_name": "system",
"package_version": "1.67.3",
"sync_status": "completed"
}
}
}
```
### Checklist
- [ ]
[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
---------
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>1 parent 87b3816 commit ab6f7c6
File tree
23 files changed
+2382
-45
lines changed- oas_docs
- output
23 files changed
+2382
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43640 | 43640 | | |
43641 | 43641 | | |
43642 | 43642 | | |
| 43643 | + | |
| 43644 | + | |
| 43645 | + | |
| 43646 | + | |
| 43647 | + | |
| 43648 | + | |
| 43649 | + | |
| 43650 | + | |
| 43651 | + | |
| 43652 | + | |
| 43653 | + | |
| 43654 | + | |
| 43655 | + | |
| 43656 | + | |
| 43657 | + | |
| 43658 | + | |
| 43659 | + | |
| 43660 | + | |
| 43661 | + | |
| 43662 | + | |
| 43663 | + | |
| 43664 | + | |
| 43665 | + | |
| 43666 | + | |
| 43667 | + | |
| 43668 | + | |
| 43669 | + | |
| 43670 | + | |
| 43671 | + | |
| 43672 | + | |
| 43673 | + | |
| 43674 | + | |
| 43675 | + | |
| 43676 | + | |
| 43677 | + | |
| 43678 | + | |
| 43679 | + | |
| 43680 | + | |
| 43681 | + | |
| 43682 | + | |
| 43683 | + | |
| 43684 | + | |
| 43685 | + | |
| 43686 | + | |
| 43687 | + | |
| 43688 | + | |
| 43689 | + | |
| 43690 | + | |
| 43691 | + | |
| 43692 | + | |
| 43693 | + | |
| 43694 | + | |
| 43695 | + | |
| 43696 | + | |
| 43697 | + | |
| 43698 | + | |
| 43699 | + | |
| 43700 | + | |
| 43701 | + | |
| 43702 | + | |
| 43703 | + | |
| 43704 | + | |
| 43705 | + | |
| 43706 | + | |
| 43707 | + | |
| 43708 | + | |
| 43709 | + | |
| 43710 | + | |
| 43711 | + | |
| 43712 | + | |
| 43713 | + | |
| 43714 | + | |
| 43715 | + | |
| 43716 | + | |
| 43717 | + | |
| 43718 | + | |
| 43719 | + | |
| 43720 | + | |
| 43721 | + | |
| 43722 | + | |
| 43723 | + | |
| 43724 | + | |
| 43725 | + | |
| 43726 | + | |
| 43727 | + | |
| 43728 | + | |
| 43729 | + | |
| 43730 | + | |
| 43731 | + | |
| 43732 | + | |
| 43733 | + | |
| 43734 | + | |
| 43735 | + | |
| 43736 | + | |
| 43737 | + | |
| 43738 | + | |
| 43739 | + | |
| 43740 | + | |
| 43741 | + | |
| 43742 | + | |
| 43743 | + | |
| 43744 | + | |
| 43745 | + | |
| 43746 | + | |
| 43747 | + | |
| 43748 | + | |
| 43749 | + | |
| 43750 | + | |
| 43751 | + | |
| 43752 | + | |
| 43753 | + | |
| 43754 | + | |
| 43755 | + | |
| 43756 | + | |
| 43757 | + | |
| 43758 | + | |
| 43759 | + | |
| 43760 | + | |
| 43761 | + | |
| 43762 | + | |
| 43763 | + | |
| 43764 | + | |
| 43765 | + | |
| 43766 | + | |
| 43767 | + | |
| 43768 | + | |
| 43769 | + | |
| 43770 | + | |
| 43771 | + | |
| 43772 | + | |
| 43773 | + | |
| 43774 | + | |
43643 | 43775 | | |
43644 | 43776 | | |
43645 | 43777 | | |
| |||
54354 | 54486 | | |
54355 | 54487 | | |
54356 | 54488 | | |
| 54489 | + | |
| 54490 | + | |
| 54491 | + | |
54357 | 54492 | | |
54358 | 54493 | | |
54359 | 54494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43640 | 43640 | | |
43641 | 43641 | | |
43642 | 43642 | | |
| 43643 | + | |
| 43644 | + | |
| 43645 | + | |
| 43646 | + | |
| 43647 | + | |
| 43648 | + | |
| 43649 | + | |
| 43650 | + | |
| 43651 | + | |
| 43652 | + | |
| 43653 | + | |
| 43654 | + | |
| 43655 | + | |
| 43656 | + | |
| 43657 | + | |
| 43658 | + | |
| 43659 | + | |
| 43660 | + | |
| 43661 | + | |
| 43662 | + | |
| 43663 | + | |
| 43664 | + | |
| 43665 | + | |
| 43666 | + | |
| 43667 | + | |
| 43668 | + | |
| 43669 | + | |
| 43670 | + | |
| 43671 | + | |
| 43672 | + | |
| 43673 | + | |
| 43674 | + | |
| 43675 | + | |
| 43676 | + | |
| 43677 | + | |
| 43678 | + | |
| 43679 | + | |
| 43680 | + | |
| 43681 | + | |
| 43682 | + | |
| 43683 | + | |
| 43684 | + | |
| 43685 | + | |
| 43686 | + | |
| 43687 | + | |
| 43688 | + | |
| 43689 | + | |
| 43690 | + | |
| 43691 | + | |
| 43692 | + | |
| 43693 | + | |
| 43694 | + | |
| 43695 | + | |
| 43696 | + | |
| 43697 | + | |
| 43698 | + | |
| 43699 | + | |
| 43700 | + | |
| 43701 | + | |
| 43702 | + | |
| 43703 | + | |
| 43704 | + | |
| 43705 | + | |
| 43706 | + | |
| 43707 | + | |
| 43708 | + | |
| 43709 | + | |
| 43710 | + | |
| 43711 | + | |
| 43712 | + | |
| 43713 | + | |
| 43714 | + | |
| 43715 | + | |
| 43716 | + | |
| 43717 | + | |
| 43718 | + | |
| 43719 | + | |
| 43720 | + | |
| 43721 | + | |
| 43722 | + | |
| 43723 | + | |
| 43724 | + | |
| 43725 | + | |
| 43726 | + | |
| 43727 | + | |
| 43728 | + | |
| 43729 | + | |
| 43730 | + | |
| 43731 | + | |
| 43732 | + | |
| 43733 | + | |
| 43734 | + | |
| 43735 | + | |
| 43736 | + | |
| 43737 | + | |
| 43738 | + | |
| 43739 | + | |
| 43740 | + | |
| 43741 | + | |
| 43742 | + | |
| 43743 | + | |
| 43744 | + | |
| 43745 | + | |
| 43746 | + | |
| 43747 | + | |
| 43748 | + | |
| 43749 | + | |
| 43750 | + | |
| 43751 | + | |
| 43752 | + | |
| 43753 | + | |
| 43754 | + | |
| 43755 | + | |
| 43756 | + | |
| 43757 | + | |
| 43758 | + | |
| 43759 | + | |
| 43760 | + | |
| 43761 | + | |
| 43762 | + | |
| 43763 | + | |
| 43764 | + | |
| 43765 | + | |
| 43766 | + | |
| 43767 | + | |
| 43768 | + | |
| 43769 | + | |
| 43770 | + | |
| 43771 | + | |
| 43772 | + | |
| 43773 | + | |
| 43774 | + | |
43643 | 43775 | | |
43644 | 43776 | | |
43645 | 43777 | | |
| |||
53945 | 54077 | | |
53946 | 54078 | | |
53947 | 54079 | | |
| 54080 | + | |
| 54081 | + | |
| 54082 | + | |
53948 | 54083 | | |
53949 | 54084 | | |
53950 | 54085 | | |
| |||
0 commit comments