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
#!/usr/local/bin/node | |
# remove everything except the routes from your froc file | |
# remove leading whitespace and - | |
import { open, writeFile } from 'node:fs/promises'; | |
const source = await open('./offerpage.txt'); | |
const paths = []; | |
const prefix = "/offerpage-aws-preview" | |
const pathTemplate = { | |
"pattern": "/l7r-test/*", |
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
import { Stack, StackProps } from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
// import * as sqs from 'aws-cdk-lib/aws-sqs'; | |
import * as r53 from 'aws-cdk-lib/aws-route53'; | |
export class DnsTestStack extends Stack { | |
constructor(scope: Construct, id: string, props?: StackProps) { | |
super(scope, id, props); | |
const theZone = r53.HostedZone.fromLookup(this, 'AE-ZONE', { | |
domainName: 'everestate.ae', |
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
parse '* - - [*] "* * *" * * "*" "*" "*"' as host, dateTimeString, httpVerb, url, protocol, statusCode, bytes, referrer, agent, remoteAdress | |
| filter ispresent(url) | |
| filter agent not like /ELB-HealthChecker/ | |
#| filter statusCode = 499 | |
| sort @ingestionTime desc |
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
fields @message | |
| parse @message /(?<type>[^ ]*) (?<time>[^ ]*) (?<elb>[^ ]*) (?<client_ip>[^ ]*):(?<client_port>[0-9]*) (?<target_ip>[^ ]*)[:-](?<target_port>[0-9]*) (?<request_processing_time>[-.0-9]*) (?<target_processing_time>[-.0-9]*) (?<response_processing_time>[-.0-9]*) (?<elb_status_code>|[-0-9]*) (?<target_status_code>-|[-0-9]*) (?<received_bytes>[-0-9]*) (?<sent_bytes>[-0-9]*) \"(?<request_verb>[^ ]*) (?<request_url>[^ ]*) (?<request_proto>- |[^ ]*)\" \"(?<user_agent>[^\"]*)\" (?<ssl_cipher>[A-Z0-9-]+) (?<ssl_protocol>[A-Za-z0-9.-]*) (?<target_group_arn>[^ ]*) \"(?<trace_id>[^\"]*)\" \"(?<domain_name>[^\"]*)\" \"(?<chosen_cert_arn>[^\"]*)\" (?<matched_rule_priority>[-.0-9]*) (?<request_creation_time>[^ ]*) \"(?<actions_executed>[^\"]*)\" \"(?<redirect_url>[^\"]*)\"(?<lambda_error_reason>$| \"[^ ]*\")(?<rest>.*)/ | |
| display client_ip, request_url |