Interesting .NET Metrics Libraries
-
A simple .NET library for Graphite and StatsDhttps://github.com/ragnard/Graphite.NET - A simple .NET library to collects stats and pass them on to Graphite
-
A .NET library to send data to Hosted Graphitehttps://github.com/plasma-dot-net/plasma - Client library to send statistics to HostedGraphite.com using .Net, a work-in-progress
Sending a metric via UDP
var endPoint = new IPEndPoint(Dns.GetHostAddresses("carbon.staging5.hostedgraphite.com")[0], 2003);
var bytes = Encoding.ASCII.GetBytes("YOUR-API-KEY.foo 1.2\n");
var sock = new Socket(AddressFamily.InterNetwork,SocketType.Dgram, ProtocolType.Udp) { Blocking = false };
sock.SendTo(bytes, endPoint);
Your API key can be found on your account home page.