forked from bimdata/ansible_role_fluentbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#170697: Add request uri pattern lua script
- Loading branch information
Dan Masteller
committed
Dec 5, 2023
1 parent
fc95170
commit 536f01e
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- add requestUriPattern based on requestUri | ||
function add_request_pattern(tag, timestamp, record) | ||
if record["requestUri"] ~= nil | ||
then | ||
uri = record["requestUri"] | ||
pattern = uri:gsub("/[^/]*%d+[^/.]*", "/#") | ||
record["requestUriPattern"] = pattern | ||
end | ||
return 1, timestamp, record | ||
end |