You can use the same Carbon endpoints you already use to send tagged metrics. All you need to do is include the tags and values in the updated Carbon line protocol format (unix timestamp is optional):
my.series;tag1=value1;tag2=value2 metric_value (timestamp)
E.g. to get started quickly you can use the netcat utility as follows:
echo "YOUR-API-KEY.foo.bar;tag1=value1;tag2=value2 1.2" | nc carbon.hostedgraphite.com 2003
Sending metrics in your favourite language is similar. Refer to our language guide.
In Grafana (or Graphite) you can search for metrics by their tag values, or by the metric name. All queries should be within a seriesByTag graphite function. You can do this in Grafana by toggling the query box to free-text-mode and typing out the full query. Or you could begin by adding the seriesByTag function and filling the boxes with your search terms using the expressions (see table below) where necessary.
You can use any number of tag expressions to filter through your metrics:
seriesByTag("name=myapp.response") seriesByTag("name=myapp.response","code=200") seriesByTag("name=myapp.response","code=200","env=production")
Other graphite functions also work, such as sumSeries in the below example:
For a full list of Graphite functions and how to use them, check out the Graphite Docs
seriesByTag supports any number of tag expressions to refine the results. If using multiple expressions, only series that match all of them will be returned. Expressions have the following formats:
|tag=spec||tag value exactly matches the spec|
|tag!=spec||tag value does not exactly match the spec|
|tag=~spec||tag value matches the regular expression spec|
|tag!=~spec||tag value does not match the regular expression spec|
Find all series where server matches the regular expression 0\.* and env is not staging