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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ka
January 17, 2019
Technology
990
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stackdriver MonitoringのAlert設定はコード管理が可能か/Stackdriver Alert coding
GCPUG Tokyo Stackdriver
LT枠
15/1/2019
Ka
January 17, 2019
Other Decks in Technology
See All in Technology
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
760
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
サイバーセキュリティ概論 / Introduction to Cybersecurity
ks91
PRO
0
170
データ基盤をDataformで整えた話 〜 開発環境を添えて 〜
takapy
0
130
チームで実践する AI-DLC 思考の軌跡を残すチェックポイント設計
belongadmin
0
3k
Agentic Web
dynamis
1
180
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
600
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
150
AgentGatewayを試してみたかった
tkikuchi
0
120
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
270
新しいVibe Codingと”自走”について
watany
5
120
EventBridge Connection
_kensh
5
660
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Design in an AI World
tapps
1
230
Designing for Performance
lara
611
70k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Building the Perfect Custom Keyboard
takai
2
790
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
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の設定画⾯ 前のほうが ⾒やすかったと思うのは 私だけではないはず...
ありがとうございました