[postimg]https://www.marcus-povey.co.uk/wp-content/IzqGaQEL.png[/postimage] Further to my last post, I’d like to introduce you to a working implementation of the stats gathering mechanism using Etsy StatsD and NodeJS.
StatsD is a Node.JS stats server created by the people at etsy to provide a simple way of logging useful statistics from software. These statistics are an invaluable way of…
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
[postimg]https://www.marcus-povey.co.uk/wp-content/IzqGaQEL.png[/postimg] I have recently been doing a lot of development work for a very large Known installation. This installation is highly customised, has many active users, all doing unexpected and creative things with the platform, and makes use of many of Known’s more advanced features in often quite unexpected ways.
This year I was invited to give a talk at the NDC Oslo 2015 about using StatsD to measure your application. Giving a really long talk to a big crowd of non-native Dutch attendees was quite the feat! Had a lot of fun, learned a lot!
The NDC
The NDC (Norwegian Developer Conference) is an annually hosted conference originating from Oslo with spinoffs in London and Australia next year. The focus of the conference is mainly .NET developers, altough with the increasing popularity for F# and IoT, the talk subjects are also diversifying . The days are long (9:00-19:00) and the number of talks is huge (9+ parallel tracks!). The combination of the speaker dinner on the first day and the party the second day makes for a really intense conference packed with fun and brilliant ideas..
Knowledge is power! The guide to measure what matters
How do you monitor the key performance indicators of your application? Do you know if signups are decreasing versus last week? Have you adopted agile principles but also a hard time to monitor the improvements of your continuous deployments? In this talk we will briefly discuss multiple measuring solutions before diving into the nitty-gritty details of measuring with the help of StatsD. We will implement a few counters and timers and graph these so we can start to make sense of the data. Then we will use powerful functions to analyse the data and spot trends before your users do.
After this talk you will be empowered to create your own data metrics with help of StatsD and have basic knowledge how to plot these metrics into meaningfull graphs. Be empowered!
Code examples will be in C# but technology demonstrated is not limited to this.
Recording
Knowledge is power! The guide to measure what matters. - Mark van Straten from NDC Conferences on Vimeo.
A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
Getting StatsD up and running on Ubuntu 14.04 in 10 minutes
Even though that sending metrics to StatsD is really easy the installation of the StatsD stack on a webserver is historically non-trivial. Because the components are now available as apt-get packages and all guides that I found are long, incomplete or contain user intervention I have scripted an unattended install of StatsD on Ubuntu 14.04.
The script is currently located at Github. Also contained in the repository is a Docker config file to easily test the script. The Docker container exposes ports 8080, 8125 and 8126 for interaction with StatsD and Graphite.
Installation proces
SSH into your fresh Ubuntu 14.04 machine
Download the script wget https://raw.githubusercontent.com/crunchie84/ubuntu-statsd-server-installer/master/install-statsd-trusty-1404.sh
Make it executable chmod +x install-statsd-trusty-1404.sh
Run it sudo ./install-statsd-trusty-1404.sh
What this does
The script itself is commented so you can check it out. In essence it: - Installs Graphite-web + apache2 for displaying of metrics - Installs Carbon-cache for metrics storing - Installs StatsD for metrics aggregating - Tweaks some settings on the graphite-web Django DB, inits it - Tweaks some retention profiles for carbon-cache - Creates upstart scripts for StatsD - Starts all services
Now its time to insert your first metric into StatsD:
# Send a metric to statsd from bash # # Useful for: # deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) # init scripts # sending metrics via crontab one-liners # sprinkling in existing bash scripts. # # netcat options: # -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. # -u Use UDP instead of the default option of TCP. # echo "deploys.test.myservice:1|c" | nc -w 1 -u graphite.example.com 8125
Solution: Alternative to etsy/statsd #programming #it #dev
Solution: Alternative to etsy/statsd #programming #it #dev
Alternative to etsy/statsd
Is there any alternative to etsy’s statsd? Maybe even a complete dashboard-like solution? My research only found proprietary SaaS solutions.
For those who do not know: statsd is a deamon which collects app and system metrics via UDP and sends them to Graphite to generate more or less beautiful plots. There is an API for all important languages available.