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
HOW DO YOU KNOW iT'S WORKiNG
Search
Mike Fiedler
May 20, 2016
Technology
0
100
HOW DO YOU KNOW iT'S WORKiNG
Monitoring NGiNX.Presented during
https://ngenious.website/
Mike Fiedler
May 20, 2016
Tweet
Share
More Decks by Mike Fiedler
See All by Mike Fiedler
Fixing AWS with AWS
miketheman
1
130
Instrumenting Application Stack in Dynamically Scaling Environment
miketheman
0
64
Giving (and Taking) Back
miketheman
0
57
Where Do We Go From Here?
miketheman
0
140
What's In This Cookbook?
miketheman
0
55
Treating Your Infrastructure Like Garbage
miketheman
2
1.7k
MongoDB - Operations Best Practices
miketheman
1
120
MongoDB in the Cloud - Amazon Web Services
miketheman
3
110
Other Decks in Technology
See All in Technology
生成AI時代 文字コードを学ぶ意義を見出せるか?
hrsued
1
310
Observability infrastructure behind the trillion-messages scale Kafka platform
lycorptech_jp
PRO
0
140
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
120
Oracle Audit Vault and Database Firewall 20 概要
oracle4engineer
PRO
3
1.7k
Node-RED × MCP 勉強会 vol.1
1ftseabass
PRO
0
140
変化する開発、進化する体系時代に適応するソフトウェアエンジニアの知識と考え方(JaSST'25 Kansai)
mizunori
1
210
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
200
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
2
1.2k
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
630
Wasm元年
askua
0
140
Clineを含めたAIエージェントを 大規模組織に導入し、投資対効果を考える / Introducing AI agents into your organization
i35_267
4
1.6k
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
260
Featured
See All Featured
Making Projects Easy
brettharned
116
6.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How GitHub (no longer) Works
holman
314
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Thoughts on Productivity
jonyablonski
69
4.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Code Reviewing Like a Champion
maltzj
524
40k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
KATA
mclloyd
29
14k
Transcript
HOW DO YOU KNOW iT’S WORKiNG MONiTORiNG
MiKE FiEDLER Wrangler of the Unusual Twitter: @mikefiedler Github: @miketheman
OpsSchool.org Chef Community Roller Derby Referee © Alex Erde
WHO CARES?
DOES iT EVEN?
DOES iT EVEN? YES iT DOES!
ACTiViTiES - ngx_http_stub_status_module $ nginx -V 2>&1 | grep -o
with-http_stub_status_module with-http_stub_status_module location /basic_status { stub_status; } $ curl http://localhost/basic_status Active connections: 1 server accepts handled requests 8 8 18 Reading: 0 Writing: 1 Waiting: 0
location /basic_status { allow 127.0.0.1; deny all; stub_status on; access_log
off; } Active connections: 45 server accepts handled requests 1023122 1023122 4270474 Reading: 0 Writing: 1 Waiting: 44 ACTiViTiES - SECURE-ER
MOAR??! - ngx_http_status_module
None
FREE AS A BiRD: ❖ awstats ❖ goaccess ❖ syslog/fluentd/logstash
❖ elasticsearch (ELK/EFK) LOGS - SO MUCH DATA DOLLA DOLLA BiLLS: ❖ Logentries ❖ Loggly ❖ Logz.io ❖ Splunk
• Emit log line • Log line is written to
file descriptor • Line is then: ◦ Read ◦ Shipped ◦ Tokenized ◦ Parsed ◦ Stored ◦ Eventually trashed • Oh, wait, the log line format changed?? FFS!! LOG PARSING iS HARD, MiKE!
STATSD (spec) • Push-based • UDP, connectionless • Lightweight datagram
<metric name>:<value>|c[|@<sample rate>] nginx.requests:1|c EMiTTERS TO THE RESCUE!
GET ME AN EMiTTER! Lua-based: • https://github.com/musicglue/ngx_lua_statsd • https://github.com/simplifi/ngx_lua_datadog •
https://github.com/lonelyplanet/openresty-statsd • https://github.com/knyar/nginx-lua-prometheus Native C: https://github.com/zebrafishlabs/nginx-statsd
DiD SOMEONE SAY C? HMMM…. • Get nginx source code
• Get emitter module • Patch a couple of files • Build a package • Config & run server { ... statsd_server localhost; statsd_count "nginx.requests" 1; statsd_count "nginx.responses.$status" 1 "$status"; statsd_count "nginx.request_length" "$request_length"; statsd_count "nginx.bytes_sent" "$bytes_sent"; location / { ...
PROFiT!
INSTRUMENT all resources • CPU • Network I/O • Disk
I/O & space (!!!) SUMMARY - MONiTOR FiRST ALERT on activities • Page loads • Dropped connections • Requests per second • Request timings • Error rates ESTABLiSH BASELiNES PRiOR TO CHANGE!
THANKS! https://github.com/miketheman/ngenious-statsd QUESTiONS?