Skip to content

Commit

Permalink
update index template to avoid name collisions (#825)
Browse files Browse the repository at this point in the history
* update index template to avoid name collisions
align s3 component template with all the other integrations

Signed-off-by: YANGDB <yang.db.dev@gmail.com>

* update k8s integration

Signed-off-by: YANGDB <yang.db.dev@gmail.com>

---------

Signed-off-by: YANGDB <yang.db.dev@gmail.com>
  • Loading branch information
YANG-DB authored Aug 4, 2023
1 parent 7fca060 commit 1134382
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -29,7 +29,7 @@
"version": "1.0.0"
},
{
"name": "logs-apache",
"name": "logs_apache",
"version": "1.0.0"
}
],
Expand All @@ -42,4 +42,4 @@
"sampleData": {
"path": "sample.json"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "AWS ELB",
"description": "AWS Elastic Load Balancer collector",
"license": "Apache-2.0",
"type": "logs",
"type": "logs_elb",
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_elb/info",
"statics": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"version": "1.0.0"
},
{
"name": "logs-elb",
"name": "logs_elb",
"version": "1.0.0"
}
],
Expand All @@ -54,4 +54,4 @@
"sampleData": {
"path": "sample.json"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"index_patterns": [
"ss4o_logs-elb-*"
"ss4o_logs-aws_elb-*"
],
"data_stream": {},
"template": {
Expand Down Expand Up @@ -246,4 +246,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"version": "1.0.0"
},
{
"name": "s3",
"name": "aws_s3",
"version": "1.0.0"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ An integration is a bundle of pre-canned assets which are bundled togather in a
AWS VPC flow logs integration includes dashboards, visualisations, queries and an index mapping.

### Dashboards
The Dashboard uses the index alias `logs-vpc` for shortening the index name - be advised.

![](../static/dashboard1.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
{
"template": {
"mappings": {
"_meta": {
"version": "1.0.0",
"catalog": "observability",
"type": "logs",
"component": "aws_s3"
},
"properties": {
"aws": {
"type" : "object",
"properties": {
"s3": {
"type" : "object",
"properties": {
"bucket_owner": {
"type": "keyword"
},
"bucket": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"remote_ip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"requester": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"request_id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"operation": {
"type": "keyword"
},
"key": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"copy_source": {
"type": "keyword"
},
"upload_id": {
"type": "keyword"
},
"delete": {
"type": "keyword"
},
"part_number": {
"type": "keyword"
},
"request_uri": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"http_status": {
"type": "keyword"
},
"error_code": {
"type": "keyword"
},
"bytes_sent": {
"type": "long"
},
"object_size": {
"type": "long"
},
"total_time": {
"type": "integer"
},
"turn_around_time": {
"type": "integer"
},
"referrer": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"user_agent": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"version_id": {
"type": "keyword"
},
"host_id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"signature_version": {
"type": "keyword"
},
"cipher_suite": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"authentication_type": {
"type": "keyword"
},
"host_header": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"tls_version": {
"type": "keyword"
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"index_patterns": [
"ss4o_logs-*-*"
"ss4o_logs-aws_vpc-*"
],
"priority": 900,
"data_stream": {},
"template": {
"aliases": {
"logs-vpc": {}
},
"mappings": {
"_meta": {
"version": "1.0.0",
Expand Down Expand Up @@ -221,9 +224,9 @@
},
"composed_of": [
"aws_vpc_flow",
"aws_s3",
"cloud",
"communication",
"s3"
"communication"
],
"version": 1,
"_meta": {
Expand Down

This file was deleted.

0 comments on commit 1134382

Please sign in to comment.