Chance
Chance

Reputation: 172

InfluxDB Query for Tag Values With a Specific Additional Tag

If I have some influx data like:

testMes,feed=test,sourcetype=type1 records=5
testMes,feed=test2,sourcetype=type2 records=10
testMes,feed=test3 records=15

I'm trying to get a list of tag values with key "feed" where the sourcetype tag equals a value "type1". So in the case above I would get just the tag "test". I have tried a query but I know I am way off and after reading the syntax documentation I'm not making progress. Any help on the correct syntax would be appreciated. I have tried:

SHOW TAG VALUES FROM "testMes" WITH KEY="feed" WHERE sourcetype="type1"

Upvotes: 0

Views: 1346

Answers (1)

user10537838
user10537838

Reputation: 64

you were very close :-) the correct syntax is ..

show tag values from "testMes" with key = "feed" where sourcetype = 'type1'

Upvotes: 2

Related Questions