It’s important to have visibility into every layer of your system. Whatever platform or stack your applications are built on, chances are that your monitoring platform of choice supports the StatsD protocol for ingesting metrics.

Artillery comes with built in support for publishing to StatsD. That means you can send metrics from your running load tests to your monitoring dashboard (such as Librato, Datadog, Server Density) and see them side by side with your infrastructure and application metrics.

Sending Your Test’s Metrics To StatsD In Real-Time

Install The Plugin

Setting up the plugin is simple. First of all, if Artillery is installed globally, install the plugin with:

npm install -g artillery-plugin-statsd

or if your tests are in their own package, install it with:

npm install --save artillery-plugin-statsd

Enable The Plugin For Your Test

To tell Artillery where the metrics should be sent, configure the plugin with:

      host: "localhost"
      port: 8125
      prefix: "artillery"

host, port and prefix are all optional and the values above are the defaults, so the configuration can be as simple as:

    statsd: {}

That’s it! Run your test as normal with artillery run, and you should see stats on your dashboard.

What Metrics Get Sent By Artillery?

By default, every metrics from Artillery is reported such as response times, the number of requests or messages sent, HTTP codes and error counts (such as network errors). The full list of published metrics can be seen in the plugin’s README.

Using Artillery StatsD Plugin With Librato

We are fans of Librato for monitoring ourselves. If you’re using Librato too, refer to the plugin’s README to see how to configure it to send metrics to Librato.