VCF Operations for Logs Log Filtering
- Brock Peterson

- 5 days ago
- 1 min read
I was recently doing some Log Filtering in my VCF Operations for Logs 9.0.2 lab and noticed some nuanced behavior, namely when filtering logs based on text, this is what I found.
In Log Management - Log Filtering you'll notice this.

I'm trying to filter out any logs/events with the string "logout" in them, so I configured a filter against the text field and matches logout. What caught my eye right away is that there are only two operators here: matches and does not match. You'll notice we don't have contains, does not contain, matches regex, and other operators available elsewhere in Operations for Logs. Clicking the "Run in Explore Logs page" gives us the results.

You'll notice the filter gets converted to this:
text matches regex ^logout$As you probably know, this matches only strings "logout", nothing before it, nothing after it, etc. And as you can see there are definitely logs with the string "logout" in them.

To actually filter out the logs I wanted to, I had to adjust the filter to this.

Clicking on the "Run in Explore Logs page" gives us this.

This is what I expected originally! As you can see, the filter gets converted to this.
text matches regex ^.*logout.*$This regex expression is far more inclusive than the previous one. It includes any string with "logout" anywhere in it. Here's a KB related to what we experienced here, hope this was helpful!
Comments