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
if i want to follow the all logfiles,should i configure like this:
namespace "test" {
source {
files = [
"/opt/log/nginx/0.xxxxx.com/0.xxx_access.log",
"/opt/log/nginx/1.xxxxx.com/1.xxx_access.log",
"/opt/log/nginx/2.xxxxx.com/2.xxx_access.log",
.....
]
// ...
}
}
if i add a new log file, if the exporter can aware the new log file which is added;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Our nginxlogs are stored on “/opt/log/nginx”;
like
[root()@tjtx40-0-27 nginx]# tree
.
├── 0.xxxxx.com
│ ├── 0.xxx_access.log
├── 1.xxxxx.com
│ ├── 1.xxx_access.log
......
......
how can i follow all the logfile ? the [README] shows that
Reading from files
When reading from log files, all that is needed is a files property:
namespace "test" {
source {
files = ["/var/log/nginx/access.log"]
// ...
}
}
if i want to follow the all logfiles,should i configure like this:
namespace "test" {
source {
files = [
"/opt/log/nginx/0.xxxxx.com/0.xxx_access.log",
"/opt/log/nginx/1.xxxxx.com/1.xxx_access.log",
"/opt/log/nginx/2.xxxxx.com/2.xxx_access.log",
.....
]
// ...
}
}
if i add a new log file, if the exporter can aware the new log file which is added;
Beta Was this translation helpful? Give feedback.
All reactions