admin管理员组

文章数量:1345011

I recently joined a company that uses Datadog for observability, and I'm having trouble building a specific log query for a dashboard in the web GUI.

I need to create a filter that does a full-text search for any logs containing the string *schedule*, but only if it is not a substring of *scheduledtask*. Here are a few examples. I have highlighted the parts of the query that should match

Logs that should match:

"Error building scheduleStep as part of scheduledtask_A"

"Error building scheduleScore"

Logs that should not match:

"Error with scheduledtask_A"

So far, I've tried these queries:

   *:*schedule* AND -*:*scheduledtask*

This works for the second case but excludes the first log (i.e., it doesn't match "Error building scheduleStep as part of scheduledtask_A").

*:*schedule*

This matches the logs that contain schedule (including the logs I want to exclude), but I can't figure out how to exclude logs containing just scheduledtask.

I know Datadog doesn't allow regular expressions in log queries, so I'm a bit stuck. Does anyone have suggestions on how to build this query?

Any help or insights would be greatly appreciated. Thank you in advance!

本文标签: