Skip to content
Send data from StatsD to Zabbix
JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples codebase overhaul Jan 12, 2018
script codebase overhaul Jan 12, 2018
.ackrc codebase overhaul Jan 12, 2018
.travis.yml codebase overhaul Jan 12, 2018

StatsD Zabbix backend Build Status

Backend for StatsD to publish stats to Zabbix.

Table of Contents generated with DocToc


Tested with Node 6+.

npm install statsd-zabbix-backend


Example StatsD configuration:

  debug: true,
  flushInterval: 10000,
  percentThreshold: [95, 99],
  backends: ["statsd-zabbix-backend"],
  zabbixHost: "",


  • zabbixHost: Hostname or IP for Zabbix server [default: localhost]
  • zabbixPort: Port for Zabbix server [default: 10051]
  • zabbixSendTimestamps: Send timestamps to Zabbix, otherwise [default: false]
  • zabbixTargetHostname: Set static hostname, use full stat as key [default: undefined]


This plugin is primarily designed for use with logstash > statsd > zabbix pipline, but should work for getting data from any source into Zabbix.


All Zabbix items are expected to be type Zabbix trapper to support receiving push data.

Most values should be decimal. Average (avg) or mean values should be float.

Stat Names

Send your host and key separated by an underscore, for example:


Stats starting with any of the following prefixes will be handled differently:

  • logstash.
  • kamon.
  • statsd.

Static Hostname

If you run statsd on each host, set option zabbixTargetHostname to send all stats to a single host. In this mode, the full stat name will be used as the item key in Zabbix.


Logstash's statsd output sends data in the format namespace.sender.metric.

  • namespace: default is "logstash"
  • sender: default is "%{host}", replacing dots with underscores
  • metric: name of the metric used in increment

See Logstash examples for specific keys Zabbix will receive based on metric type.

Note: sender and metric will have underscores replaced by periods before being sent to Zabbix.


Logstash statsd output using increment:

  statsd {
    host => ""
    increment => ["my_key"]

Logstash sends to Statsd: logstash.host_example_com.my_key:1|c.

Statsd calculates 2 values every flushInterval and sends each as a separate key to Zabbix for host "":

  • my.key[avg]
  • my.key[total]


Logstash statsd output using timing:

  statsd {
    host => ""
    timing => {
      "my_key" => "1"

Logstash sends to Statsd: logstash.host_example_com.my_key:1|ms

Given the percentThreshold in the example Statsd config, each of the following values would be calculated every flushInterval and sent as a separate keys to Zabbix for host "":

  • my.key[mean][95]
  • my.key[upper][95]
  • my.key[mean][99]
  • my.key[upper][99]
  • my.key[upper]
  • my.key[lower]
  • my.key[count]


Gauges are also supported.

  statsd {
    host => ""
    gauge => {
      "my_key" => "1"

Logstash sends to Statsd: logstash.host_example_com.my_key:1|g

Zabbix will receive a single item:

  • my.key
You can’t perform that action at this time.