From 2d0de875302b5c5d2560efa31c3af9d583a0b693 Mon Sep 17 00:00:00 2001 From: Wes Date: Wed, 17 Jul 2024 15:19:46 +0000 Subject: [PATCH] Add component templates for Fleet metrics --- ...ics-fleet_server.agent_status@package.json | 201 ++++++++++++++++++ ...s-fleet_server.agent_versions@package.json | 102 +++++++++ 2 files changed, 303 insertions(+) create mode 100644 salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_status@package.json create mode 100644 salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_versions@package.json diff --git a/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_status@package.json b/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_status@package.json new file mode 100644 index 000000000..8fc83f9cb --- /dev/null +++ b/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_status@package.json @@ -0,0 +1,201 @@ +{ + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "metrics" + }, + "default_pipeline": "metrics-fleet_server.agent_status-1.5.0", + "mapping": { + "total_fields": { + "limit": "1000" + } + } + } + }, + "mappings": { + "dynamic": false, + "_source": { + "mode": "synthetic" + }, + "properties": { + "cluster": { + "properties": { + "id": { + "time_series_dimension": true, + "type": "keyword" + } + } + }, + "fleet": { + "properties": { + "agents": { + "properties": { + "offline": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "total": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "updating": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "inactive": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "healthy": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "unhealthy": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "unenrolled": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "enrolled": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "unhealthy_reason": { + "properties": { + "output": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "input": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "other": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + } + } + }, + "upgrading_step": { + "properties": { + "rollback": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "requested": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "restarting": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "downloading": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "scheduled": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "extracting": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "replacing": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "failed": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "watching": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + } + } + } + } + } + } + }, + "agent": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "@timestamp": { + "ignore_malformed": false, + "type": "date" + }, + "data_stream": { + "properties": { + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + }, + "dataset": { + "type": "constant_keyword" + } + } + }, + "kibana": { + "properties": { + "uuid": { + "path": "agent.id", + "type": "alias" + }, + "version": { + "path": "agent.version", + "type": "alias" + } + } + } + } + } + }, + "_meta": { + "package": { + "name": "fleet_server" + }, + "managed_by": "fleet", + "managed": true + } +} diff --git a/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_versions@package.json b/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_versions@package.json new file mode 100644 index 000000000..af3323ee9 --- /dev/null +++ b/salt/elasticsearch/templates/component/elastic-agent/metrics-fleet_server.agent_versions@package.json @@ -0,0 +1,102 @@ +{ + "template": { + "settings": { + "index": { + "lifecycle": { + "name": "metrics" + }, + "default_pipeline": "metrics-fleet_server.agent_versions-1.5.0", + "mapping": { + "total_fields": { + "limit": "1000" + } + } + } + }, + "mappings": { + "dynamic": false, + "_source": { + "mode": "synthetic" + }, + "properties": { + "cluster": { + "properties": { + "id": { + "time_series_dimension": true, + "type": "keyword" + } + } + }, + "fleet": { + "properties": { + "agent": { + "properties": { + "count": { + "time_series_metric": "gauge", + "meta": {}, + "type": "long" + }, + "version": { + "time_series_dimension": true, + "type": "keyword" + } + } + } + } + }, + "agent": { + "properties": { + "id": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" + }, + "version": { + "ignore_above": 1024, + "type": "keyword" + } + } + }, + "@timestamp": { + "ignore_malformed": false, + "type": "date" + }, + "data_stream": { + "properties": { + "namespace": { + "type": "constant_keyword" + }, + "type": { + "type": "constant_keyword" + }, + "dataset": { + "type": "constant_keyword" + } + } + }, + "kibana": { + "properties": { + "uuid": { + "path": "agent.id", + "type": "alias" + }, + "version": { + "path": "agent.version", + "type": "alias" + } + } + } + } + } + }, + "_meta": { + "package": { + "name": "fleet_server" + }, + "managed_by": "fleet", + "managed": true + } +}