metrics.names configures the template for the route metric names on backends that don’t support tags. This is used in circonus, graphite and statsd_raw. dogstatsd and prometheus ignore this. The value is expanded by the text/template package and provides the following variables:

  • Service: the service name
  • Host: the host part of the URL prefix
  • Path: the path part of the URL prefix
  • TargetURL: the URL of the target

The following additional functions are defined:

  • clean: lowercase value and replace . and : with _

Given a route rule of

route add testservice

the template variables are:

.Service = testservice
.Host =
.Path  = /
.TargetURL.Host =

which results to the following metric name when using the default template:


The default is

metrics.names = {{clean .Service}}.{{clean .Host}}.{{clean .Path}}.{{clean .TargetURL.Host}}