Skip to content

Instantly share code, notes, and snippets.

View yicr's full-sized avatar
😆

Yicr yicr

😆
View GitHub Profile

cdk deploy --all すると cdk.context.json が更新されるので、追加してpushする。

"Retry": [
  {
    "ErrorEquals": [
      //"States.TimeOut",
      "ECS.ServerException",
      "ECS.AmazonECSException",
 "ECS.SdkClientException"

AWS : CloudWatch Logs Insight / Parse Count Http Status Code from Apache Log.

Parse & count http code 2xx

ログをパースしてステータスコードが2XXなログをカウントする。

parse '* - * [*] "* * *" * * * *' as host, identity, dateTimeString, httpVerb, url, protocol, statusCode, bytes, Referer, UserAgent
| sort dateTimeString desc
| filter statusCode like /(2\d\d)/

標準搭載のmysqlslapを使って負荷テスト。

mysqlslap -u <username> -p -h <hostname> \
--engine=innodb \
--concurrency=300 \
--iterations=30 \
--auto-generate-sql \

13. Install libraries, migrations, etc

cd /home/git/gitlab
sudo -u git -H bundle install --no-deployment --without development test mysql aws kerberos
$ curl example.com -x http://<auth-username>:<auth-password>@<proxy-host>:<proxy-port>
export http_proxy=http://username:password@192.168.1.1:3214
export https_proxy=http://username:password@192.168.1.1:3214

公開鍵の情報(長さ、種別、指紋、コメント)を確認する。

$ ssh-keygen -l -f .ssh/authorized_keys
2048 SHA256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA comment1 (RSA)
2048 SHA256:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB comment2 (RSA)
2048 SHA256:CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC comment3 (RSA)
2048 SHA256:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD comment4 (RSA)

Firehose invoke transform lambda function error fixed.

Access was denied. Ensure that the access policy allows access to the Lambda function.

{
  "errorCode":"Lambda.InvokeAccessDenied",
  "errorMessage":"Access was denied. Ensure that the access policy allows access to the Lambda function."
}

ファイルサイズを大きい順に並べて表示。

$ ls -lS
合計 220M
-rw-r--r-- 1 apache apache  30M  6月 24 14:07 200624140734_9275f57fc0c3b8a2f87e46ced2fb6d82.xlsx
-rw-r--r-- 1 apache apache  30M  6月 25 10:10 200625101055_9275f57fc0c3b8a2f87e46ced2fb6d82.xlsx
-rw-r--r-- 1 apache apache  30M  6月 24 15:35 200624153519_9275f57fc0c3b8a2f87e46ced2fb6d82.xlsx
-rw-r--r-- 1 apache apache 11M 6月 29 17:24 200629172439_main20200629123923.txt
console.log(typeof null);

object