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
メルカリのシステム・サービス監視について/Monitoring Mercari service...
Search
kazeburo
November 29, 2017
Technology
5
6.9k
メルカリのシステム・サービス監視について/Monitoring Mercari service and servers
メルカリのシステム・サービス監視について
Monitoring seminar in Mercari
kazeburo
November 29, 2017
Tweet
Share
More Decks by kazeburo
See All by kazeburo
[さくらのTech Day] ガバメントクラウド開発と変化と成長する組織 / sakura techday, Develop govcloud and the team
kazeburo
0
13
ガバメントクラウド開発と変化と成長する組織 / Organizational change and growth in developing a government cloud
kazeburo
4
1.8k
DNS水責め攻撃と監視 / DNS water torture attack Monitoring and SLO
kazeburo
5
4k
DBやめてみた / DNS water torture attack and countermeasures
kazeburo
13
12k
IaaSにおけるPlatform Engineeringとこれから / Platform engineering in IaaS
kazeburo
2
1.3k
高信頼IaaSを実現するDevOps / DevOps for Highly Reliable IaaS
kazeburo
1
560
権威DNSサービスへのDDoSと ハイパフォーマンスなベンチマーカ / DNS Pseudo random subdomain attack and High performance Benchmarker
kazeburo
3
5.2k
DNS権威サーバのクラウドサービス向けに行われた攻撃および対策 / DNS Pseudo-Random Subdomain Attack and mitigations
kazeburo
7
13k
sacloudns
kazeburo
2
320
Other Decks in Technology
See All in Technology
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
180
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
120
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
200
複雑なState管理からの脱却
sansantech
PRO
1
150
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
4 Signs Your Business is Dying
shpigford
180
21k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Designing the Hi-DPI Web
ddemaree
280
34k
Automating Front-end Workflow
addyosmani
1366
200k
Adopting Sorbet at Scale
ufuk
73
9.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Bash Introduction
62gerente
608
210k
Thoughts on Productivity
jonyablonski
67
4.3k
Unsuck your backbone
ammeep
668
57k
Transcript
ϝϧΧϦͷγεςϜɾαʔϏε ࢹʹ͍ͭͯ Monitoring Seminar in Mercari 2017/Good/Meat @kazeburo
Me • Masahiro Nagano / խ • id:kazeburo • Mercari,
Inc Principal Engineer Site Reliability Engineering (SRE) Team
Agenda • Mercariͷ͜Ε·Ͱͱࢹπʔϧ • MackerelͰͷαʔόࢹ
~ 2014/9 JP ੴङ ΠϯϑϥνʔϜ!5PLZP
~2014/9 • ͘͞ΒΠϯλʔωοτੴङDCͷઐ༻αʔόͱΫϥυΛར༻ • ઐ༻αʔόʹͯZabbixαʔόΛߏங • ʮτϦΨʔʯΛ׆༻ͯ͠͞·͟·ͳࢹΛߦ͏ • ͍݅ࣜͩ͠Ͱෳࡶͳࢹ͕࣮ݱ •
ݱࡏͷࢹ߲ͷϕʔε͕Ͱ͖Δ
2014/9~ US JP ੴङ ΠϯϑϥνʔϜ!5PLZP
2014/9~ • USαʔϏε͕ AWS Oregon region ʹͯ։࢝ • ઐ༻αʔόͱΫϥυͷϚϧνˍϋΠϒϦουߏ •
USʹZabbix ServerΛߏஙͯ͠ɺ౦ژ͔Βࢹ
ଟRegion Zabbixͷ՝ • Zabbixͷઃఆ͕ͣΕ͍ͯ͘ • ӡ༻͍ͯ͠ΔZabbixͷόʔδϣϯ͕ҟͳΔ • ઐ༻αʔόͱAWSͰएׯҧ͏ࢹ߲ • JPͰ࡞ΓࠐΜͩࢹ͕USͰ࠶ݱͰ͖͍ͯͳ͍
• USͰ͚ͩى͖Δࢹ࿙ΕʹΑΔࣄނ • Zabbix ProxyΛར༻͠ɺ1ݸͷZabbix ServerूͳͲͷҊ
Zabbixͷ՝ • Zabbix ࣗମͷӡ༻ • όʔδϣϯΞοϓͷෛ୲ • MySQL ͷෛՙ͕େ͖͘ɺࢹԆͳͲൃੜ •
ෳࡶͳτϦΨʔͷཧ • ϚεΫϦοΫओମͷઃఆ • όʔδϣϯཧͳͲΛߦ͍͍ͨ • ࢹͷ௨Λվળ͍ͨ͠
2016/1~ US JP ੴङ 43&!5PLZP
mackerel ಋೖ • Service Metrics͔Βಋೖ • ؆୯ʹάϥϑ͕ඳ͚ɺࢹᮢͷઃఆ͕Ͱ͖Δ • fluentdɺNorikraͱͷΈ߹Θͤ •
ZabbixͷτϦΨʔͷҠ২ • τϦΨʔΛPluginͱ࣮ͯ͠ • Plugin GitͰཧ͠ɺAnsibleͰ
mackerel ಋೖ • ࢹπʔϧɺ࣌ܥྻDBͷӡ༻ͷΦϑϩʔυ • Կ͠ͳͯ͘ຖिόʔδϣϯΞοϓ • JP/USͰͷࢹ߲Λ߹ΘͤΔ • ҟͳΔͱ͜Ζ
Ansible templateͳͲͰٵऩ
2017/3~ US JP ੴङ UK 43&!5PLZP
2017/3~ • UK ͰͷαʔϏε։࢝ • UK Λ։࢝͢Δʹ͋ͨͬͯɺ͞Βʹ͏ҰͭͷΫϥυΛ࠾༻ • ࢹ͕ΫϥυԽ͞Ε͓ͯΓɺ৽ͨͳࢹαʔόͷՃඞཁͳ͠ •
JP/US ͷࢹ߲͕ͦͷ··ద༻Ͱ͖ɺΠϯϑϥετϥΫνϟͷߏஙྃͱͱ ʹࢹͷઃఆ͕ྃ
ݱࡏ US JP ੴङ UK 43&&OHJOFFST!+1646, Stackdriver Prometheus
ݱࡏ • ϚΠΫϩαʔϏεԽ • GKE ্ͷίϯςφɾαʔϏεͷࢹͷͨΊʹ Stack DriverɺPrometheusɺ DataDog ͷ׆༻
• αʔόαΠυΤϯδχΞࢹπʔϧΛར༻
ͦͷଞͷࢹ New Relic Kurado άϥϑը૾ΛҰؾʹݟΕΔͷͰศར جຊతͳϝτϦΫεͪ͜ΒͰݟΔ PHPͷ෦ͷτϨʔε ΞϓϦέʔγϣϯͷνϡʔχϯάͷࢀߟ
MackerelͰͷαʔόࢹ
https://speakerdeck.com/kazeburo/mackerel-day
ࢹʹ·ͭΘΔࣈ • ࢹϧʔϧ: 278 • Hostຖͷࢹϧʔϧ • MySQL: 34 •
Application: 39 • Search: 37 • Custom Plugin: 50+ (check + metrics + utils)
MySQLͷࢹ߲(1/4) • Connectivity • FileSystem % >85% >88% • Swap
% >50% >70% • ssh-alive • sshdͷϓϩηεࢹ • global-ip-and-iptables • global ipͷ༗ແͱiptablesͷঢ়ଶ • unbound-resolv • localͷunboudͰ໊લղܾ͕Ͱ͖Δ͔ • unbound-process • unboundͷϓϩηεࢹ • crond-process • crondͷϓϩηεࢹ • uptime • ࠶ىಈࢹ
MySQLͷࢹ߲(2/4) • inode-usage • inode༻ >80% >90% • uname-change •
unameίϚϯυͷ݁Ռͷdiffࢹ • passwd-change • passwdϑΝΠϧͷdiffࢹ • hostname-changed • hostnameίϚϯυͷ݁Ռͷdiffࢹ • custom.ntpq.synced.remote <0.1 <0.1 • custom.ntpq.offset.seconds >300 >300 (msec) • ntpͷಉظαʔόͱ࣌ࠁͷζϨ • custom.linux-lite.memory.avail <50MB <20MB • ۭ͖ϝϞϦ • custom.linux-lite.cpu-usage.cpu-steal >20% >20% • custom.linux-lite.cpu-usage.cpu-iowait >30% >50% • custom.linux-lite-cpu-usage.cpu-system >8% >8% • ͦΕͧΕͷCPU༻(100%্͕ݶ)
MySQLͷࢹ߲(3/4) • cutom.linux-lite.loadavg.per-cpu >3 >3 • ίΞͰׂͬͨϩʔυΞϕϨʔδ • postfix-smtp-alive •
SMTPϙʔτͷ֬ೝ • postfix-master-process • postfix masterϓϩηεࢹ • custom.postfix.mailq.queue >100 >5k • postfix mail Ωϡʔཹ • custom.linux-lite.process.all >2k >2k • custom.linux-lite.process.running >60 >100 • શϓϩηεͱ࣮ߦதͷϓϩηε • mysql-uptime • mysqlͷuptime • custom.mysql-lite.replication-threads.io <0.2 <0.2 • custom.mysql-lite.replication-threads.sql <0.2 <0.2 • ϨϓϦέʔγϣϯͷ֤threadͷঢ়ଶ
MySQLͷࢹ߲(4/4) • custom.mysql-lite.replication-behind- master.second >5 >5 • mysqlͷϨϓϦέʔγϣϯԆ • custom.mysql-lite.connections.utilization
>90 >90 • max_connectionsʹର͢ΔίωΫγϣϯ • custom.mysql-lite.threads.running >1k >2k • mysql্Ͱ࣮ߦதͷεϨου • mysql-slave-sql-error • replicationΤϥʔͷࢹ • machine-exceptions • αʔόͷϝϞϦΤϥʔࢹ • raid-disks • αʔόͷRAID/Diskঢ়ଶͷࢹ
ࢹͷҭ͔ͯͨ • ʮࢹܧଓతͳςετʯby kazuho • ʮςετϑΝʔετʯͰγεςϜΛߏங͠ͳ͕ΒࢹΛ࡞Δ • ϓϩηεࢹϙʔτࢹ • ʮϙετϞʔςϜʯͷରԠࡦͱͯ͠ࢹΛҭͯΔ
• ᮢͷௐɺL7Ϩϕϧͷࢹ
end