28 May 2019 08:13 AM - last edited on 14 Dec 2021 11:35 AM by MaciejNeumann
Hi all,
I have a question about tag.
Can I search for Entities there are not any tags?
In large environments, it takes time to check each Entities to see if it is tagged.
Is there any way to search?
Best regards,
Tomoko Fukuda
Solved! Go to Solution.
28 May 2019 10:26 AM
Hmmm i think this may be hard to do.
Only Idea I have is Environment API, there you can list all entities and check via script which of them has tags or not. You can make it via simple regex in sublime as well.
Sebastian
28 May 2019 11:14 AM
No you cannot. The only way is to use the environment API. For example to query services with no tags:
curl -XGET -H "Authorization: api-token $APITOKEN" "$TENANT/api/v1/entity/services"|jq '.[]|select(.tags=[])'
28 May 2019 12:14 PM
It can be done. Ideally i would do is pull the monitors data in a file using API and script and then in same script will parse the file for the required data without tags.
28 May 2019 12:15 PM
If you can do it fine otherwise let me know i will write something down for you.