char *p = strchr(tmp, '.');
if(p) *p=0;
hostname=tmp;
+ boost::replace_all(hostname, ".", "_");
}
BOOST_FOREACH(const string& entry, entries) {
str<<"pdns."<<hostname<<".auth."<<entry<<' '<<S.read(entry)<<' '<<now<<"\r\n";
## Sending to Carbon/Graphite/Metronome
For carbon/graphite/metronome, we use the following namespace. Everything starts with 'pdns.', which is then followed by the local hostname. Thirdly, we add either 'auth' or 'recursor' to siginify the daemon generating the metrics. This is then rounded off with the actual name of the metric. As an example: 'pdns.ns1.recursor.questions'.
+**Warning**: If your hostname includes dots, beyond 3.6.2 they will be
+replaced by underscores so as not to confuse the namespace. In 3.6.2 and earlier,
+any dots will remain unchanged. See below for how to override the hostname.
+
Care has been taken to make the sending of statistics as unobtrusive as possible, the daemons will not be hindered by an unreachable carbon server, timeouts or connection refused situations.
To benefit from our carbon/graphite support, either install Graphite, or use our own lightweight statistics daemon, Metronome, currently available on [GitHub](https://github.com/ahupowerdns/metronome/).
-Secondly, set [`carbon-server`](../authoritative/settings.md#carbon-server), possibly [`carbon-interval`](../authoritative/settings.md#carbon-interval) and possibly [`carbon-ourname`](../authoritative/settings.md#carbon-ourname) in the configuration.
+Secondly, set [`carbon-server`](../authoritative/settings.md#carbon-server),
+possibly [`carbon-interval`](../authoritative/settings.md#carbon-interval)
+and possibly [`carbon-ourname`](../authoritative/settings.md#carbon-ourname)
+in the configuration.
+
+**Warning**: If you include dots in `carbon-ourname`, they will not be replaced by underscores,
+since PowerDNS assumes you know what you are doing if you override your hostname.
+
Comma separated list of 'zonename=filename' pairs. Zones read from these files (in BIND format) are served authoritatively. Example: `auth-zones=example.org=/var/zones/example.org, powerdns.com=/var/zones/powerdns.com`. Available since version 3.1.
## `carbon-ourname`
-If sending carbon updates, if set, this will override our hostname. See ["PowerDNS Metrics"](../common/logging.md#sending-to-carbongraphitemetronome). Available beyond 3.5.3.
+If sending carbon updates, if set, this will override our hostname. Be
+careful not to include any dots in this setting, unless you know what you
+are doing. See ["PowerDNS Metrics"](../common/logging.md#sending-to-carbongraphitemetronome).
+Available beyond 3.5.3.
+
## `carbon-server=...`
If set to an IP or IPv6 address, will send all available metrics to this server via the carbon protocol, which is used by graphite and metronome. See ["PowerDNS Metrics"](../common/logging.md#sending-to-carbongraphitemetronome). Available beyond 3.5.3.
if(p) *p=0;
hostname=tmp;
+ boost::replace_all(hostname, ".", "_");
}
BOOST_FOREACH(const all_t::value_type& val, all) {
str<<"pdns."<<hostname<<".recursor."<<val.first<<' '<<val.second<<' '<<now<<"\r\n";