27 Jun 2024 10:29 PM
First off we're using a custom extension so hopefully that doesn't put us in too much of a bind but here is our query:
nagios._Check_CPU_Load.load1:filter(and(or(in("dt.entity.custom_device",entitySelector("type(custom_device),fromRelationship.isInstanceOf(type(CUSTOM_DEVICE_GROUP),entityName.equals(~"Blahblahblah~"))"))))):splitBy("dt.entity.custom_device"):sort(value(auto,descending))
This gives us a list of devices. We'd like to exclude 3 devices from this query. These 3 devices have a common word in their name: "test".
Is there something we can add to our existing query so that those 3 devices are excluded?
Solved! Go to Solution.
18 Jul 2024 12:00 PM
The following embedded entity selector can be used:
"type(custom_device),not(entityName.contains(~"test~")),fromRelationship.isInstanceOf(type(CUSTOM_DEVICE_GROUP),entityName.equals(~"Blahblahblah~"))"
31 Jul 2024 06:18 PM
Thank you so much, this works. Would there be a way to exclude multiple entities that have unique names?
20 Aug 2024 08:42 AM
Yes, you can exclude unique names by:
"type(custom_device),not(entityName.in(~"full_device_name1~",~"full_device_name2~",~"full_device_name3~"))"
If you want to exclude multiple devices based on the contains filter, you can achieve this like shown in this example:
"type(custom_device),not(entityName.contains(~"abc~")),not(entityName.contains(~"cbd~")),not(entityName.contains(~"bde~"))"