Description Usage Arguments Value See Also Examples
This function fetches a list of metrics and their tags from ATSD, and converts it to a data frame.
1 2 | get_metrics(expression = "", active = "", tags = "*", limit = 0,
verbose = TRUE)
|
expression |
Optional string argument.
Select metrics matching particular name pattern and/or user-defined metric tags.
The syntax of the |
active |
Optional string argument: "true" or "false".
Filter metrics by |
tags |
Optional string argument. User-defined metric tags to be included in the response. By default, all the tags will be included. |
limit |
Optional integer argument. If limit > 0, the response shows the top-N metrics ordered by name. |
verbose |
Optional boolean argument.
If |
A data frame.
Each row of the data frame corresponds to a metric and its tags:
name
,
counter
,
lastInsertTime
and user-defined metric tags as requested by the 'tags' argument.
For more information view the package vignette:
browseVignettes(package = "atsd")
.
Visit http://axibase.com/axibase-time-series-database/ for information about ATSD.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# get all metrics and include all their tags in the data frame
get_metrics()
# get the top 100 active metrics which have tag, 'table',
# include this tag into response and exclude oter user-defined metric tags
get_metrics(expression = "tags.table != ''", active = "true",
tags = "table", limit = 100)
# get metrics which have user-defined metric tag, 'table',
# and whose name starts with 'cpu'
get_metrics(expression = "name like 'cpu*' and tags.table != ''")
# more complitcated expressions
get_metrics(expression = "likeAll(name, list('*disk*,*use*'))")
get_metrics(expression = "(name like 'cpu*' or tags.source = '') and tags.table like 'BC*'")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.