# 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*'")
# }
Run the code above in your browser using DataLab