From 52567acabbd05518be783af34ba2635728c9dbe4 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 9 Aug 2023 13:44:19 -0700 Subject: [PATCH] Apply Apache updates from main on 2.9 (#876) Signed-off-by: Simeon Widdis --- .../repository/apache/apache-1.0.0.json | 6 +- .../schemas/logs_apache-1.0.0.mapping.json | 242 ++++++++++++++++++ 2 files changed, 245 insertions(+), 3 deletions(-) create mode 100644 server/adaptors/integrations/__data__/repository/apache/schemas/logs_apache-1.0.0.mapping.json diff --git a/server/adaptors/integrations/__data__/repository/apache/apache-1.0.0.json b/server/adaptors/integrations/__data__/repository/apache/apache-1.0.0.json index f94be225e3..c8c90977ce 100644 --- a/server/adaptors/integrations/__data__/repository/apache/apache-1.0.0.json +++ b/server/adaptors/integrations/__data__/repository/apache/apache-1.0.0.json @@ -4,7 +4,7 @@ "displayName": "Apache Dashboard", "description": "Apache web logs collector", "license": "Apache-2.0", - "type": "logs", + "type": "logs_apache", "author": "OpenSearch", "sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/apache/info", "statics": { @@ -29,7 +29,7 @@ "version": "1.0.0" }, { - "name": "logs", + "name": "logs_apache", "version": "1.0.0" } ], @@ -42,4 +42,4 @@ "sampleData": { "path": "sample.json" } -} \ No newline at end of file +} diff --git a/server/adaptors/integrations/__data__/repository/apache/schemas/logs_apache-1.0.0.mapping.json b/server/adaptors/integrations/__data__/repository/apache/schemas/logs_apache-1.0.0.mapping.json new file mode 100644 index 0000000000..cada132ea0 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/apache/schemas/logs_apache-1.0.0.mapping.json @@ -0,0 +1,242 @@ +{ + "index_patterns": [ + "ss4o_logs-apache-*" + ], + "data_stream": {}, + "template": { + "aliases": { + "logs-apache": {} + }, + "mappings": { + "_meta": { + "version": "1.0.0", + "catalog": "observability", + "type": "logs", + "component": "log", + "correlations": [ + { + "field": "spanId", + "foreign-schema": "traces", + "foreign-field": "spanId" + }, + { + "field": "traceId", + "foreign-schema": "traces", + "foreign-field": "traceId" + } + ] + }, + "_source": { + "enabled": true + }, + "dynamic_templates": [ + { + "resources_map": { + "mapping": { + "type": "keyword" + }, + "path_match": "resource.*" + } + }, + { + "attributes_map": { + "mapping": { + "type": "keyword" + }, + "path_match": "attributes.*" + } + }, + { + "instrumentation_scope_attributes_map": { + "mapping": { + "type": "keyword" + }, + "path_match": "instrumentationScope.attributes.*" + } + } + ], + "properties": { + "severity": { + "properties": { + "number": { + "type": "long" + }, + "text": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "attributes": { + "type": "object", + "properties": { + "data_stream": { + "properties": { + "dataset": { + "ignore_above": 128, + "type": "keyword" + }, + "namespace": { + "ignore_above": 128, + "type": "keyword" + }, + "type": { + "ignore_above": 56, + "type": "keyword" + } + } + } + } + }, + "body": { + "type": "text" + }, + "@timestamp": { + "type": "date" + }, + "observedTimestamp": { + "type": "date" + }, + "observerTime": { + "type": "alias", + "path": "observedTimestamp" + }, + "traceId": { + "ignore_above": 256, + "type": "keyword" + }, + "spanId": { + "ignore_above": 256, + "type": "keyword" + }, + "schemaUrl": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "instrumentationScope": { + "properties": { + "name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 128 + } + } + }, + "version": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "dropped_attributes_count": { + "type": "integer" + }, + "schemaUrl": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "event": { + "properties": { + "domain": { + "ignore_above": 256, + "type": "keyword" + }, + "name": { + "ignore_above": 256, + "type": "keyword" + }, + "source": { + "ignore_above": 256, + "type": "keyword" + }, + "category": { + "ignore_above": 256, + "type": "keyword" + }, + "type": { + "ignore_above": 256, + "type": "keyword" + }, + "kind": { + "ignore_above": 256, + "type": "keyword" + }, + "result": { + "ignore_above": 256, + "type": "keyword" + }, + "exception": { + "properties": { + "message": { + "ignore_above": 1024, + "type": "keyword" + }, + "type": { + "ignore_above": 256, + "type": "keyword" + }, + "stacktrace": { + "type": "text" + } + } + } + } + } + } + }, + "settings": { + "index": { + "mapping": { + "total_fields": { + "limit": 10000 + } + }, + "refresh_interval": "5s" + } + } + }, + "composed_of": [ + "communication", + "http" + ], + "version": 1, + "_meta": { + "description": "Simple Schema For Observability", + "catalog": "observability", + "type": "logs", + "correlations": [ + { + "field": "spanId", + "foreign-schema": "traces", + "foreign-field": "spanId" + }, + { + "field": "traceId", + "foreign-schema": "traces", + "foreign-field": "traceId" + } + ] + } +} \ No newline at end of file