Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stackdriver MonitoringのAlert設定はコード管理が可能か/Stackd...
Search
Ka
January 17, 2019
Technology
5
980
Stackdriver MonitoringのAlert設定はコード管理が可能か/Stackdriver Alert coding
GCPUG Tokyo Stackdriver
LT枠
15/1/2019
Ka
January 17, 2019
Tweet
Share
Other Decks in Technology
See All in Technology
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
150
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
600
人工知能のための哲学塾 ニューロフィロソフィ篇 第零夜 「ニューロフィロソフィとは何か?」
miyayou
0
390
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
720
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
60k
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
320
コールドスタンバイ構成でCDは可能か
hiramax
0
130
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
旬のブリと旬の技術で楽しむ AI エージェント設計開発レシピ
chack411
1
130
産業的変化も組織的変化も乗り越えられるチームへの成長 〜チームの変化から見出す明るい未来〜
kakehashi
PRO
1
380
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
AI: The stuff that nobody shows you
jnunemaker
PRO
1
160
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
34
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
76
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
220
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
110
Art, The Web, and Tiny UX
lynnandtonic
304
21k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
1
160
Heart Work Chapter 1 - Part 1
lfama
PRO
4
35k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
GitHub's CSS Performance
jonrohan
1032
470k
Transcript
Stackdriver Monitoringの Alert設定はコード管理が可能か 株式会社リクルートライフスタイル 吉⽥ 和弘 2019年1⽉15⽇ GCPUG Tokyo Stackdriver
Day
⾃⼰紹介 吉⽥ 和弘 所属 : 株式会社リクルートライフスタイル Airメイト SREチーム GCP歴 :
ちょうど2年 趣味 : スノーボード、餃⼦
担当プロダクト ・飲⾷店経営サジェスト ・店舗の集客、売上から⽇報まで 店舗経営をサポート ・AirレジなどのAirシリーズの1つ など
担当プロダクト 技術的特徴 ・アプリ部分はGAEをフル活⽤ ・監視は Stackdriver Monitoringを利⽤ ・Stackdriverは他にも Trace, Logging, Error
Reporting などを活⽤
本題
突然ですが... 監視アラートの設定って ちゃんと管理していますか?
アラート設定の管理 ドキュメントで監視設定を定義して 設定は⼿動で⾏っているところが 多いのではないでしょうか? 実は我々もそうでした
アラート設定の管理 抱えていた課題 1. 多くのGCPサービスを利⽤しているので 監視設定が複雑 構成図の⼀部を抜粋
アラート設定の管理 抱えていた課題 2. 絶賛開発継続中なので 監視設定の追加、変更が度々発⽣する ・その度に⼿動で変更作業 ・2⼈でクロスチェック ・1つ,2つなら⼿動でもいいが⼤量に変更したいときは地獄
アラート設定の管理 抱えていた課題 3. 「このアラート設定って 前からこうだっけ?」問題 ・stackdriver側で変更⽇時はとっているが どこが変更されたのか ・いつからその設定だったのか
アラート設定の管理 アラート設定もコード化もしてちゃんと管理しよう
アラート設定の管理(検討) ・Cloud Deployment Manager →Stackdriver⾮対応
アラート設定の管理(検討) ・gcloudコマンド or API ・gcloudコマンド ・API 公式ドキュメント: バックアップ https://cloud.google.com/monitoring/alerts/using-alerting- api?authuser=3&hl=ja#api-backup-policies
リストア https://cloud.google.com/monitoring/alerts/using-alerting- api?authuser=3&hl=ja#api-restore-policies $ gcloud alpha monitoring policies create --policy-from-file $ gcloud alpha monitoring policies update --policy-from-file
アラート設定の管理(検討) ・gcloudコマンド or API →出来そう! けどそもそも設定ファイルをYAML or JSONで管理するの⾟い (1環境あたり1000⾏over) 何度も同じこと書かないといけない
アラート設定の管理(検討) ・Terraform ・2018年12⽉にTerraformがStackdriver Alertに対応 ・変数が使えるのでコード量が減らせる ・もともと他のGCPリソースも Terraformで管理していたので学習コスト低 ・GCPの他リソースと 同じデプロイパイプラインにのせられる
アラート設定の管理(検討)
アラート設定の管理(結論) Stackdriver Monitoringの Alert設定はコード管理することが可能 その場合はTerraformなどのサードパーティツールを 利⽤したほうが運⽤性は⾼くなる
注意点 ただしアラート設定はパラメータ数が多いので 他のGCPリソースと⽐べてコード化が複雑になる →管理するアラートが少ないor変更があまり発⽣しないケース では⼿動で管理するのもアリ。 運⽤コストに⾒合っているかが⼤切。
まとめ ・Stackdriver Monitoringのアラート設定を コード化して管理していくことは可能 ・gcloudコマンドやAPIでもできるが運⽤⾯考えると サードパーティツール使うのが良さそう ・アラート設定はパラメータが多いのでコードで 管理していくのは楽ではない →変更が少ないシステムの場合は ⼿動管理の⽅が幸せかも
最後に
最後に Stackdriver Monitoring Alertの設定画⾯ 前のほうが ⾒やすかったと思うのは 私だけではないはず...
ありがとうございました