Local blog for Japanese speaking developers
Firebase Realtime Database が Google Stackdriver Alerts をサポート
2018年4月10日火曜日
この記事は Tyler Rockwood、
ソフトウェア エンジニアによる The Firebase Blog の記事 "
Alert Alert! The Firebase Realtime Database now supports Google Stackdriver Alerts!
" を元に翻訳・加筆したものです。詳しくは元記事をご覧ください。
ダッシュボードはすばらしい機能です。でも、もしそれを確認していなければどうなるでしょう。トラフィックが急上昇したときや、1 つのデータベースに対する同時接続数の制限に達しそうなときに通知を受けられたら、すばらしいと思いませんか?大丈夫です。
Google Stackdriver Alerts
が対応してくれます。
昨年 12 月、
Firebase Realtime Database と Google Stackdriver
が統合され、強力な新しい指標を使ってダッシュボードやグラフを作成できるようになったことをお知らせしました。また、利用できる指標や、データベースのモニタリングやデバッグに役立つ手法について、
ドキュメント
に詳しい説明を掲載しました。このたび、Google Stackdriver Alerts で、これらすべてのデータに基づいたアクションを行えるようになりました。
特定の条件が満たされたときに特定のアクションを取るようにアラートを設定できます。たとえば、1 分以上にわたって
io/database_load
指標が 90% を超えた場合、エンジニアリング チームにメールを送ることができます。アラートにメモを含めることもできるので、まだ朝のコーヒーを飲み終えていない場合でも安心です。アラートを起動できる詳しい条件については、
条件の詳細について記載されたドキュメント
をご覧ください。
Google Stackdriver では、非常に多彩な条件を利用できるだけでなく、アラートの
手段
も選ぶことができます。無料プランでは、メールによる通知か、
Google Cloud Console モバイルアプリ
による通知を受けることができます。プレミアムプランでは、
PagerDuty
のインシデント作成や、
Slack Channel
へのメッセージ投稿も可能です。私が個人的に気に入っているプレミアム通知は、
Webhook
オプションです。これを使うと、Cloud Function をトリガーして問題の診断に役立てることもできます。先ほどの負荷の例でいえば、データベースの負荷が 100% に近づいた場合に Cloud Function を起動して
データベースのプロファイリングを行い
、その結果を Slack Channel に送ることができます。
Stackdriver でカスタム アラートを設定するのは簡単です。まず、
Stackdriver Monitoring Console
を開きます。アカウントの登録を終えて
[Alerting] > [Create a Policy]
に移動すると、次のようなパネルが表示されます。
このアラート ポリシーでは、1 分以上にわたってデータベースの使用率が 90% を超えた場合に、alerts@you.com にポリシーの名前と指定されたメモを含むメールを送るように設定しています。あとは、[Save Policy] ボタンを押すだけでアラートが有効化されます。
Reviewed by
Khanh LeViet - Developer Relations Team
コメントを投稿
ラベル
#DevFest16
1
#DevFest17
1
#hack4jp
3
A/B Testing
1
A4A
4
Actions on Google
10
Addy Osmani
1
ADK
2
AdMob
31
Ads
15
AdWords API
1
Agency
1
AIY
2
AIY Vision Kit
1
ALPN
1
AMP
57
AMP Cache
4
AMP for Email
1
AMP Story
2
amp-bind
1
AMPHTML Ads
1
Analytics
9
Andorid
10
Android
270
Android Auto
1
Android Design Support Library
1
Android Developer Story
4
Android Go
1
Android N
18
Android O
12
Android P
2
Android Pay
1
Android Security Year in Review
1
Android Studio
26
Android Support Library
4
Android Things
11
Android TV
10
Android Vitals
1
Android Wear
29
androidmarket
3
Angular
1
Angular 2
2
AngularJS
2
API
24
APIExpert
45
apk
2
app engine
23
App Indexing
7
App Invites
6
App Maker
1
AppCompat
2
Apps Script
11
aprilfool
4
AR
1
Architecture Components
4
ARCore
1
ArtTech
1
Associate Android Developer Certificate
1
Audio
6
Auth Code
1
Authentication
8
AuthSub
2
Autotrack
2
Awareness API
1
Beacons
6
BigQuery
9
Billing
1
BLE
4
Blink
1
Blockly
1
blogger
1
Brillo
1
Brotli
2
Budou
1
Calendar
3
Cardboard
4
Career
1
Case Study
1
Certificate
2
chrome
92
Chrome Custom Tab
1
Chrome Dev Summit
1
chrome extension
4
Chrome for Android
2
Chrome for iOS
2
Chrome OS
2
Chromebook
3
Chromecast
7
chromewebstore
6
Chromium
5
CLI
1
ClientLogin
3
Closure Compiler
1
Cloud
16
Cloud Firestore
2
Cloud Functions
8
Cloud Next
2
Cloud PubSub
1
Cloud Storage
1
Cloud Test Lab
2
CocoaPods
1
codejam
5
codelab
3
compute engine
3
Context
1
Crash Reporting
2
Crashlytics
1
Dart
2
DataCenter
1
Daydream
4
Deep Learning
2
Demo Party
1
Design Sprint
3
DesignBytes
1
DevArt
3
DevBytes
6
Developer
14
Developer Console
4
Developer Preview
6
Developer Relations
2
DevFest
7
DevFestX
3
devtools
3
Dialogflow
1
DirectShare
1
Doodle
1
DoubleClick
4
Doze モード
1
drive
2
Dynamic Links
3
EarlGrey
1
Easter Egg
1
ECMAScript 2015
1
Eddystone
4
egypt
1
English
2
ES2015
1
ES2016
1
ES6
2
ES7
1
Firebase
93
Firebase Admin SDK
6
Firebase Analytics
9
Firebase Auth
4
Firebase Cloud Messaging
7
Firebase Crashlytics
2
Firebase Database
5
Firebase Libraries
1
Firebase Notifications
1
Firebase Performance
2
Firebase Remote Config
5
Flash
1
Flutter
1
font
3
fraud
1
G Suite
15
game
20
Game Developers Conference 2018
1
Gboard
1
GCP
1
GDD11JP
56
GDD2010JP
23
GDE
2
GDG
14
GDG Cloud
1
Geo
45
Gingerbread
1
GLIDE
5
Gmail
3
Gmail API
2
Go
1
golang
5
goo.gl
1
Google
5
Google Analytics
2
Google API
1
Google Apps
11
Google Apps Script
4
Google Assistant
7
Google Assistant SDK
1
Google Cast
8
Google Cloud
4
Google Cloud INSIDE Games & Apps
3
Google Cloud Messaging
10
Google Cloud Platform
9
Google Code-in
1
Google Developer Experts
2
Google Developers Academy
1
Google Developers live
5
Google Developers Summit
1
Google Drive
6
Google Fit
2
Google for Mobile
2
Google for Work
1
Google I/O
7
Google Maps
51
Google Pay
1
Google Play
58
Google Play Console
4
Google Play Game Services
9
Google Play Instant
1
Google Play Services
21
Google Plus
14
Google Search
6
Google Sheets API
3
Google Sign-In
12
Google Slides API
5
Google Summer of Code
1
Google Tag Manager
1
Google Trust Services
1
Google+
2
Googleapps
10
GoogleGames
1
GoogleI/O
28
GoogleLabs
1
GoogleTV
1
Gradle
1
gRPC
2
GTUG
5
GWT
2
hack4jp
2
hackathon
6
Hosting
3
HTML5
17
HTML5Rocks
1
HTTP/2
5
HTTPS
9
ID Token
1
Identity
14
Identity Toolkit
1
Ignite
4
IME
11
Indie Games Festival 2018
1
Inevitable ja Night
9
Instant Apps
5
intern
2
Invites
1
iOS
19
IoT
4
IPv6
1
Issue Tracker
2
Japanese Input
1
JavaScript
7
K-12
1
Key Transparency
1
Knowledge Graph
1
l10n
8
LINE
1
Lollipop
10
Machine Learning
8
Marshmallow
10
Material
1
Material Design
24
MDL
1
MDN
1
MIDI
2
Mobile
12
Mobile Bootcamp
4
Mobile Sites certification
1
Mobile Vision
3
mod_pagespeed
1
monetize
3
Mozc
15
Music
1
NativeDriver
2
NativeScript
1
ndk
3
Nearby
5
Nexus
2
Nexus S
1
NFC
1
Node.js
3
Noto CJK
1
NPAPI
2
NPN
1
oauth
11
OpenGL
4
OpenID
3
OpenID Connect
4
OpenSocial
1
opensource
16
Optimization
1
Payment
4
People API
2
Performance
10
PersonFinder
1
Physical Web
3
Place Picker
1
Play Billing Library
1
Player Analytics
4
Playtime 2017
1
Policy
3
Polymer
7
Progressive Web Apps
13
project hosting
1
Promise
1
Promo code
1
Protocol Buffers
1
PRPL
1
publicdata
1
Push API
1
Push Notification
3
PWA
1
Python
2
QUIC
1
RAIL
1
React
1
React Native
2
Realtime Database
9
reCaptcha
1
Redux
1
Remote Config
3
Remote Display API
1
Resonance Audio
1
Rewarded Video Ads
2
Runtime Permission
1
Sample Code
2
Santa Tracker
1
schema.org
1
secur
1
security
38
Service Worker
3
SHA-1
1
sketchup
1
SmartLock for Passwords
4
social
4
SPDY
3
speak2tweet
1
Spreadsheet
3
startup
3
Storage
2
streetview
3
Study Jams
3
Swift
1
SwiftShader
1
Symantec
1
Task
4
Team Drive
1
techtalk
12
TensorFlow
9
TensorFlow Lite
2
TensorFlow Object Detection API
1
test
4
Test Lab
5
ToS
1
Transliteration
1
Twitter
1
Udacity
19
Unity
3
UX
2
V8
2
VP9
1
VR
10
Vulkan
2
Watch Face
2
wave
2
Wear OS
1
Weave
1
Web
13
Web Animations
1
Web Components
5
Web Manifest
1
WebAssembly
2
WebGL
1
WebMusic
5
WTM
3
Xcode
1
YouTube
15
YouTube API
1
インタビュー
1
コードサンプル
1
プライバシー
1
言論の自由
1
節電
3
東日本大震災
9
日本語入力
41
ブログ アーカイブ
2018
4
3
2
1
2017
12
11
10
9
8
7
6
5
4
3
2
1
2016
12
11
10
9
8
7
6
5
4
3
2
1
2015
12
11
10
9
8
7
6
5
4
3
2
2014
12
11
10
9
8
7
6
5
4
3
2
1
2013
12
11
10
9
8
7
6
5
4
3
2
1
2012
12
11
10
9
8
7
6
5
4
3
2
1
2011
12
11
10
9
8
7
6
5
4
3
2
1
2010
12
11
Feed
Google
on
Follow @googledevjp
"プロダクトに関するご意見は
プロダクトフォーラム
にお願いします"