Changeset

1448:d722a4defea7

mod_statsd: Optionally include host in prefix
author daurnimator <quae@daurnimator.com>
date Mon, 23 Jun 2014 16:05:54 -0400
parents 1447:e96ac4291b36
children 1449:365f6db9531a
files mod_statsd/mod_statsd.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_statsd/mod_statsd.lua	Mon Jun 23 16:05:33 2014 -0400
+++ b/mod_statsd/mod_statsd.lua	Mon Jun 23 16:05:54 2014 -0400
@@ -21,7 +21,10 @@
 function send(s) return sock:send(s) end
 
 -- prefix should end in "."
-local prefix = (options.prefix or ("prosody." .. clean(module.host))) .. "."
+local prefix = (options.prefix or "prosody") .. "."
+if not options.no_host then
+	prefix = prefix .. clean(module.host) .. "."
+end
 
 -- Track users as they bind/unbind
 -- count bare sessions every time, as we have no way to tell if it's a new bare session or not