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
Stupid Graphite Tips
Search
Jason Dixon
November 04, 2013
Technology
37
4.8k
Stupid Graphite Tips
My Ignite talk from DevOpsDays Portland on November 4, 2013.
Jason Dixon
November 04, 2013
Tweet
Share
More Decks by Jason Dixon
See All by Jason Dixon
Graphite 1.0-ish
obfuscurity
0
340
Monitorama PDX 2015 - Closing Plenary
obfuscurity
1
440
The State of Open-Source Monitoring
obfuscurity
146
49k
Trending with Purpose
obfuscurity
11
1.3k
Other Decks in Technology
See All in Technology
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
12
3.4k
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
270
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
370
AIのコンプラは何故しんどい?
shujisado
1
190
Password-less Journey - パスキーへの移行を見据えたユーザーの準備 @ AXIES 2024
ritou
3
1.4k
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
520
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Site-Speed That Sticks
csswizardry
2
190
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Cost Of JavaScript in 2023
addyosmani
45
7k
A Philosophy of Restraint
colly
203
16k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
Music & Morning Musume
bryan
46
6.2k
How GitHub (no longer) Works
holman
311
140k
Rails Girls Zürich Keynote
gr2m
94
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Transcript
Stupid Graphite Tips DevOpsDays Portland 2013
What is Graphite? carbon whisper metrics
require 'socket' require ‘time’ conn = TCPSocket.new 'graphite.example.com', 2003 conn.puts
"foo #{value} #{Time.now.to_i}\n" conn.close metric key value timestamp $ echo "test.foo.bar 1 `date +%s`" | nc graphite.example.com 2003 metric key value timestamp Sending metrics to Carbon
Organizing metrics • Prefix with your collector/agent/app source • Keep
test/development stuff in check • Automatically purge test & release metrics • Avoid the urge to include your username
and Tracking deployments drawAsInfinite(color(custom.instances.*.killed,"white")) summarize(sumSeries(group(custom.instances.*.killed)), "1d")
mostDeviant(5, runtime.*.load.1m) Finding the Outliers p.s. Don’t forget about sortByMaxima,
sortByMinima and limit !
Adjusting Rate scale(nonNegativeDerivative(snmp.IF-MIB::ifInOctets.7),0.133333333) doesn’t scale! ... because as soon as
you hit a new resolution, your math is wrong. scaleToSeconds(nonNegativeDerivative(snmp.IF-MIB::ifInOctets.7),1)
Time Shifting sumSeries(mail.hosts.mta-*.messages.in) timeShift(sumSeries(mail.hosts.mta-*.messages.in),"6mon")
Counting metrics sumSeries(offset(scale(collectd.*.load.load.longterm,0),1))
Hybrid Graphs mail.hosts.mta-*.messages.in alpha(stacked(sumSeries(mail.hosts.mta-*.messages.in)),0.6)
Renaming Keys on-the-fly Ever wanted to redefine your metric key
in the middle of a query because the wildcard wasn’t quite in the right spot? aliasSub(hosts.web-01-pdx-prod-example- com.metric,”-(\w+)-prod”, ”.\1.prod”)
Graph Bookmarklet javascript:url=prompt("Enter Url");if (url) {content.Composer.loadMyGraph("temp", decodeURIComponent(url));};
Listing metrics $ curl -s http://graphite/metrics/index.json | json_pp | tail
"graphite-1.processes.ps_state-blocked.value", "graphite-1.processes.ps_state-paging.value", "graphite-1.processes.ps_state-running.value", "graphite-1.processes.ps_state-sleeping.value", "graphite-1.processes.ps_state-stopped.value", "graphite-1.processes.ps_state-zombies.value", "graphite-1.users.users.users", "test.bar", "test.foo" ]
Grokking Whisper $ whisper-info.py foo.wsp maxRetention: 31536000 xFilesFactor: 0.0 aggregationMethod:
average fileSize: 1262932 Archive 0 retention: 86400 secondsPerPoint: 1 points: 86400 size: 1036800 offset: 52 $ whisper-fetch.py foo.wsp | tail 1383585660! None 1383585720! 29.529000 1383585780! 87.016000 1383585840! 33.416000 1383585900! 29.012000 1383585960! 31.164000 1383586020! None 1383586080! 29.702000 1383586140! 29.299000 1383586200! None
Repairing Data $ whisper-fetch.py foo.wsp | grep -v None 1376066700
1.000000 1376066760 226.000000 1376066820 215.000000 1376066880 266.000000 1376066940 237.000000 1376072760 5.000000 1376074560 1.000000 1376075280 2.000000 $ for i in 1376066760 1376066820 1376066880 1376066940; \ do whisper-update.py foo.wsp ${i}:0"; done
Know your Carbon sumSeries(group(carbon.agents.*.updateOperations)) sumSeries(group(carbon.agents.*.metricsReceived)) sumSeries(group(carbon.agents.*.committedPoints)) secondYAxis(sumSeries(group(carbon.agents.*.pointsPerUpdate))) secondYAxis(averageSeries(group(carbon.agents.*.cpuUsage))) secondYAxis(sumSeries(group(carbon.agents.*.creates))) p.s.
Check out @scott_sanders’ collectd-tail examples https://gist.github.com/jssjr/35b592b4852625449c27
Tagged Events $ curl -X POST http://graphite/events/ \ -d '{"what":
"Something Interesting", "tags" : "wtf", "data" : "foo bar"}' events(“wtf”) events(“wtf”,”zomg”) events(“*”)
Dat Spark $ brew install spark $ curl -H 'Accept:
application/json' -s "http://graphite/ render/?target=foo&format=json&from=-30min" | json_pp | grep ',' | grep -v '\]' | grep -v target | spark ▂▂▁▂▂▂▂▂▁▃▁▂▂▂▄▃▂▂█▇▃█▂▃▂▃▁▂▄▂
Scaling dat Carbon Open Spaces, doge. omg multicore hip fanout
replication me much io vintage metrics
Thank You