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
110
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
GoでParserを書く
karupanerura
5
850
マイ隙間家具OSSたちのご紹介
karupanerura
2
240
Mustache Template 話 2024
karupanerura
0
8
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
2.8k
Javaの実装をPerlでテストする
karupanerura
0
1.1k
Go Generics Overview
karupanerura
0
1.3k
Japan.pm 2021 開催まで至る道
karupanerura
0
2k
Perl MongersのためのAWS_CDK入門
karupanerura
0
110
Webシステムのパフォーマンス・チューニング
karupanerura
2
800
Other Decks in Programming
See All in Programming
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
2024年のWebフロントエンドのふりかえりと2025年
sakito
3
260
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
140
Open source software: how to live long and go far
gaelvaroquaux
0
650
React 19アップデートのために必要なこと
uhyo
5
830
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
140
SpringBoot3.4の構造化ログ #kanjava
irof
3
1k
sappoRo.R #12 初心者セッション
kosugitti
0
270
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
280
WebDriver BiDiとは何なのか
yotahada3
1
150
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
700
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Become a Pro
speakerdeck
PRO
26
5.1k
Raft: Consensus for Rubyists
vanstee
137
6.8k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Making Projects Easy
brettharned
116
6k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A Tale of Four Properties
chriscoyier
158
23k
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