You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server {
# ...
access_log /var/log/nginx/app1/access.log;
}
server {
# ...
access_log /var/log/nginx/app2/access.log;
}
It would be handy to be able to extract the application name from the log file path. Something like this:
namespace "nginx" {
source = {
files = [
"/var/log/nginx/access.log",
"/var/log/nginx/*/access.log",
]
}
relabel "app" {
from = "log_path"
match "^/var/log/nginx/(.+?)/access\\.log$" {
replacement = "$1"
}
# ... and maybe a fallback value like "other" if no matches found
}
}
The text was updated successfully, but these errors were encountered:
I have a nginx configuration similar to:
It would be handy to be able to extract the application name from the log file path. Something like this:
The text was updated successfully, but these errors were encountered: