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
maprobe / mackerel drinkup #7
Search
FUJIWARA Shunichiro
April 24, 2018
Technology
0
110
maprobe / mackerel drinkup #7
FUJIWARA Shunichiro
April 24, 2018
Tweet
Share
More Decks by FUJIWARA Shunichiro
See All by FUJIWARA Shunichiro
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
1
1.1k
awslim - Goで実装された高速なAWS CLIの代替品を作った/layerx.go#1
fujiwara3
4
640
AWS CLIの起動が重くてつらいので aws-sdk-client-go を書いた / kamakura.go#6
fujiwara3
7
9.5k
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
30
6.9k
fujiwara-ware OSSをひたすら紹介する/ya8-2024
fujiwara3
7
690
Amazon ECSで好きなだけ検証環境を起動できるOSSの設計・実装・運用 / YAPC::Hiroshima 2024
fujiwara3
22
8.1k
リアル事例から読み解くWebパフォーマンスチューニングの勘所/Offers web performance tuning
fujiwara3
4
1.7k
隙間家具OSS開発で『自分の庭』をつくる / kayac-andpad-event
fujiwara3
0
860
ISUCON作問入門/ ISUCON Summer Fes 2023
fujiwara3
2
1.7k
Other Decks in Technology
See All in Technology
Technical Writing Meetup vol.35
soracom
PRO
2
110
四国のあのイベントの〇〇システムを45日間で構築した話 / cloudohenro2024_tachibana
biatunky
0
330
JEP 480: Structured Concurrency
aya_ebata
0
130
開発生産性を始める前に開発チームができること / optim-improve-development-productivity.pdf
optim
0
100
CRTO/CRTL/OSEPの比較・勉強法とAV/EDRの検知実験
chayakonanaika
1
1.1k
スタッフエンジニアの道: The Staff Engineer’s Path
snoozer05
PRO
44
14k
社内の学びの場・コミュニティ形成とエンジニア同士のリレーションシップ構築/devreljapan2024
nishiuma
3
270
サーバー管理しないサーバーサービスManaged DevOps Pool
kkamegawa
0
130
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
190
チームビルディングは"感性"で向き合おう / Team Building with Awareness
kohzas
0
200
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
9.6k
SORACOMで実現するIoTのマルチクラウド対応 - IoTでのクリーンアーキテクチャの実現 -
kenichirokimura
0
380
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Your Own Lightsaber
phodgson
101
6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
The Cult of Friendly URLs
andyhume
76
6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
157
15k
GitHub's CSS Performance
jonrohan
1029
450k
Speed Design
sergeychernyshev
22
430
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Adopting Sorbet at Scale
ufuk
73
8.9k
Transcript
maprobe Mackerel ͷϗετใͱ࿈ܞ͢Δ ֎ܗࢹΤʔδΣϯτ 2018.04.24 Mackerel Drinkup #7 @fujiwara
@fujiwara ٕज़෦ github.com/fujiwara sfujiwara.hatenablog.com
Mackerel ͷࢹͷྲྀΕ
None
ϗετͷμϯݕΛ͍͍͔Μ͡ʹ͍ͨ͠ • 7ఔ agent ͔Β్ઈ͠ͳ͍ͱμϯͱఆ͞Εͳ͍ • "connectivity" Ξϥʔτ Critical Ϩϕϧ͔͠ͳ͍
• ଟॏԽͯ͋͠ΔϗετͰେ͛͞
෦Ϧιʔεʹ֎ܗࢹΛ͍ͨ͠
None
maprobe ͭ͘Γ·ͨ͠ github.com/fujiwara/maprobe
None
maprobe works... 1. Mackerel API Λୟ͍ͯϗετใΛऔಘ • Service, Role ͰϑΟϧλϦϯά
2. ֤ϗετʹରͯ͠ probe(ping,tcp,http,command)Λ࣮ߦ 3. ಘΒΕͨ݁ՌΛϗετϝτϦοΫͱͯ͠ Mackerel ʹૹ৴ 4. 60ඵ͝ͱʹ܁Γฦ͠
ping probe production αʔϏε ͷ server ϩʔϧʹ ping Λૹ৴ probes:
- service: production role: server ping: address: '{{ .Host.IPAddresses.eth0 }}'
None
HTTP Probe production αʔϏε ͷ InternalELB ϩʔϧʹ HTTP probes: -
service: production role: InternalELB http: url: 'http://{{ .Host.CustomIdentifier }}/api/healthcheck' post: POST headers: Content-Type: application/json body: '{"hello":"world"}' expect_pattern: 'ok'
TCP Probe production αʔϏε ͷ redis ϩʔϧʹ TCP probes: -
service: production role: redis tcp: host: '{{ .Host.IPAddress.eth0 }}' port: 6379 send: "PING\n" expect_pattern: "PONG" quit: "QUIT\n"
Command Probe mackerel-plugin ޓίϚϯυ࣮ߦՄೳ probes: - service: production role: redis
command: command: "mackerel-plugin-redis -host {{ .Host.IPAddress.eth0 }} -tempfile /tmp/redis-{{ .Host.ID }}"
ίϚϯυ࣮ߦͷԠ༻ྫ probes: - service: production role: EC2 command: command: 'cleanup.sh
{{.Host.ID}} {{index .Host.Meta.Cloud.MetaData "instance-id"}}' Mackerel ϗετ ID ͱ EC2 Πϯελϯε ID Λݩʹࣗಈୀ͢ Δ
Blog ॻ͖·ͨ͠ https://sfujiwara.hatenablog.com/entry/2018/04/23/113316 Enjoy!