{
  "graphitePort": <%= @graphite_port %>,
  "graphiteHost": "<%= @graphite_host %>",
  "address": "<%= @address %>",
  "port": <%= @port %>,
  "flushInterval": <%= @flush_interval %>,
  "percentThreshold": <%= @percent_threshold %>,
  "deleteIdleStats": <%= @delete_idle_stats %>,
  "deleteGauges": <%= @delete_gauges %>,
  "deleteTimers": <%= @delete_timers %>,
  "deleteSets": <%= @delete_sets %>,
  "deleteCounters": <%= @delete_counters %>,
  "graphite": {
    "legacyNamespace": <%= @legacy_namespace %>,
    "globalPrefix": "<%= @global_prefix %>",
    "globalSuffix": "<%= @global_suffix %>",
    "prefixCounter": "<%= @prefix_counter %>",
    "prefixTimer": "<%= @prefix_timer %>",
    "prefixGauge": "<%= @prefix_gauge %>",
    "prefixSet": "<%= @prefix_set %>"
  },
  "dumpMessages": "<%= @dump_messages %>"
}

{
  "graphitePort": <%= @graphite_port %>,
  "graphiteHost": "<%= @graphite_host %>",
  "address": "<%= @address %>",
  "port": <%= @port %>,
  "flushInterval": <%= @flush_interval %>,
  "percentThreshold": <%= @percent_threshold %>,
  "deleteIdleStats": <%= @delete_idle_stats %>,
  "deleteGauges": <%= @delete_gauges %>,
  "deleteTimers": <%= @delete_timers %>,
  "deleteSets": <%= @delete_sets %>,
  "deleteCounters": <%= @delete_counters %>,
  "graphite": {
    "legacyNamespace": <%= @legacy_namespace %>,
    "globalPrefix": "<%= @global_prefix %>",
<% if !@global_suffix.empty? %>
    "globalSuffix": "<%= @global_suffix %>",
<% else %>
    "globalSuffix": undefined,
<% end %>
    "prefixCounter": "<%= @prefix_counter %>",
    "prefixTimer": "<%= @prefix_timer %>",
    "prefixGauge": "<%= @prefix_gauge %>",
    "prefixSet": "<%= @prefix_set %>"
  },
  "dumpMessages": "<%= @dump_messages %>"
}

Make sure globalSuffix is undefined when not used.
Make sure globalSuffix is undefined when not used.

Otherwise, StatsD will create metrics like '.../metric/rate/.wsp'
instead of '.../metric/rate.wsp'.
