# Queries with dynatrace

**URL:** <https://community.dynatrace.com/t/queries-with-dynatrace/38720>\
**Category:** Logs\
**Tags:** dynatrace-managed, log-monitoring-class, oneagent\
**Created:** [March 6, 2023, 10:18pm UTC](https://community.dynatrace.com/t/queries-with-dynatrace/38720 "2023-03-06T22:18:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gus\_solji](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@gus\_solji](https://community.dynatrace.com/u/gus_solji)\
**Post date:** [March 6, 2023, 10:18pm UTC](https://community.dynatrace.com/t/queries-with-dynatrace/38720/1 "2023-03-06T22:18:54Z")

</div>

hello everyone.

I have 2 applications working with dynatrace, one web application and the other mobile. These applications have request errors, custom errors and javascript errors. Is there a way to make a query where I get back if a particular error is present in both applications?

---

<div class="post-metadata">

**Author:** ![chris\_smerek](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chris_smerek/32/13448_2.png) [@chris\_smerek](https://community.dynatrace.com/u/chris_smerek)\
**Post date:** [March 7, 2023, 4:45pm UTC](https://community.dynatrace.com/t/queries-with-dynatrace/38720/2 "2023-03-07T16:45:07Z")

</div>

Hello!

If you are using Logs and Events with Grail, a potential query could be:

fetch logs  
| filter contains(content, “error1”) and contains(content, “error2”) and host.name == “host1” OR host.name == “host2”

You may need to modify the ‘host.name’ portion to be a different Dynatrace entity in order to match the applications you are referring to (i.e. dt.process.name if you have a process that runs on both applications, or dt.source.entity if you have the exact entity ID of each application).

Hope that helps!
