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
いい感じのシステムアラートをTwilioで
Search
kohtaro24
August 07, 2018
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
いい感じのシステムアラートをTwilioで
障害発生時のアラートをTwilioでいい感じに作った話
kohtaro24
August 07, 2018
More Decks by kohtaro24
See All by kohtaro24
コールセンターシステムを0から作った話
kohtaro24
1
100
Other Decks in Technology
See All in Technology
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
660
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
2
180
GCASアップデート(202607-202610)
techniczna
1
250
SREのためのFinOps入門
muziyoshiz
2
1.3k
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
130
生成AI時代のIAMのマニアックな話
takuros
6
3k
AWS Quick 入門 | 目指せ Quick マスター 01
inariku
PRO
2
300
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
640
Steering と Hook (チームの決まりを守らせる) | 目指せ Kiro マスター 06
inariku
PRO
2
100
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
130
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
320
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
330
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
470
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
560
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Side Projects
sachag
456
43k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
980
The agentic SEO stack - context over prompts
schlessera
0
1k
Transcript
いい感じのシステムアラートをTwilioで @kohtaro24
Twilio Developer Meetup 2018 Summer で話してきた内容です
自己紹介
皆さんは経験ありますか?
_人人人人人人_ > 突然の死 <  ̄Y^Y^Y^Y^Y^Y^ ̄
Webサービスは突然死ぬ • 突然トラフィックが激増したり • 突然インフラに障害が起きたり • 突然某有名番組でオフィスが紹介されて企業HPに前代未聞のアクセスが殺到した り
運用者が気づけない場合もある
深夜のサービス障害のネック • 障害に気づきにくい ◦ 寝ている場合もありうる • 誰かがすでに対応開始しているかもしれない ◦ 作業が競合することによる 二次災害の不安
• 個人で対処の判断が難しいケース ◦ 運用者が複数人いる場合など
既存事例① • 様々な監視ツールからの通知を集約できる SaaS • 通知ごとにエスカレーションパターンや手段を細かに設定できる ◦ 障害発生時にメール →15分後に認知されなければ電話など •
料金が割高 • 電話がグローバル発信
既存事例② https://github.com/ryotarai/waker • PagerdutyのOSS版的な立ち位置 • 通知ごとにエスカレーションパターンや電話 /SMS/メールなど手段を細かに設定できる • Twilio使ってる •
サーバーを自前で用意する必要がある
スモールチームには少々敷居が高い • エスカレーションじゃなくていきなり関係者全員通知でいい ◦ 深夜待機者を年中立てられるほど人員がいない ◦ 対応できる誰かがすぐ気づければいい ◦ とはいえ二次災害は防ぎたい •
コストもかけたくない ◦ 障害はそんなに起きない(はず)なので固定費かけたくはない ◦ とはいえ障害にはすぐ対応したい • 手軽にすぐ導入できると嬉しい
Twilio Functions(サーバレス) + Twilio Conference(電話会議)
health check tool Twilio Functions /alert /join_conference Webhook call call
• 監視ツールからのイベントを受けたら、登録された番号に対して一斉発信
Twilio Functions /join_conference health check tool /alert answerd answerd ConferenceRoom1
join • 障害に気づいた(電話に応答した)人からConferenceに突っ込んでいく • 以後は障害状況を報告しあったりして連携しながら対応を進める • 自分以外がConferenceに入ってこなければとりあえず一人で頑張る
Functionsで作成したWebhookURL https://hogehogehoge.twil.io/alert ?tels=+8170xxxxxxxx,+8180xxxxxxxx &message=サーバがお隠れになったよ 発信したい電話番号 (カンマ区切り) 着信応答時にSayで流すメッセージ
Demo うごくかな
None
None
例えばTwilioで
例えばcurlで curl --data tels=+8170xxxxxxxx,+8180xxxxxxxx --data message= サーバがお隠れになったよ “https://hogehogehoge.twil.io/alert”
health check tool /alert /join_conference Webhook call call 通知がメール限定ならSendGridのEvent Webhookとか
Mail
実現したこと • 障害に電話で気づける ◦ Push通知よりは(寝てても)気づけそう • 気づいた者同士で通話しながら対処できる ◦ 二次災害の防止 ◦
状況を共有しながら分担したり意思決定したりスムーズにやれる • (ほぼ)固定費ゼロ ◦ 固定費は発信元番号の維持費 ¥100のみ ◦ Functionsは毎月10,000アクセスまで無料 ◦ 通話費はかかるが障害が起きなければ 0! • Webhook URLを共有すれば他チームでも導入できる ◦ チームや通知固有の設定は Webhook URL parametersで完結 • 1時間程度の開発で実現できた
これで安心して寝れるぞ!