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
120
maprobe / mackerel drinkup #7
FUJIWARA Shunichiro
April 24, 2018
Tweet
Share
More Decks by FUJIWARA Shunichiro
See All by FUJIWARA Shunichiro
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
9
1.1k
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
4k
AWS Lambdaで実現するスケーラブルで低コストなWebサービス構築/YAPC::Hakodate2024
fujiwara3
10
4.6k
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
2
1.5k
awslim - Goで実装された高速なAWS CLIの代替品を作った/layerx.go#1
fujiwara3
6
760
AWS CLIの起動が重くてつらいので aws-sdk-client-go を書いた / kamakura.go#6
fujiwara3
7
10k
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
31
7.1k
fujiwara-ware OSSをひたすら紹介する/ya8-2024
fujiwara3
8
810
Other Decks in Technology
See All in Technology
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
メンタル面でもつよつよエンジニアになる/登壇資料(井田 献一朗)
hacobu
0
110
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
140
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.4k
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
APIとはなにか
mikanichinose
0
110
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
9
3.2k
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
320
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
0
140
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
1.2k
UI State設計とテスト方針
rmakiyama
3
780
Server-Side Engineer of LINE Sukimani
lycorp_recruit_jp
0
340
Featured
See All Featured
Fireside Chat
paigeccino
34
3.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Producing Creativity
orderedlist
PRO
342
39k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building an army of robots
kneath
302
44k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Unsuck your backbone
ammeep
669
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
The Pragmatic Product Professional
lauravandoore
32
6.3k
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!