Skip to content

Commit aa2e518

Browse files
committed
update tagging docs
1 parent 2b58be3 commit aa2e518

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

docs/tags.rst

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,19 @@ The default settings (above) will connect to a local Redis server on the default
113113
HTTP(S) TagDB
114114
^^^^^^^^^^^^^
115115

116-
The HTTP(S) TagDB is used to delegate all tag operations to an external server that implements the Graphite tagging HTTP API. It can be used in clustered graphite scenarios, or with custom data stores. It is selected by setting ``TAGDB='graphite.tags.http.HttpTagDB'`` in `local_settings.py`. There are 3 additional config settings for the HTTP(S) TagDB::
116+
The HTTP(S) TagDB is used to delegate all tag operations to an external server that implements the Graphite tagging HTTP API. It can be used in clustered graphite scenarios, or with custom data stores. It is selected by setting ``TAGDB='graphite.tags.http.HttpTagDB'`` in `local_settings.py`. There are 4 additional config settings for the HTTP(S) TagDB::
117117

118118
TAGDB_HTTP_URL = 'https://another.server'
119119
TAGDB_HTTP_USER = ''
120120
TAGDB_HTTP_PASSWORD = ''
121+
TAGDB_HTTP_AUTOCOMPLETE = False
121122

122123
The ``TAGDB_HTTP_URL`` is required. ``TAGDB_HTTP_USER`` and ``TAGDB_HTTP_PASSWORD`` are optional and if specified will be used to send a Basic Authorization header in all requests.
123124

125+
``TAGDB_HTTP_AUTOCOMPLETE`` is also optional, if set to ``True`` auto-complete requests will be forwarded to the remote TagDB, otherwise calls to `/tags/findSeries`, `/tags` & `/tags/<tag>` will be used to provide auto-complete functionality.
126+
127+
If ``REMOTE_STORE_FORWARD_HEADERS`` is defined, those headers will also be forwarded to the remote TagDB.
128+
124129
Adding Series to the TagDB
125130
--------------------------
126131
Normally `carbon` will take care of this, it submits all new series to the TagDB, and periodically re-submits all series to ensure that the TagDB is kept up to date. There are 2 `carbon` configuration settings related to tagging; the `GRAPHITE_URL` setting specifies the url of your graphite-web installation (default `http://127.0.0.1:8000`), and the `TAG_UPDATE_INTERVAL` setting specifies how often each series should be re-submitted to the TagDB (default is every 100th update).
@@ -136,6 +141,22 @@ Series can be submitted via HTTP POST using command-line tools such as ``curl``
136141
137142
This endpoint returns the canonicalized version of the path, with the tags sorted in alphabetical order.
138143

144+
To add multiple series with a single HTTP request, use the ``/tags/tagMultiSeries`` endpoint, which support multiple ``path`` parameters:
145+
146+
.. code-block:: none
147+
148+
$ curl -X POST "http://graphite/tags/tagMultiSeries" \
149+
--data-urlencode 'path=disk.used;rack=a1;datacenter=dc1;server=web01' \
150+
--data-urlencode 'path=disk.used;rack=a1;datacenter=dc1;server=web02' \
151+
--data-urlencode 'pretty=1'
152+
153+
[
154+
"disk.used;datacenter=dc1;rack=a1;server=web01",
155+
"disk.used;datacenter=dc1;rack=a1;server=web02"
156+
]
157+
158+
This endpoint returns a list of the canonicalized paths, in the same order they are specified.
159+
139160
Exploring Tags
140161
--------------
141162
You can use the HTTP api to get lists of defined tags, values for each tag, and to find series using the same logic as the `seriesByTag <functions.html#graphite.render.functions.seriesByTag>`_ function.
@@ -309,3 +330,13 @@ Series can be deleted via HTTP POST to the `/tags/delSeries` endpoint:
309330
--data-urlencode 'path=disk.used;datacenter=dc1;rack=a1;server=web01'
310331
311332
true
333+
334+
To delete multiple series at once pass multiple ``path`` parameters:
335+
336+
.. code-block:: none
337+
338+
$ curl -X POST "http://graphite/tags/delSeries" \
339+
--data-urlencode 'path=disk.used;datacenter=dc1;rack=a1;server=web01' \
340+
--data-urlencode 'path=disk.used;datacenter=dc1;rack=a1;server=web02'
341+
342+
true

0 commit comments

Comments
 (0)