What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to filter tags with logical and?

Votes:

0

In Sorting and Advanced Filtering API document has one like that

filter_tags | Only include sensors with a specific tag (for content="sensors" only). Using multiple filter_tag fields performs a logical OR. | @tag(tagname).

I tried using tag name with space and comma but it also made a logical OR.

How do I filter tags with logical and?

filtering prtg

Created on Jul 21, 2017 5:11:18 AM



9 Replies

Accepted Answer

Votes:

0

Hi there,

A preceeding + should do the trick here, like this: @tag(+tag,+newtag)
It translates to "Must have this tag and this tag". Let me know if it worked out :)

Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 21, 2017 6:42:55 AM by  Stephan Linke [Paessler Support]

Last change on Apr 21, 2021 5:52:07 AM by  Timo Dambach [Paessler Support]



Votes:

0

Thank you so much, it works well

Created on Jul 21, 2017 7:08:44 AM



Votes:

0

Will this work with Libraries with Filter by Tags? If no how i can filter only by two tags in?

Created on Sep 27, 2018 8:13:50 AM



Votes:

0

Yes, this works in the mentioned field as well. Use +tag1, +tag2 to have them linked via logical AND.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Sep 27, 2018 8:49:31 AM by  Stephan Linke [Paessler Support]



Votes:

0

I'm trying to do this with the API and it doesn't seem to work. for example

&filter_tags=@tag(+tag1) = a small set of sensors
&filter_tags=@tag(+tag1,+tag2) = a larger set of sensors

it returns sensors that are either tag1 or tag2 instead of AND. Can this not be done on the API?

Created on Oct 31, 2018 3:44:59 PM

Last change on Nov 1, 2018 8:11:52 AM by  Stephan Linke [Paessler Support]



Votes:

0

Could you provide me with the whole query? I'm pretty sure that it worked with PRTG 17.x. You're running the latest version I assume?


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 1, 2018 8:35:41 AM by  Stephan Linke [Paessler Support]



Votes:

0

I am using the latest version. Can I email/msg it to you directly? I'd prefer not to post the whole query in a public forum.

Created on Nov 1, 2018 9:58:48 AM



Votes:

0

Sure, just drop us a mail via [email protected].


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 1, 2018 10:09:18 AM by  Stephan Linke [Paessler Support]



Votes:

0

Note: The + sign has to be URL-encoded. So, use %2b instead of "+". Also have a look here

Kind Regards,
Timo Dambach
Paessler Tech Support

Created on Apr 21, 2021 5:53:50 AM by  Timo Dambach [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.