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

Correct query schema for ELB mview generation #1196

Merged
merged 27 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
283d663
Switch heading types on setup page
Swiddis Oct 17, 2023
d230445
Merge remote-tracking branch 'upstream/main' into new-headers
Swiddis Oct 19, 2023
55357df
Add alb and nginx create table queries
Swiddis Oct 23, 2023
900c02d
Merge remote-tracking branch 'upstream/main' into integ-queries
Swiddis Oct 23, 2023
725a4b4
Switch from toast to callout for set up failures
Swiddis Oct 23, 2023
75d4510
Fix label selection for truncated labels
Swiddis Oct 23, 2023
f89bc70
Fix button color
Swiddis Oct 23, 2023
a83df4c
Fix tests
Swiddis Oct 23, 2023
3c30aba
Remove loading progress bar
Swiddis Oct 23, 2023
78fa19c
Remove unused imports
Swiddis Oct 23, 2023
9f13cf0
Refactor labels to make distinctions more semantically useful
Swiddis Oct 23, 2023
08dfb97
Merge remote-tracking branch 'upstream/main' into integ-loading
Swiddis Oct 23, 2023
f9a397d
Merge branch 'integ-loading' into integ-tags
Swiddis Oct 23, 2023
2c048e8
Merge branch 'integ-tags' into integ-queries
Swiddis Oct 23, 2023
1a01617
Add running queries for ELB integration
Swiddis Oct 26, 2023
47cc88b
Update tests
Swiddis Oct 26, 2023
e7ffde6
Improve error handling for integration creation
Swiddis Oct 26, 2023
385db93
Merge remote-tracking branch 'upstream/main' into integ-queries
Swiddis Oct 26, 2023
23cd257
Resolve missed merge
Swiddis Oct 26, 2023
dba790b
Fix another missed merge marker
Swiddis Oct 26, 2023
744e7b3
Remove buggy table from nginx
Swiddis Oct 26, 2023
08867b5
Improve validation for integration setup
Swiddis Oct 26, 2023
c337aee
Make create flow actually use new field
Swiddis Oct 26, 2023
1f28a3c
Add onblur check to validation for s3 link
Swiddis Oct 26, 2023
0c266a6
Update queries for parsing raw logs
Swiddis Oct 27, 2023
bf1b7d7
Fix mview format
Swiddis Oct 27, 2023
bc581e1
Merge remote-tracking branch 'upstream/main' into correct-query-schema
Swiddis Oct 27, 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
1 change: 0 additions & 1 deletion public/services/requests/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { CoreStart } from '../../../../../src/core/public';
import { DirectQueryRequest } from '../../../common/types/explorer';


export class SQLService {
private http;
constructor(http: CoreStart['http']) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
CREATE MATERIALIZED VIEW
{table_name}_mview AS
SELECT
type as `aws.elb.elb_type`,
time as `@timestamp`,
elb as `aws.elb.elb_name`,
split_part(client_ip, ':', 1) as `aws.elb.client.ip`,
split_part(client_ip, ':', 2) as `aws.elb.client.port`,
split_part(target_ip, ':', 1) as `aws.elb.target.ip`,
split_part(target_ip, ':', 2) as `aws.elb.target.port`,
request_processing_time as `aws.elb.request_processing_time`,
target_processing_time as `aws.elb.target_processing_time`,
response_processing_time as `aws.elb.response_processing_time`,
elb_status_code as `aws.elb.elb_status_code`,
target_status_code as `aws.elb.target_status_code`,
received_bytes as `aws.elb.received_bytes`,
sent_bytes as `aws.elb.sent_bytes`,
split_part(request, ' ', 1) as `http.request.method`,
split_part(request, ' ', 2) as `url.full`,
split_part(request, ' ', 3) as `url.schema`,
user_agent as `http.user_agent.name`,
ssl_cipher as `aws.elb.ssl_cipher`,
ssl_protocol as `aws.elb.ssl_protocol`,
target_group_arn as `aws.elb.target_group_arn`,
trace_id as `traceId`,
domain_name as `url.domain`,
chosen_cert_arn as `aws.elb.chosen_cert_arn`,
matched_rule_priority as `aws.elb.matched_rule_priority`,
request_creation_time as `aws.elb.request_creation_time`,
actions_executed as `aws.elb.actions_executed`,
redirect_url as `aws.elb.redirect_url`,
lambda_error_reason as `aws.elb.lambda_error_reason`,
target_port_list as `aws.elb.target_port_list`,
target_status_code_list as `aws.elb.target_status_code_list`,
classification as `aws.elb.classification`,
classification_reason as `aws.elb.classification_reason`
FROM
{table_name};
CREATE MATERIALIZED VIEW {table_name}_mview AS
SELECT
type as `aws.elb.elb_type`,
time as `@timestamp`,
elb as `aws.elb.elb_name`,
split_part (client_ip, ':', 1) as `communication.source.ip`,
split_part (client_ip, ':', 2) as `communication.source.port`,
split_part (target_ip, ':', 1) as `communication.destination.ip`,
split_part (target_ip, ':', 2) as `communication.destination.port`,
request_processing_time as `aws.elb.request_processing_time`,
target_processing_time as `aws.elb.target_processing_time`,
response_processing_time as `aws.elb.response_processing_time`,
elb_status_code as `http.response.status_code`,
target_status_code as `aws.elb.target_status_code`,
received_bytes as `aws.elb.received_bytes`,
sent_bytes as `aws.elb.sent_bytes`,
split_part (request, ' ', 1) as `http.request.method`,
split_part (request, ' ', 2) as `url.full`,
parse_url (split_part (request, ' ', 2), 'HOST') as `url.domain`,
parse_url (split_part (request, ' ', 2), 'PATH') as `url.path`,
split_part (request, ' ', 3) as `url.schema`,
request AS `http.request.body.content`,
user_agent as `http.user_agent.original`,
user_agent as `http.user_agent.name`,
ssl_cipher as `aws.elb.ssl_cipher`,
ssl_protocol as `aws.elb.ssl_protocol`,
split_part (target_group_arn, ':', 4) as `cloud.region`,
split_part (target_group_arn, ':', 5) as `cloud.account.id`,
trace_id as `traceId`,
chosen_cert_arn as `aws.elb.chosen_cert_arn`,
matched_rule_priority as `aws.elb.matched_rule_priority`,
request_creation_time as `aws.elb.request_creation_time`,
actions_executed as `aws.elb.actions_executed`,
redirect_url as `aws.elb.redirect_url`,
lambda_error_reason as `aws.elb.lambda_error_reason`,
target_port_list as `aws.elb.target_port_list`,
target_status_code_list as `aws.elb.target_status_code_list`,
classification as `aws.elb.classification`,
classification_reason as `aws.elb.classification_reason`
FROM
{table_name};
Loading