-
Notifications
You must be signed in to change notification settings - Fork 93
the Query interface
Basically what this example does, is first retrieving all metrics that match the filters, and showing them on stacked graphs, one graph for the metrics for device bond0, and another graph for bond1. The metrics are speeds in b/s, averaged out over 4 matching servers. The graph shows a plot for each type (rx and tx).
How this works in detail, I'll explain below:
-
filters
Only retrieve targets that match the filters. Searches in the metric id, or on the given tags, either with substring matching, regex search or equality checks. Negation is supported and order doesn't matter. Alltargets_matching
metrics that match the filters, will be used, uptolimit
. -
group_by
control how metrics are grouped into graphs: graphs bundle all targets that have the same value for all tags ingroup_by
. If metrics have a different value for any of these tags, they go to a different graph. By default grouping happens by target_type, unit, and server; you can extend or replace this list; in this case we group by target_type, unit and device. So allgraphs_from_matching_targets
have a unique selection of values of these tags. See alsoconstant tags
. -
avg_by
one of the aggregation methods: for all targets that go together on a graph, all targets with any value for this tag will be averaged and represented as one. I.e. the graph shows the average of all 4 matched servers. You can also aggregate by summing. -
avg_over
depending on how spikey a graph is, you can smooth it out by averaging over a certain time interval. -
from_to
control the time range. -
constant tags
these tags are the same for all metrics of this graph; either explicitly because ofgroup_by
, or by "coincidence" (e.g. in this example they happen to have the same value for "plugin" (network)) -
variable tags
targets on the graph are represented by those tags that distinguish themselves from the others on this graph. In this case the only difference between the metrics on the graph is type=rx vs type=tx. -
tag_legend
shows all tag keys found amongst the found metrics. the color of the tag is generated from the tag key, so because usually only the value of tags is shown (i.e. inconstant tags
andvariable tags
), this helps in recognizing the key of tags, though you can alsways mouseover any tag to see the key -
vtitle
shows the unit tag. -
other_graphs
because some targets have another value for one of thegroup_by
tags is (device is bond1), GE shows those on a new graph.