diff --git a/docs/changelog/134711.yaml b/docs/changelog/134711.yaml new file mode 100644 index 0000000000000..0789eeb4b69df --- /dev/null +++ b/docs/changelog/134711.yaml @@ -0,0 +1,5 @@ +pr: 134711 +summary: Add Reason field to elastic-agent upgrade details metadata +area: Infra/Plugins +type: enhancement +issues: [] diff --git a/x-pack/plugin/core/template-resources/src/main/resources/fleet-agents.json b/x-pack/plugin/core/template-resources/src/main/resources/fleet-agents.json index 4405b443859d5..fb2c840d72c8f 100644 --- a/x-pack/plugin/core/template-resources/src/main/resources/fleet-agents.json +++ b/x-pack/plugin/core/template-resources/src/main/resources/fleet-agents.json @@ -308,6 +308,15 @@ }, "retry_until": { "type": "date" + }, + "reason": { + "type":"text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 1024 + } + } } } } diff --git a/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java b/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java index c2a5fe1ebb782..65c207b3855c6 100644 --- a/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java +++ b/x-pack/plugin/fleet/src/main/java/org/elasticsearch/xpack/fleet/Fleet.java @@ -79,7 +79,7 @@ public class Fleet extends Plugin implements SystemIndexPlugin { private static final String MAPPING_VERSION_VARIABLE = "fleet.version"; private static final List ALLOWED_PRODUCTS = List.of("kibana", "fleet"); private static final int FLEET_ACTIONS_MAPPINGS_VERSION = 2; - private static final int FLEET_AGENTS_MAPPINGS_VERSION = 2; + private static final int FLEET_AGENTS_MAPPINGS_VERSION = 4; private static final int FLEET_ENROLLMENT_API_KEYS_MAPPINGS_VERSION = 3; private static final int FLEET_SECRETS_MAPPINGS_VERSION = 1; private static final int FLEET_POLICIES_MAPPINGS_VERSION = 2;