خرید بک لینک

I'm using syslog-ng for a big amount of servers. To get everything more in shape in the folder structure, I use several filters with regex and multiple destination and log lines in the syslog-ng.conf

What I would like to accomplish is to let syslog decide where to put the log file based on parts of the hostname and put it in 1 filter, with 1 destination and log line.

Example:

fl-app-dev-01   =>   /var/log/fl/dev/app01.log
fl-app-prd-32   =>   /var/log/fl/prd/app32.log
fl-man-prd-02   =>   /var/log/fl/prd/man02.log
am-app-prd-12   =>   /var/log/am/prd/app12.log
rd-app-dev-02   =>   /var/log/rd/dev/app02.log

As you can see in the example above, all servers are in the same format {location}-{function}-{environment}-{number}

I would like to split them to location, then to environment and have the logfile named after the function and the server number.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 14 مرداد 1395 ساعت: 18:59

صفحه بندی