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 your primary dashboard 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:
sumSeries(seriesByTag("name=myapp.response","code=200","env=production"))
sumSeries(seriesByTag("name=myapp.response","code!=200","env=production"))
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 |
Example:
Find all series where server matches the regular expression 0\.* and env is not staging
seriesByTag("server=~0\.*","env!=staging")
These are the equivalent of aliasByNodes and groupByNodes.
aliasByTags requires at least one tag name to be passed in, below we have three:
aliasByTags(seriesByTag("server=~0\.*","env!=staging"),"env","server","code")
groupByTags requires an aggregation method to be passed in (e.g. min, max, avg, sum, etc.), below we use sum:
groupByTags(seriesByTag("server=~0\.*", "env!=staging"),"sum","code")
For more information about querying tagged metrics refer to the Graphite Tag Docs.