Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alb s3 integration #1481

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e90e107
support creation of repository index as part of the plugin loading pr…
YANG-DB Mar 15, 2023
c357926
updated fluentbit comments according to PR review
YANG-DB Mar 15, 2023
c506ade
Merge remote-tracking branch 'origin/repository_setup' into repositor…
YANG-DB Mar 15, 2023
6dcbbc4
add samples for services.mapping setting up of pre-populated correlat…
YANG-DB Mar 15, 2023
0a6b8ae
Merge remote-tracking branch 'origin/repository_setup' into servicema…
YANG-DB Mar 20, 2023
6cd1cf6
append jaeger integration
YANG-DB Mar 20, 2023
18ccfa0
Merge remote-tracking branch 'origin/repository_setup' into servicema…
YANG-DB Mar 21, 2023
6d461ec
add ALB with s3 / spark integration
YANG-DB Mar 27, 2023
b0f54a9
adding additional schema catalog components
YANG-DB Mar 27, 2023
145a351
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Mar 28, 2023
3671851
add tables, mapping, index folder assets for Integration assets requi…
YANG-DB Mar 28, 2023
b4690b0
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Mar 29, 2023
62ae0e6
add _meta information to each catalog (index template , component tem…
YANG-DB Mar 29, 2023
976cc2c
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Mar 29, 2023
662db20
add awl_alb schema definition
YANG-DB Mar 29, 2023
8eef714
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Mar 31, 2023
f417ad9
fix $ref location of FK properties
YANG-DB Mar 31, 2023
1f0147d
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Mar 31, 2023
e7f7894
add correlation reference remarks
YANG-DB Mar 31, 2023
de5f9d0
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Apr 1, 2023
4b63bbf
update table / view / indices to required
YANG-DB Apr 1, 2023
53121a5
Merge remote-tracking branch 'origin/alb_s3_integration' into alb_s3_…
YANG-DB Apr 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,12 @@ And will result with :
}
```



#### running the swagger mock server as docker

One-liner docker command (assuming running from repository root):

```text
docker run -p 9200:4010 -v "$(pwd)/docs/API:/api" -v "$(pwd)/schema:/schema" --name integ-prism -t stoplight/prism mock -h 0.0.0.0 /api/swagger.yaml
```
403 changes: 403 additions & 0 deletions docs/API/swagger.yaml

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/Integration-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,14 @@ the current state of the integration:
]
}
```
The next screen shows the Integration assets status:

![Integration - assets - status](img/Integration-assets-status.png)


The next screen shows the maintenance issues:

![todo](...)
![Maintaining - issue](img/maintaining-issue.png)

Once all the issues are manually resolved by the User, the UX can continue the loading process by the next API
`PUT _integration/store/$instance_name/activate`
Expand All @@ -272,8 +277,6 @@ The loading assets phase will use the existing bulk load api for all the existin

The User can chery pick specific assets to load and use the next UX window for this purpose

![todo](...)

Using the next API
`PUT _integration/store/$instance_name/load`
```json
Expand Down
10 changes: 9 additions & 1 deletion docs/TableOfContent.md → docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
## Integrations Folder
## Integrations Documentation Table of Content

The integration repository contains the list of the supported catalogs ([Observability](../schema/observability/README.md) for example)

In addition, it also contains the list of [Integrations](../integrations/README.md) such as [Nginx](../integrations/nginx/info/README.md)

---
The next documents describe the user workflows, design and architecture of the project.

- [Integration introduction](Integrations.md)
- [Simple-Schema](Simple-schema.md)
- [Integration Structure](Integration-structure.md)
Expand Down
Binary file added docs/img/Integration-assets-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/maintaining-issue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions integrations/alb/assets/datasource/datasources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name" : "myspark",
"connector": "jdbc",
"properties" : {
"url" : "jdbc:hive2://spark-thrift:10000/default"
}
}
]
84 changes: 84 additions & 0 deletions integrations/alb/assets/display/alb-dashboard.ndjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"attributes": {
"title": "AWS ALB Logs Dashboard",
"hits": 0,
"description": "",
"panelsJSON": [
{
"gridData": {
"x": 0,
"y": 0,
"w": 24,
"h": 15,
"i": "1"
},
"version": "7.14.0",
"panelIndex": "1",
"embeddableConfig": {},
"panelRefName": "panel_0"
},
{
"gridData": {
"x": 24,
"y": 0,
"w": 24,
"h": 15,
"i": "2"
},
"version": "7.14.0",
"panelIndex": "2",
"embeddableConfig": {},
"panelRefName": "panel_1"
},
{
"gridData": {
"x": 0,
"y": 15,
"w": 48,
"h": 15,
"i": "3"
},
"version": "7.14.0",
"panelIndex": "3",
"embeddableConfig": {},
"panelRefName": "panel_2"
}
],
"optionsJSON": {
"hidePanelTitles": false,
"useMargins": true
},
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": {
"query": {
"language": "kuery",
"query": ""
},
"filter": []
}
}
},
"references": [
{
"name": "panel_0",
"type": "visualization",
"id": "visualization_id_1"
},
{
"name": "panel_1",
"type": "visualization",
"id": "visualization_id_2"
},
{
"name": "panel_2",
"type": "visualization",
"id": "visualization_id_3"
}
],
"id": "dashboard_id",
"type": "dashboard",
"updated_at": "2023-03-27T00:00:00.000Z",
"version": "WzAsMV0="
}
30 changes: 30 additions & 0 deletions integrations/alb/assets/index/alb_logs_metrics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"mappings" : {
"properties" : {
"count2xx" : {
"type" : "long"
},
"count4xx" : {
"type" : "long"
},
"count5xx" : {
"type" : "long"
},
"latencyInSec" : {
"type" : "float"
},
"timestamp" : {
"type" : "date"
},
"totalCount" : {
"type" : "long"
},
"totalReceivedBytes" : {
"type" : "long"
},
"totalSentBytes" : {
"type" : "long"
}
}
}
}
42 changes: 42 additions & 0 deletions integrations/alb/assets/index/alb_logs_raw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"mappings" : {
"properties" : {
"receivedBytes" : {
"type" : "long"
},
"requestUrl" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"requestVerb" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"sentBytes" : {
"type" : "long"
},
"statusCode" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"timestamp" : {
"type" : "date"
}
}
}
}
38 changes: 38 additions & 0 deletions integrations/alb/assets/table/alb_logs_temp.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
CREATE TABLE IF NOT EXISTS alb_logs_temp
(
type string,
time timestamp,
elb string,
client_ip string,
client_port int,
target_ip string,
target_port int,
request_processing_time double,
target_processing_time double,
response_processing_time double,
elb_status_code int,
target_status_code string,
received_bytes bigint,
sent_bytes bigint,
request_verb string,
request_url string,
request_proto string,
user_agent string,
ssl_cipher string,
ssl_protocol string,
target_group_arn string,
trace_id string,
domain_name string,
chosen_cert_arn string,
matched_rule_priority string,
request_creation_time string,
actions_executed string,
redirect_url string,
lambda_error_reason string,
target_port_list string,
target_status_code_list string,
classification string,
classification_reason string
)
USING PARQUET
LOCATION 's3a://xxx/'
14 changes: 14 additions & 0 deletions integrations/alb/assets/view/alb_logs_metrics.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE MATERIALIZED VIEW alb_logs_metrics
AS
SELECT
UNIX_MILLIS(window.start) AS timestamp,
COUNT(*) AS totalCount,
AVG(target_processing_time) FILTER(WHERE target_processing_time != -1) AS latencyInSec,
COUNT(*) FILTER(WHERE target_status_code LIKE '2__') AS count2xx,
COUNT(*) FILTER(WHERE target_status_code LIKE '4__') AS count4xx,
COUNT(*) FILTER(WHERE target_status_code LIKE '5__') AS count5xx,
SUM(received_bytes) AS totalReceivedBytes,
SUM(sent_bytes) AS totalSentBytes
FROM alb_logs_temp
WHERE client_ip = '10.212.10.101'
GROUP BY TUMBLE(time, '1 Minute');
11 changes: 11 additions & 0 deletions integrations/alb/assets/view/alb_logs_raw.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE MATERIALIZED VIEW alb_logs_raw
AS
SELECT
UNIX_MILLIS(time) AS timestamp,
request_verb AS requestVerb,
request_url AS requestUrl,
target_status_code AS statusCode,
received_bytes AS receivedBytes,
sent_bytes AS sentBytes
FROM alb_logs_temp
WHERE client_ip = '10.212.10.101'
35 changes: 35 additions & 0 deletions integrations/alb/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "alb_logs",
"version": {
"integ": "0.1.0",
"schema": "1.0.0",
"resource": "^2.6.0"
},
"description": "AWS ALB Integration",
"catalog": "observability",
"components": [
"http,communication,cloud,container,aws_elb"
],
"collection":[
{
"logs": [{
"info": "ALB logs",
"input_type":"logfile",
"dataset":"aws.alb",
"labels" :["aws","ALB"]
}]
},
{
"metrics": [{
"info": "ALB metrics signals ",
"input_type": "metrics",
"dataset": "alb.status",
"labels": ["metrics",""]
}]
}
],
"repo": {
"github": "https://github.com/opensearch-project/observability/tree/main/integrarions/alb"
}
}

Loading