-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from YANG-DB/nginx-integration-flint-s3
add nginx flint-s3 based integration support
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
integrations/observability/nginx/assets/tables/create_mv_nginx-1.0.0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE MATERIALIZED VIEW {table_name}_mview AS | ||
SELECT | ||
to_timestamp(trim(BOTH '[]' FROM concat(time_local_1, ' ', time_local_2)), 'dd/MMM/yyyy:HH:mm:ss Z') AS `@timestamp`, | ||
split_part (request, ' ', 1) as `http.request.method`, | ||
split_part (request, ' ', 2) as `http.url`, | ||
split_part (request, ' ', 3) as `http.flavor`, | ||
status AS `http.response.status_code`, | ||
body_bytes_sent AS `http.response.bytes`, | ||
'nginx.access' AS `event.domain` | ||
FROM {table_name} |
18 changes: 18 additions & 0 deletions
18
integrations/observability/nginx/assets/tables/create_table_ngine-1.0.0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CREATE EXTERNAL TABLE {table_name} ( | ||
remote_addr STRING, | ||
empty_col STRING, | ||
remote_user STRING, | ||
time_local_1 STRING, | ||
time_local_2 STRING, | ||
request STRING, | ||
status INT, | ||
body_bytes_sent INT, | ||
http_referer STRING, | ||
http_user_agent STRING, | ||
gzip_ratio STRING | ||
) USING csv | ||
LOCATION '{s3_bucket_location}' | ||
OPTIONS ( | ||
sep=' ', | ||
nullValue='-' | ||
) |
1 change: 1 addition & 0 deletions
1
integrations/observability/nginx/assets/tables/refresh_mv_nginx-1.0.0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
REFRESH MATERIALIZED VIEW {table_name}_mview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters