diff --git a/docs/changelog/142550.yaml b/docs/changelog/142550.yaml new file mode 100644 index 0000000000000..606f6822bb356 --- /dev/null +++ b/docs/changelog/142550.yaml @@ -0,0 +1,5 @@ +area: Infra/Plugins +issues: [] +pr: 142550 +summary: "[Fleet] Add OpAMP field mappings to fleet-agents" +type: enhancement 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 5b023af87d197..a710e0cebb9e2 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 @@ -27,6 +27,9 @@ }, "version": { "type": "keyword" + }, + "type": { + "type": "keyword" } } }, @@ -363,6 +366,61 @@ } } } + }, + "sequence_num": { + "type": "integer" + }, + "capabilities": { + "type": "keyword" + }, + "identifying_attributes": { + "type": "passthrough", + "priority": 10, + "properties": { + "service": { + "properties": { + "name": { + "type": "keyword" + }, + "version": { + "type": "keyword" + }, + "instance": { + "properties": { + "id": { + "type": "keyword" + } + } + } + } + } + } + }, + "non_identifying_attributes": { + "type": "passthrough", + "priority": 20, + "properties": { + "host": { + "properties": { + "arch": { + "type": "keyword" + }, + "name": { + "type": "keyword" + } + } + }, + "os": { + "properties": { + "type": { + "type": "keyword" + }, + "description": { + "type": "keyword" + } + } + } + } } } } 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 2b5dcc52b8d77..8f2023d29da83 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 @@ -77,7 +77,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 = 6; + private static final int FLEET_AGENTS_MAPPINGS_VERSION = 7; 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;