Netuitive StatsD

The Netuitive StatsD integration interprets, aggregates, and forwards custom metrics generated from your application. Using the values instrumented from your application’s key actions and data (method calls, database queries, etc.), CloudWisdom aggregates the values, associates them with corresponding metrics, and analyzes them in our analytics cycles.

The Netuitive StatsD server comes pre-installed as part of the Linux Agent. We recommend setting up a Netuitive StatsD integration if you do not have a StatsD server already.

Metrics are taken into the server using the specified UDP format:|metrictype|@samplerate|#tag1:value1, tag2,



  1. Navigate to the Linux Agent configuration file, /opt/netuitive-agent/conf/netuitive-agent.conf.
  2. Change the enabled setting to True in the [[[statsd]]] section of the file.
    • Optionally, adjust the listen (listen_port and listen_ip) and forward (forward_ip, forward_port, and forward) options. The listen settings tell the Linux Agent where to listen for metrics; typically the server that your application is located. The forward settings tell the Linux Agent where to send the information.
  3. Restart the Linux Agent.


Netuitive StatsD will collect and organize your data as your application calls functions and methods. This data is flushed to the Metricly StatsD server every 60 seconds by default, and then aggregated in CloudWisdom’s five-minute batch analytics cycle. After CloudWisdom analyzes your data, it’s then graphed for you to see. The Metricly StatsD server will place all of your metrics under the StatsD namespace in the Metrics page. Metrics about the Netuitive StatsD server itself are organized under the netuitive-statsd namespace in the Metrics page.

Before you begin instrumenting custom metrics, you’ll need to find a language library to “talk” to the Netuitive StatsD server using certain metric types. Netuitive StatsD supports the following metric types:


Count how many times an event occurs.



Each time a different language is given in the function below, a metric’s value increments by one. If a language is not found, another metric is created to show how many times a language was not found.


var Client = require('node-statsd-client').Client;

 var netuitiveStatsd =  new Client("localhost", 8125);

 function translateHello(language) {
     if (language == "German") {
         return "Hallo";

     if (language == "Spanish") {
         return "Hola";

     if (language == "French") {
         return "Bonjour";

     else {
         return "Sorry, I don't recognize that language.";

 var languageName = prompt("Please enter which language you want to translate 'Hello' to:");



Measure in milliseconds how long an action took.



We want to see how long it takes for our PHP server to count to 10000.


    $start = microtime(true);

    for ($x=0; $x<10000; $x++) {}

    $end = microtime(true);

    $finalTime = $end-$start;

    echo 'It took ' . $finalTime . ' seconds!';

    .timing('', $finalTime, 1);



An arbitrary, persistent value (e.g., a fuel meter).



Each time you order a pizza, you want to know what percentage of the pizza you ate.

#!/usr/bin/my ruby srv

    require 'rubygems' if RUBY_VERSION < '1.9.0'
    require './statsdclient.rb' = 'localhost'
    Statsd.port = 8125

    class Numeric
      def percent_of(n)
        self.to_f / n.to_f * 100.0

    def prompt(*args)

    #input variables
    total_pizza_slices = 0
    eaten = 0

    #user prompts
    total_pizza_slices = prompt "How many total slices made up the pizza? "

    eaten = prompt "How many slices did you eat? "

    percent_eaten = eaten.percent_of(total_pizza_slices)
    p "You ate #{percent_eaten} of the pizza!"
    Statsd.gauge('', percent_eaten)


A number of unique elements received over a set interval.



The statistical distribution of a set of values.



You can also pass in tags to any of your metrics like so:

netuitive_statsd.increment('login.errors', tags=['name', 'value'])

Reserved Metric Tags

Netuitive StatsD already uses a few tags, so be mindful when passing in tags with StatsD metrics.

  • h: Sets the hostname (element ID) of the element. The h tag should be replaced with caution, as replacing it with a custom value will create a separate, extra element.
  • un: Sets the unit of the metric you’re creating. An exhaustive list of the units Netuitive StatsD supports can be found here.
  • sds: Defines the strategy for replacing missing data. You can either replace missing data with a zero (ReplaceWithZero) or take no strategy at all (None). You should schedule a data push at least once in every five-minute cycle. If you cannot send data every five minutes, you should consider sending zeroes.
  • ty: Sets the type of the element in Netuitive StatsD (e.g., SERVER).

Optional Configuration

Option Default Description
enabled TRUE Enable collecting Netuitive StatsD metrics.
interval 60 The interval (in seconds) at which to collect metrics.
listen_port 8125 User Datagram Protocol (UDP) port to listen on.
listen_ip IP address to listen on.
element_type SERVER Element type applied to your netuitive-statsd server instance in CloudWisdom.
prefix statsd Prefix applied to your netuitive-statsd metrics in CloudWisdom. Setting an empty prefix causes no prefix to be added.
forward_ip IP address to forward StatsD messages to.
forward_port 9125 UDP port to forward StatsD messages to.
forward FALSE Enable StatsD forwarding.