Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS SNSでエラー通知させ、SLOについて考える
Search
melanmeg
July 08, 2024
Programming
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS SNSでエラー通知させ、SLOについて考える
以下、登壇資料。
JAWS-UG SRE支部 #9 初心者LT大会
https://jawsug-sre.connpass.com/event/321380/
melanmeg
July 08, 2024
More Decks by melanmeg
See All by melanmeg
今までアウトプットしてこなかった私が、今年からアウトプットを始めてわかったこと
melanmeg
3
370
コマンド一発で、本格的なおうちKubernetesを構築する
melanmeg
3
330
Keycloakの歴史とSSO
melanmeg
0
130
Other Decks in Programming
See All in Programming
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
110
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
260
Intent as Code
shoppingjaws
6
1.1k
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
160
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
300
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
690
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
280
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
7
4.9k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
新卒PdEのリアル
ryu1013
1
520
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
550
The Curse of the Amulet
leimatthew05
3
15k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
720
Abbi's Birthday
coloredviolet
4
10k
Making Projects Easy
brettharned
120
6.8k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Ruling the World: When Life Gets Gamed
codingconduct
0
360
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Transcript
AWS SNSでエラー通知させ、 SLOについて考える 2024/7/8 JAWS-UG SRE支部#9 初心者LT大会 @melanmeg
自己紹介 株式会社スカイウイル インフラエンジニア 3年目 山本 直矢 @melanmeg 趣味:ホロライブやツイキャスを見ること 業務:現在は、k6やKeycloakを触っている
アジェンダ • エラー通知の導入方法 • メトリクスフィルターとサブスクリプションフィルター • メトリクスフィルター構成 • サブスクリプションフィルター構成 •
SLOについて考える
{ "logs": { "logs_collected": { "files": { "collect_list": [ {
"file_path": "/var/log/syslog", "log_group_name": "/var/log/syslog", "log_stream_name": "{instance_id}", "timestamp_format": "%b %d %H:%M:%S" } ] } } } } ログ出力設定ファイル エラー通知の導入方法 1. 適当なVMを用意 2. ログドライバーをインストール 3. ログ出力設定 4. CloudWatch側でログを検知し、 メール通知する AWSでログの中からエラーログだけを 通知する監視基盤がほしい あるお客さんの要望
メトリクスフィルターとサブスクリプションフィルター メリット デメリット メトリクスフィルター アラームを組み合わせて メール通知可能 メール内容のカスタマイズができない サブスクリプション フィルター ログ内容をメールに含めることが可能
直接メール通知することができず、 Lambdaを経由するなどが必要 一旦、メトリクスフィルターを検証 今回「ERROR」という文字を含む場合アラート発生させる
• 長くてよく分からない… • ログ内容も欲しい… メトリクスフィルター構成 構成 メール内容
サブスクリプションフィルター構成 • パッと見で分かりやすい • ログ内容も分かる 構成 メール内容
Lambdaの整形コード ※EventBridgeによる死活監視も同様 Pythonで実装
SLOについて考える 引用:https://www.oreilly.co.jp/books/9784814400348/ エラーバジェット SLO SLI SLIとは、たとえばWebページを十分な速さで読み込めるかといった指標 1日に訪問者数が60,000人いて、59,982人が2秒以内にページを読み込んだことを計測できたとする ページ読み込みの99.97%が「良い速さ」であればユーザーは満足すると推測 59,982 60,000
= 99.97% SLO SLOとは? 信頼性スタック
改善案 現状エラーログはすべてメール通知 ⇒エラー通知が多すぎて、管理者が状況を把握しずらいと想定 ⇒特定の条件でアラートが発生したらLambda経由でメール通知する ※2023/12/22 CloudWatch AlermがLambdaをアラーム状態変更アクションとしてサポートされたよう 引用:https://aws.amazon.com/jp/about-aws/whats-new/2023/12/amazon-cloudwatch-alarms-lambda-change-action/ 定義を考えてみる •
SLI:リクエストが十分なだけ成功しているかどうか 仮定として、以下条件までを許容するとする。 期間:1ヶ月 合計リクエスト数:1,000,000 エラーログの総数:500 • SLO:99.95% • エラーバジェット:エラーログが500個まで 1ヶ月内にエラーログが 500個を超えたらアラートを発生
おわり