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.

⚠️ Update (17 January 2019): The artillery-plugin-statsd plugin described in this post has been superseded by artillery-plugin-publish-metrics which can ship Artillery metrics to a number of external monitoring metrics including StatsD. Use artillery-plugin-publish-metrics instead of artillery-plugin-statsd on new projects.

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

If you’re using Artillery v1.5.7 or earlier, you need to install the plugin separately. Otherwise, there’s nothing to install as the plugin has been merged into Artillery itself.

If you’re on an old version of Artillery and unable to upgrade for some reason, the plugin can be installed with:

npm install -g 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.