## Summary Closes https://github.com/elastic/ingest-dev/issues/4731 Added API to query agents per each version enrolled to an agent policy, including the count of agents that failed to upgrade to the target version. This API is used on the UI to calculate the status of auto upgrade status. - Complete status: agent count reaches or exceeds target percentage without upgrade failures - Not started status: 0 agents on target percentage - In progress status: agent count doesn't reach target percentage - Failed status: there is at least one agent in failed upgrade status on the target version Added click handler to navigate from the status to agent list. [UI Design](https://www.figma.com/design/ZH58ySPR1nhI3lRHrkds1t/%5BFleet%5D-Automatic-target-agent-version?node-id=2128-4286&p=f&t=3GvdUYkqdCAJj99q-0) ``` GET kbn:/api/fleet/agent_policies/{agentPolicyId}/auto_upgrade_agents_status { "currentVersions": [ { "version": "8.16.2", "agents": 1, "failedAgents": 0 }, { "version": "8.16.3", "agents": 0, "failedAgents": 1 } ], "totalAgents": 1 } ``` <img width="985" alt="image" src="https://github.com/user-attachments/assets/c4a40872-2fe7-48e9-ade5-fe2b36d06a0e" /> <img width="811" alt="image" src="https://github.com/user-attachments/assets/1cbbebb9-2c7b-4cb5-a57d-7a0388fd437e" /> <img width="805" alt="image" src="https://github.com/user-attachments/assets/be716b87-9b0f-4f16-ad05-a463169bee25" /> <img width="989" alt="image" src="https://github.com/user-attachments/assets/09745005-d5ed-4a80-8e7a-7c2df427d4ad" /> <img width="906" alt="image" src="https://github.com/user-attachments/assets/162d43aa-1bce-4dda-a5dd-91cb59636740" /> ### Checklist - [x] 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) - [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 scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
examples | ||
linters | ||
output | ||
overlays | ||
scripts | ||
bundle.json | ||
bundle.serverless.json | ||
kibana.info.serverless.yaml | ||
kibana.info.yaml | ||
makefile | ||
package-lock.json | ||
package.json | ||
README.md |
Kibana API reference documentation
Documentation about our OpenAPI bundling workflow and configuration. See Kibana's hosted stateful and serverless docs.
Workflow
The final goal of this workflow is to produce an OpenAPI bundle containing all Kibana's public APIs.
Step 0
OAS from Kibana's APIs are continuously extracted and captured in bundle.json
and bundle.serverless.json
as fully formed OAS documentation. See node scripts/capture_oas_snapshot --help
for more info.
These bundles form the basis of our OpenAPI bundles to which we append and layer extra information before publishing.
Step 1
Append pre-existing bundles not extracted from code using kbn-openapi-bundler
to produce the final resulting bundles.
To add more files into the final bundle, edit the appropriate oas_docs/scripts/merge*.js
files.
Step 2
Apply any final overalys to the document that might include examples or final tweaks (see the "Scripts" section for more details).
Scripts
The oas_docs/scripts
folder contains scripts that point to the source domain-specific OpenAPI bundles and specify additional parameters for producing the final output bundle. Currently, there are the following scripts:
-
merge_ess_oas.js
script produces production an output bundle for ESS -
merge_serverless_oas.js
script produces production an output bundle for Serverless
Output Kibana OpenAPI bundles
The oas_docs/output
folder contains the final resulting Kibana OpenAPI bundles
kibana.yaml
production ready ESS OpenAPI bundlekibana.serverless.yaml
production ready Serverless OpenAPI bundle
Bundling commands
Besides the scripts in the oas_docs/scripts
folder, there is an oas_docs/makefile
to simplify the workflow. Use make help
to see available commands.