forked from opensearch-project/dashboards-observability
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Flint queries for Apache Access integration (opensearch-project#1681
) * Add nginx integration Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Add VPC S3 integration Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Add basic apache integration based on nginx Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Add initial S3 integration Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Apply keyword changes to s3 Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Remove old S3 attempt Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Adapt apache query loading to new config format Signed-off-by: Simeon Widdis <sawiddis@amazon.com> * Remove old aws s3 attempt (again) Signed-off-by: Simeon Widdis <sawiddis@amazon.com> --------- Signed-off-by: Simeon Widdis <sawiddis@amazon.com> (cherry picked from commit bbcd3c1)
- Loading branch information
Showing
3 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
server/adaptors/integrations/__data__/repository/apache/assets/create_mv-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,16 @@ | ||
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`, | ||
'apache.access' AS `event.domain` | ||
FROM {table_name} | ||
WITH ( | ||
auto_refresh = 'true', | ||
checkpoint_location = '{s3_checkpoint_location}', | ||
watermark_delay = '1 Minute', | ||
extra_options = '{ "{table_name}": { "maxFilesPerTrigger": "10" }}' | ||
); |
17 changes: 17 additions & 0 deletions
17
server/adaptors/integrations/__data__/repository/apache/assets/create_table-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,17 @@ | ||
CREATE EXTERNAL TABLE IF NOT EXISTS {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 | ||
) USING csv | ||
LOCATION '{s3_bucket_location}' | ||
OPTIONS ( | ||
sep=' ', | ||
nullValue='-' | ||
) |