Search code examples
grafanainfluxdb

How to count the tag values with specific key in influxDB?


I am using the command "show tag values on with key = " it is showing me the list of tags but I want to count the entries related to that tag.


Solution

  • I guess you want to know tag values cardinality:

    SHOW TAG VALUES EXACT CARDINALITY WITH KEY = "myTagKey"
    

    Doc: https://docs.influxdata.com/influxdb/v1.7/query_language/spec/#show-tag-values-cardinality