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
mkr-check-self あるいはmackerel-agentのサブセットを作る方法
Search
karupanerura
August 23, 2017
Programming
1
120
mkr-check-self あるいはmackerel-agentのサブセットを作る方法
Mackerel User Group Meeting Vol.3
karupanerura
August 23, 2017
Tweet
Share
More Decks by karupanerura
See All by karupanerura
Use Perl as Better Shell Script
karupanerura
0
710
GoでParserを書く
karupanerura
4
910
マイ隙間家具OSSたちのご紹介
karupanerura
2
260
Mustache Template 話 2024
karupanerura
0
26
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
2.9k
Javaの実装をPerlでテストする
karupanerura
0
1.2k
Go Generics Overview
karupanerura
0
1.3k
Japan.pm 2021 開催まで至る道
karupanerura
0
2.1k
Perl MongersのためのAWS_CDK入門
karupanerura
0
140
Other Decks in Programming
See All in Programming
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
130
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
120
Select API from Kotlin Coroutine
jmatsu
1
210
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
3
2k
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
590
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
140
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
710
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
420
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
94
6.1k
The Cult of Friendly URLs
andyhume
79
6.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
RailsConf 2023
tenderlove
30
1.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
940
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Agile that works and the tools we love
rasmusluckow
329
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Done Done
chrislema
184
16k
Transcript
mkr-check-self ͋Δ͍mackerel-agentͷαϒηοτΛ࡞Δํ๏ id:karupanerura Mackerel User Group Meeting Vol.3
mkr-check-self ͱ • mackerel-agentͷઃఆΛΈͯ • checkࢹ߲Λ୳ͯ͠ • ·Δͬͱ࣮ߦ • Ҏ্
DEMO
ͳͥ΄͘͠ͳͬͨͷ͔ • GCPͷIaaSͰ͋ΔGoogle Compute Engine • StackdriverͰͷࢹ͕جຊ • ͍Ζ͍Ζ͋ͬͯmackerel͍ͨ͘ͳͬͨ •
େਓͷࣄͰউखʹొͯͨ͠Ί͠ʹ͍͘ • ͔͠͠ݕূ͍ͨ͠
ͭ͘Γ͔ͨ
mackerel-agent • OSSʹͳ͍ͬͯΔ • configͳͲผύοέʔδʹͳͬͯΔ • ͭ·Γ֎෦ϥΠϒϥϦͱͯ͑͠Δʂ • ͬͨʔʂ
ίʔυ
func main() { kingpin.Parse() logger := log.New(colorable.NewColorableStdout(), "", log.Ldate|log.Ltime| log.LUTC)
conf, err := config.LoadConfig(*conffile) if err != nil { logger.Fatal(err) } ok := true for name, config := range conf.CheckPlugins { checker := checks.Checker{Name: name, Config: config} report := checker.Check() logger.Printf("%s: %s\n", statusColordString(report.Status), color.BlueString(checker.String())) if *verbose { logger.Print(report.Message) } ok = ok && report.Status == checks.StatusOK } if !ok { os.Exit(1) } }
Έ͔͍͡ʂ ͓͕ͯΔʂ
ͨͩ͠ • OSSʹͳ͍ͬͯΔͱ͍͑mackerel-agentͷ தͷύοέʔδ • ϥΠϒϥϦͱͯ͑͠Δ͚ΕͲɺϥΠϒϥ Ϧͱͯ͠ར༻͢ΔͨΊʹެ։͞Ε͍ͯΔΘ͚ Ͱͳ͍ • ͏߹ࣗݾͰݸਓπʔϧ͘Β͍Ͱ
͓͠·͍ :D