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
Mackerel's monitoring and checks
Search
i2tsuki
November 29, 2017
Technology
7.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mackerel's monitoring and checks
Monitoring Seminar in mercari で Mackerel 自身のモニタリング & 監視についてお話しました。
i2tsuki
November 29, 2017
More Decks by i2tsuki
See All by i2tsuki
「念のためのログ保存」を組織全体でやめるためのポリシーと仕組み作り
i2tsuki
4
380
SRE 視点で事業横断でのオブザーバ ビリティの民主化に取り組んでいる話
i2tsuki
1
570
ソーシャルゲームの長期運用 を目指すための SRE の取り組み - 10 周年を⽬指すコトダマンの場合 -
i2tsuki
5
2.9k
AWS Startup.fm 企業の上場時に必要な監査要件とマネジメントサービスによる解決
i2tsuki
0
150
BuildKit を使った Scala アプリケーションのテストと高速化 @ Docker Meetup Kansai #2
i2tsuki
1
660
20180530LINEDeveloperMeetupRedis-redis-for-mackerelio
i2tsuki
0
510
Mackerel インフラ基盤 AWS 移行の舞台裏
i2tsuki
6
11k
Python Web Application Monitoring in Mackerel
i2tsuki
1
6.3k
Other Decks in Technology
See All in Technology
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
280
品質と信頼性を地続きにする
grimoh
0
180
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.4k
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
170
絵ではじめるKubernetesセキュリティ
aoi1
3
450
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
560
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
380
Spring BootからQuarkusへの移行
tatsuya1bm
2
100
20260912_スクラムにジェネラリストは必要か
ryugen04
0
400
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
4
1.1k
iOSDC Japan 2026 day1 TrackC 10:50
feedtailor
0
120
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
340
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Building Applications with DynamoDB
mza
96
7.2k
Thoughts on Productivity
jonyablonski
76
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
BBQ
matthewcrist
89
10k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
Optimizing for Happiness
mojombo
378
71k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Transcript
Mackerel 自身のモニタリング & 監視について 株式会社はてな Web オペレーションエンジニア 大野一樹(id: kizkoh) 2017-11-29
Monitoring Seminar in mercari #mackerelio 1 / 20
自己紹介 大野 一樹 (@kizkoh / id:kizkoh ) 株式会社はてな Web オペレーションエンジニア
最近は Mackerel のインフラを主にひとりで担当 Mackerel の運用しつつ ISUCON7 運営してました 2 / 20
今日おはなしする内容 Mackerel をモニタリング、監視するサービス 信頼性を確保するためにやっていること Mackerel のモニタリング、監視項目の紹介 Mackerel の運用で得たメトリック、監視の知見 3 /
20
Mackerel のモニタリング & 監視 4 / 20
モニタリング & 監視の基本は Mackerel 5 / 20
Mackerel を支える Mackerel ステージング環境と本番環境 Mackerel が動いている環境にはステージング環境と本番環境がある ステージング環境は主に社内利用や API テスト用 ステージング環境のモニタリング
& 監視 本番 Mackerel でモニタリング & 監視 .本番環境のモニタリング & 監視 ステージング Mackerel と本番 Mackerel でモニタリング & 監視 6 / 20
+α: Nagios や外部サービスに依存してる 7 / 20
+α の監視 Nagios の担当箇所 Nagios からの外形監視 (pingdom, Route 53 と一緒)
ステージングも ap-northeast-1 にある Nagios はさくらの VPS にある 移行できていない監視の例 PostgreSQL のレプリケーション遅延監視 Cron の定期実行タスクの終了ステータス監視 8 / 20
Mackerel のモニタリング、監視項目の紹介 9 / 20
ミドルウェアに偏らない、汎用的なお話 10 / 20
Mackerel のモニタリング、監視項目の紹介 Index NLB の監視 Active Standby の監視 Kinesis Streams
のモニタリング ネットワーク系のモニタリング TCP セッションモニタリング トラフィックモニタリング 11 / 20
NLB の監視 Mackerel では NLB を使っている mackerel.io と api.mackerelio.com の前段は
NLB NLB は ICMP に応答しない TCP には背後のインスタンスに到達して応答する なので check-tcp $ ping -c 3 api.mackerelio.com PING api.mackerelio.com (52.198.226.45) 56(84) bytes of data. --- api.mackerelio.com ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2047ms [plugin.checks.tcp] command = "/usr/bin/check-tcp --hostname=api.mackerelio.com --port 443 -t 10 --war notification_interval = 60 max_check_attempts = 2 12 / 20
Active Standby の監視 Keepalived Active Standby を構成している Keepalived プロセスは自動起動しない インスタンスが再起動した際に
keepalived の起動し忘れを防ぐ check-proc プラグインでプロセスの有無を監視している --vrrp オプションを付けているので vrrp_script を入れると 3 つ [plugin.checks.keepalived-procs] command = "/usr/bin/check-procs --pattern='keepalived' --critical-under=2 notification_interval = 600 max_check_attempts = 2 13 / 20
Kinesis Streams のモニタリング 時系列データベースで使っている イメージとしてはジョブキューのようなもの 順序は確保されずランダムに取り出される 取り出しが遅れると溜まっていく 古いものがどんどん Kinesis Streams
に残る 14 / 20
Kinesis Streams のモニタリング 欲しい情報 Kinesis Streams からの読み取りどれくらいの遅延が発生しているか Kinesis Streams シャードの偏りを調べたい
yuuki/mackerel-plugin-aws-kinesis-streams-shard 15 / 20
ネットワーク系 Tcpeek* TCP の 3-way ハンドシェイクモニタリング Syn や Syn/Ack の再送を検知する
/proc/net/snmp の RetransSegs に近いけど細かくした感じ ポートや宛先を絞って通信を追いたいときに便利 クラウド環境だとスイッチでモニタリングできないので便利 pandax381/tcpeek: TCP 3way-handshake monitor DSAS開発者の部屋:ログからは見えてこない高負荷サイトのボトルネック 16 / 20
ネットワーク系 Tcpeek Redis Cluster と Lambda との通信のモニタリング Lambda は再送のモニタリングができない kizkoh/mackerel-plugin-tcpeek:
Mackerel Agent plugin for tcpeek kizkoh/tcpeek_exporter: tcpeek exporter for Prometheus 17 / 20
ネットワーク系 iptables トラフィック管理したい データ転送量がどこで発生しているかをハッキリさせる iptables のチェインの作成で取得できる iptables -N send_redis iptables
-A send_redis -j ACCEPT iptables -N receive_redis iptables -A receive_redis -j ACCEPT iptables -A OUTPUT -p tcp --sport 6379 -j send_redis iptables -A INPUT -p tcp --dport 6379 -j receive_redis Chain receive_redis (1 references) pkts bytes target prot opt in out source destination 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 Chain send_redis (1 references) pkts bytes target prot opt in out source destination 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 18 / 20
ネットワーク系 iptables Chain の統計の差分を計算して Mackerel に送る 式グラフと組み合わせれば AZ 間通信のコスト計算できる kizkoh/mackerel-plugin-nfiptables:
Mackerel Agent plugin for iptables (pkts, bytes) iptables-exporter 0.3.1 : Python Package Index 19 / 20
おわり 20 / 20