Selector for "Without A Specific Label"

26 views
Skip to first unread message

Steven Harding

unread,
Feb 16, 2020, 11:59:56 PM2/16/20
to Warp 10 users
How exactly do I write a selector that requests all of the channels that do not have a particular label?


My labels were previously {assetid=<number>, name=<name>}, but I've recently added type, which can be 'cont' (continuous) and 'disc' (discrete).

This means that I've now duplicated all of my measurement channels, which is irritating some of my downstream data consumers - I've now got Pressure{assetid=5,asset=TransmitterX1223} and Pressure{assetid=5,asset=TransmitterX1223,type=cont}

What I'd like to do is erase all of my old GTSes, but the only difference between the ones I want to keep and the ones I want to erase is the absence of the 'type' label.

So basically, I'd like to perform a /DELETE on all channels that don't have the 'type' label - I've tried a few different styles, such as ~.*{!type} or ~.*{type=null} etc, but had no luck. Is there a syntax I can use? 

Pierre

unread,
Feb 17, 2020, 4:52:18 AM2/17/20
to Warp 10 users
Hello, 

There is no way to build a selector to select a missing label.
Trick : You can mark the series to delete with a specific attribute, then use this attribute as a delete selector.
Nice blog article idea... I will edit the thread once released.

And provide your consumers a macro to merge both stream after the fetch, this is an easy patch. 

Reply all
Reply to author
Forward
0 new messages