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
CIのモニタリングにstackdirver使ってみてる話
Search
int
January 15, 2019
Technology
0
140
CIのモニタリングにstackdirver使ってみてる話
GCPUG Tokyo Stackdriver Day January 2019 にてLTで発表した資料です。
まだMetricsのみなので頑張っていきたい
int
January 15, 2019
Tweet
Share
More Decks by int
See All by int
Terraformerのおはなし
int_tt
3
3.4k
Other Decks in Technology
See All in Technology
SDN の Hype Cycle を一通り経験してみて思うこと / Going through the Hype Cycle of SDN
mshindo
3
270
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
590
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
280
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
140
Android 15 でウィジェットピッカーのプレビュー画像をGlanceで魅せたい/nikkei-tech-talk-27-1
nikkei_engineer_recruiting
0
100
JAWS UG 青森(弘前)クラウド・AWS入門
hiragahh
0
120
TypeScript、上達の瞬間
sadnessojisan
49
14k
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
7
740
A Tour of Anti-patterns for Functional Programming
guvalif
0
1.4k
Engineer Career Talk
lycorp_recruit_jp
0
200
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
570
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
150
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
31
6.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
17k
Visualization
eitanlees
145
15k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Making Projects Easy
brettharned
115
5.9k
4 Signs Your Business is Dying
shpigford
180
21k
BBQ
matthewcrist
85
9.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
GitHub's CSS Performance
jonrohan
1030
460k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Transcript
$*ͷϞχλϦϯάʹ TUBDLEJSWFSͬͯΈͯΔ GCPUG Tokyo Stackdriver Day January 2019 LT
XIPBNJ • ͍Μͱ !JOU@UU ◦ ৽ଔ̎ ΠϯϑϥΤϯδχΞ • ͬͯΔ͜ͱ ◦
ΦϯϓϨ͔ΒΫϥυ·Ͱ ◦ ͓ࣄͰΫϥυͱίϯςφपΓ ◦ ࠷ۙ044׆ಈ DPOUSJCVUJPO ঃʑʹग़དྷΔΑ͏ʹͳָ͖͍ͬͯͯ͠ • ͖! " # $ % & • 4UBDLESJWFSྺҰϲ݄ !ྺ͘Β͍
࣍ • Ϟνϕʔγϣϯ • 1SPNFUIFVTUPTUBDLESJWFSʹ͍ͭͯ • ͬͯΈͰͲ͏͔ͩͬͨ
Ϟνϕʔγϣϯ • ৽ن։ൃҊ݅ʹͯ($1Λར༻ • ,VCFSOFUFTར༻ (,& • $PODPVSTF$* 1JWPUBM ͷ$*Λར༻
◦ ͜Ε(,&্Ͱར༻ ◦ 13͝ͱͷࣗಈςετࣗಈσϓϩΠେ׆༂த • ͕ͬͭΓ͍ͬͯΔͷͰɺ$*͕͍ͱશͯͷ࡞ۀ͕͘ͳͬͯ͠·͏ ◦ ͪΌΜͱϞχλϦϯά͍ͨ͠ • ͔ͤͬ͘($1ͬͯΔͷͰTUBDLESJWFSͰϞχλϦϯάͰ͖Δͱ࠷ߴ
Ϟνϕʔγϣϯ • ཉ͍͠ใ ◦ ֤8PSLFSͷ.FUSJDT $16 .FNPSZ *0ͳͲ ▪ (,&ͷϞχλϦϯάΛ0/ʹ͢Δͱ͙͢ݟ͑Δ
࠷ߴʂʂʂʂ ◦ ֤8PSLFSͷίϯςφQJQFMJOFͷϝτϦΫε ▪ σϑΥϧτͩͱݟ͑ͳ͍
ConcourseMetrics • https://concourse-ci.org/metrics.html
ConcourseMetrics • https://concourse-ci.org/metrics.html
Stackdriver… • ͔ͤͬ͘4UBDLESJWFSͬͯΔͷʹ%BUBEPH/FX3FMJDΛ͏ͷʜ ◦ ҰͭͷαʔϏεͰϞχλϦϯάπʔϧ͕ࢄཚ͍͍ͯͯ͜͠ͱແ͍ • 1SPNFUIFVTݐͯΔͷԯ߷ ◦ ͳΔ͘.POJUPSJOHใͷूઌϑϧϚωʔδυ͕خ͍͠
1SPNFUIFVTUPTE • IUUQTHJUIVCDPN(PPHMF$MPVE1MBUGPSNLTTUBDLESJWFSUSFFNBTUFSQSPNFUIFVTUPTE • 1SPNFUIFVTͷFYQPSUFS͔ΒTUBDLESJWFSͷDVTUPNNFUSJDTͰѻ͑Δܗʹม ͯ͘͠ΕΔ • (,&্ͷGMVFOUEͷϝτϦΫε 1SPNFUIFVT ΛૹΔͨΊʹ෦Ͱར༻ͯ͠
͍Δ • ($&PS(,&্ͷΈಈ࡞ ެࣜΑΓ
͍ํ • ͜Μͳײ͡ͷZBNMΛॻ͍ͯTJEFDBSͰ͚ͯEFQMPZ͢Δ͚ͩ - name: prometheus-to-sd image: gcr.io/google-containers/prometheus-to-sd:v0.3.2 ports: -
name: profiler containerPort: 6060 command: - /monitor - --stackdriver-prefix=custom.googleapis.com - --source=concourse:http://localhost:9391 - --pod-id=$(POD_NAME) - --namespace-id=$(POD_NAMESPACE) env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace 1PE Web container prometheus-to-sd locahost:9391/metric stackdirver
͜Μͳײ͡ʹͳΔ # HELP concourse_builds_finished_total Total number of Concourse builds finished.
# TYPE concourse_builds_finished_total counter concourse_builds_finished_total 174
มͷఆٛ • AQSPNFUIFVT UFYUGPSNBUA͔ΒTUBDLESJWFSͷ֤छύϥϝʔλมҎԼͷ௨Γ • .FUJSD5ZQF ◦ $06/5&3͔ )*45(3".$6.6-"5*7& ◦
ͦΕҎ֎ ("6(& func extractMetricKind(mType dto.MetricType) string { if mType == dto.MetricType_COUNTER || mType == dto.MetricType_HISTOGRAM { return "CUMULATIVE" } return "GAUGE" } https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/3d2aa1aacdd55c78cb2bfb74799ecf9d17fa0801/prometheus-to-sd/translator/translator.go#L379-L384
มͷఆٛ • 7BMVF5ZQF ◦ ͢ͰʹDVTUPN.FUSJDT͕ఆٛ͞Ε͍ͯΔ߹ఆٛ͞Ε͍ͯΔํʹै͏ ◦ .FUSJDT5ZQF͕)*450(3"%*453*#65*0/ ◦ ͦΕҎ֎ */5
func extractValueType(mType dto.MetricType, originalDescriptor *v3.MetricDescriptor) string { if originalDescriptor != nil { return originalDescriptor.ValueType } if mType == dto.MetricType_HISTOGRAM { return "DISTRIBUTION" } return "INT64" } https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/3d2aa1aacdd55c78cb2bfb74799ecf9d17fa0801/prometheus-to-sd/translator/translator.go#L386-L397
͏গ͠ৄ͘͠ • IUUQJOUUUIBUFOBCMPHKQFOUSZ • ίίʹॻ͖·ͨ͠
ͬͯΈͯ • ࠓͷͱ͜Ζಛʹͳ͍͑ͯ͘Δ • ެ͕ࣜDPOWFSUFSΛ४උͯ͘͠ΕͯΔͷخ͍͠ • ($1ͰऔಘͰ͖ΔϝτϦΫεͱ$*ͷΞϓϦέʔγϣϯϝτϦΫεͷ͓͔͛Ͱ ͍͔ͭ͘ϘτϧωοΫΛՄࢹԽग़དྷͨɻ ◦ ಛఆͷQJQFMJOF͕ͬͯΔͱ͖ʹ(,&ͷOPEFʹͯEJTLͷ5ISPUUMF͕ൃੜ͍ͯ͠Δ͜ͱ͕໌
◦ IUUQTDMPVEHPPHMFDPNDPNQVUFEPDTEJTLTQFSGPSNBODF • $VTUPNNFUSJDT༗ྉͳͷͰ͓ஈʹҙ • ͏ͪΐͬͱӡ༻ͨ͠ΓɺଞTUBDLESJWFSͷαʔϏεͱ࿈ܞͯͬ͠ͱ৭Μ ͳใΛूΊͯΈ͍ͨɻ