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
```shell | |
LB_PARSE='parse regex "(?P<type>[^\s]*) (?P<time>[^\s]*) (?P<elb>[^\s]*) (?P<client>[^\s]*) (?P<target>[^\s]*) (?P<request_processing_time>[^\s]*) (?P<target_processing_time>[^\s]*) (?P<response_processing_time>[^\s]*) (?P<elb_status_code>[^\s]*) (?P<target_status_code>[^\s]*) (?P<received_bytes>[^\s]*) (?P<sent_bytes>[^\s]*) (?P<request>\"[^\"]*\") (?P<user_agent>\"[^\"]*\") (?P<ssl_cipher>[^\s]*) (?P<ssl_protocol>[^\s]*) (?P<target_group_arn>[^\s]*) (?P<trace_id>\"[^\"]*\") (?P<domain_name>\"[^\"]*\") (?P<chosen_cert_arn>\"[^\"]*\") (?P<matched_rule_priority>[^\s]*) (?P<request_creation_time>[^\s]*) (?P<actions_executed>\"[^\"]*\") (?P<redirect_url>\"[^\"]*\") (?P<error_reason>\"[^\"]*\") (?P<target_port_list>\"[^\"]*\") (?P<target_status_code_list>\"[^\"]*\") (?P<classification>\"[^\"]*\") (?P<classification_reason>\"[^\"]*\") (?P<conn_trace_id>[^\s]*)"' | |
# usage example: | |
agrind -f lb.log "* | ${LB_PARSE} | where elb_status_code == 502 | count by target" | |
# Reference: | |
# * https://docs.aws.amazon. |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- yum install google-noto-emoji-color-fonts -y |
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
#!/bin/bash -ex | |
sed -i 's/#Port\s22/Port 8732/' /etc/ssh/sshd_config | |
systemctl restart sshd.service |