Using Etsy StatsD on Windows

What do I need to use Etsy Statsd in a Windows environment? My intentions are to create a .net client to use Statsd.

+20
c # windows graphite
Mar 25 '11 at 18:30
source share
7 answers

It is best to have a Linux server with statsd and Graphite installed. Then you just need to write C # code to make the UDP call get the metric on the system.

[UPDATE (6/23/2014): I came across a statsd / Graphite clone statsd.net that looks promising but is mostly missing on the graphite side of the equation. I still find it best to use the actual statsd / Graphite projects, since any clone is needed to catch up.]

+4
Jun 08 2018-11-21T00:
source share

I have statsd + graphite working in my Windows environment using the C # NStatsD client .

Here are my notes on configuring Linux VM:

Note. I know that Linux is quite dangerous, but in any case it is noob and can do something unimaginably terrible.

  • Install Ubuntu Server 12.04. I used VirtualBox for dev and then later EC2 for prod.
  • Download graphite-fabric to your home folder. This is a script that will download, compile and install graphite and statsd. It expects a clean box and uses nginx for the web server.

    sudo apt-get install git

    git clone git://github.com/gingerlime/graphite-fabric.git

    cd graphite-fabric/

  • Set prereq for fabric

    sudo apt-get install python-setuptools

  • The next steps are downloading, compiling and installing, which may take some time. It is worth leaving everything in order for any ssh putty session before proceeding.

  • Now install according to the gangster instructions in README.md - including the requirements section.

  • Install statsd according to the fade instructions.
  • Reboot
  • Running netstat -nulp and observing 8125 is used to confirm listening to statsd.
  • Verify that carbon is running tail /opt/graphite/storage/log/carbon-cache/carbon-cache-a/listener.log . If not, try sudo /etc/init.d/carbon start

Your server is now working for you, try clicking on it for several counters with the NStatsD client.

Time zone correction :

This captures graphite for graph times in your local area.

  • cd /opt/graphite/webapp/graphite
  • sudo cp local_settings.py.example local_settings.py
  • sudo chown www-data:www-data local_settings.py (check with ls -l that the permissions look right)
  • sudo pico local_settings.py Set TIME_ZONE to something like Australia/Sydney . Find out what time intervals you can use in /usr/share/zoneinfo/
  • Save and restart the window (not sure how to get it to select changes without rebooting).

EC2 Notes

root is disabled on EC2. The fabric asks for a root password that you do not have. Use the -i keyfile argument with fab to use its ssh keyfile instead.

VirtualBox Notes

VBoxVMService was convenient to automatically start the virtual machine as a service in my Windows environment.

+14
Jun 05 2018-12-12T00:
source share

TL; DR:

  • statsd.net is a scalable clone of statsd with many cool add-ons and is designed for Windows-oriented environments. The first release is May 29, 2013.
  • statsd-csharp-client is a lightweight statsd and statsd.net client available for .net 3.5, 4.0 and 4.5 via nuget.

Full disclosure: I am the author of these two projects, and I wrote them because I could not use the etsy statsd service for production - my organization is not ready to deploy and maintain nodejs-based services.

I had the same problem in my organization - we are a Windows-oriented environment that wants to collect statistics from around the world into a single graphite repository. I initially thought about using etsy statsd, but my company is not ready to start using nodejs services in production yet. Along the way, I found that having my own aggregation service meant that I could do many interesting things, for example, add memcached support for scalability, add new aggregators, etc.

The service is available in console mode right now and will be ready for use from May 29, 2013.

+7
May 08 '13 at 21:08
source share

We rebuilt Graphite / StatsD in pure .NET. Currently, it is used in the production environment, processing about 600 million data daily.

Statsify :

enter image description here

+5
Jun 03 '15 at 8:40
source share

There are quite a few open source StatsD implementations available in many languages, including C # .NET. Etsy provides one of its github examples , also check out the AppFirst version statsd_clients .

+2
Aug 17 '12 at 17:30
source share

The current versions of statsd and nodejs allow statsd to run on Windows without any corrections. The statsd package.json file already contains scripts for installing and removing it as a Windows service.

Installation Procedure:

  • Install nodejs for windows
  • Create a directory like C: \ StatsD
  • Open a console window and cd \StatsD
  • Then do npm install https://github.com/etsy/statsd.git
  • In the node_modules\statsd create your own config.json
  • In the console window, execute cd node_modules\statsd and npm run-script install-windows-service

However, Graphite only works on Linux.

+2
Nov 24 '15 at 9:09
source share

You need a statsd server to connect.
You also need a client library to connect to it, for example. this and nuget package .

+1
Dec 14
source share



All Articles