Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
standaloneSA committed Sep 25, 2015
1 parent a470f49 commit ead63b2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,23 @@ You should think carefully about how you name your metrics, because later on,
these names will enable you to easily combine metrics (like load1) across
various sources (like all webservers).

Using metric_base_path to add a universal prefix
------------------------------------------------

In an environment where multiple things are feeding metrics into your backend
service, it can be handy to differentiate by source. Normally, you would need
to prepend the graphiteprefix to all services and hosts, but in some cases, this
isn't possible or feasible.

When you want everything to be prepended with the same string, use the
metric_base_path setting:

metric_base_path = mycorp.nagios

Note that quotes will be preserved. Also, _graphiteprefix and _graphitepostfix
will be applied in addition to this string, so if you are already adding
mycorp.nagios to your prefix, you will end up with mycorp.nagios.mycorp.nagios.metricname

A few words on Naming things for Librato
----------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions graphios.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ replace_hostname = True
# tld.company.datacenter.host
reverse_hostname = False

# This string will be universally pre-pended to metrics, regardless of whether
# or not _graphiteprefix is set.
# metric_base_path = mycorp.nagios

#------------------------------------------------------------------------------
# Carbon Details (comment out if not using carbon)
#------------------------------------------------------------------------------
Expand Down

0 comments on commit ead63b2

Please sign in to comment.