Configuration
server:
http_listen_network: tcp
http_listen_address: ""
http_listen_port: 9080
http_listen_conn_limit: 0
grpc_listen_network: tcp
grpc_listen_address: ""
grpc_listen_port: 0
grpc_listen_conn_limit: 0
tls_cipher_suites: ""
tls_min_version: ""
http_tls_config:
cert_file: ""
key_file: ""
client_auth_type: ""
client_ca_file: ""
grpc_tls_config:
cert_file: ""
key_file: ""
client_auth_type: ""
client_ca_file: ""
register_instrumentation: true
graceful_shutdown_timeout: 30s
http_server_read_timeout: 30s
http_server_write_timeout: 30s
http_server_idle_timeout: 2m0s
grpc_server_max_recv_msg_size: 4194304
grpc_server_max_send_msg_size: 4194304
grpc_server_max_concurrent_streams: 100
grpc_server_max_connection_idle: 2562047h47m16.854775807s
grpc_server_max_connection_age: 2562047h47m16.854775807s
grpc_server_max_connection_age_grace: 2562047h47m16.854775807s
grpc_server_keepalive_time: 2h0m0s
grpc_server_keepalive_timeout: 20s
grpc_server_min_time_between_pings: 5m0s
grpc_server_ping_without_stream_allowed: false
log_format: logfmt
log_level: info
log_source_ips_enabled: false
log_source_ips_header: ""
log_source_ips_regex: ""
log_request_at_info_level_enabled: false
http_path_prefix: ""
external_url: ""
health_check_target: null
disable: false
profiling_enabled: false
enable_runtime_reload: false
client:
url: ""
batchwait: 1s
batchsize: 1048576
follow_redirects: false
enable_http2: false
backoff_config:
min_period: 500ms
max_period: 5m0s
max_retries: 10
external_labels: |
host_ip: 10.100.5.2
hostname: tst-all-new
timeout: 10s
tenant_id: ""
drop_rate_limited_batches: false
stream_lag_labels: ""
clients:
- url: http://10.10.3.18:3100/loki/api/v1/push
batchwait: 1s
batchsize: 1048576
follow_redirects: false
enable_http2: false
backoff_config:
min_period: 500ms
max_period: 5m0s
max_retries: 10
external_labels: |
host_ip: 10.100.5.2
hostname: tst-all-new
timeout: 10s
tenant_id: ebx-test
drop_rate_limited_batches: false
stream_lag_labels: ""
positions:
sync_period: 10s
filename: /usr/local/promtail/positions.yaml
ignore_invalid_yaml: false
scrape_configs:
- job_name: java-logs
pipeline_stages:
- regex:
expression: /mnt/logs/(?P<service_name>[^/]+)/
source: filename
- labels:
service_name: null
- regex:
expression: /(?i)(?P<level>[^/]+)\.log$
source: filename
- labels:
level: null
- regex:
expression: ^\[(?P<recv_ts>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})\]
- timestamp:
format: "2006-01-02 15:04:05,000"
location: Asia/Shanghai
source: recv_ts
- regex:
expression: ^(?P<error_ts>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})
- timestamp:
format: "2006-01-02 15:04:05.000"
location: Asia/Shanghai
source: error_ts
- regex:
expression: ^\[(\w+)\s*\]-\[(?P<other_ts>\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d{3})?)\]
- timestamp:
format: 06-01-02 15:04:05
location: Asia/Shanghai
source: other_ts
- regex:
expression: ^\[(\w+)\s*\]:\s*(?P<ts3>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})
- timestamp:
format: "2006-01-02 15:04:05,000"
location: Asia/Shanghai
source: ts3
- multiline:
firstline: ^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}\]|^\d{4}-\d{2}-\d{2}
\d{2}:\d{2}:\d{2}\.\d{3} (ERROR|WARN|INFO)|^\[(WARN|INFO)\s*\]-
max_lines: 256
max_wait_time: 30s
static_configs:
- targets:
- localhost
labels:
__path__: /mnt/logs/*/{debug,error,info,warn,thirdPartyPush,receivedata}.log
- job_name: tomcat-logs
pipeline_stages:
- regex:
expression: /mnt/logs/tomcat/(?P<service_name>[^/]+)/
source: filename
- labels:
service_name: null
- regex:
expression: /(?i)(?P<level>[^/]+)\.log$
source: filename
- labels:
level: null
- regex:
expression: ^(?P<error_ts>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})
- timestamp:
format: "2006-01-02 15:04:05.000"
location: Asia/Shanghai
source: error_ts
- regex:
expression: ^\[(\w+)\s*\]-\[(?P<other_ts>\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d{3})?)\]
- timestamp:
format: 06-01-02 15:04:05
location: Asia/Shanghai
source: other_ts
- regex:
expression: ^\[(\w+)\s*\]:\s*(?P<ts3>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})
- timestamp:
format: "2006-01-02 15:04:05,000"
location: Asia/Shanghai
source: ts3
- match:
selector: '{filename=~".*receivedata\\.log.*"}'
stages:
- tenant:
value: receivedata
- multiline:
firstline: ^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}\]|^\d{4}-\d{2}-\d{2}
\d{2}:\d{2}:\d{2}\.\d{3}|^\[(WARN|INFO)\s*\]-
max_lines: 256
max_wait_time: 30s
static_configs:
- targets:
- localhost
labels:
__path__: /mnt/logs/tomcat/*/*.log
- job_name: nginx-access
pipeline_stages:
- match:
selector: '{job="nginx-access"}'
stages:
- tenant:
value: nginx-log
- json:
expressions:
geoip_country_code: geoip_country_code
request_method: request_method
server_name: server_name
status: status
time: '"@timestamp"'
uri: uri
- timestamp:
format: RFC3339Nano
location: Asia/Shanghai
source: time
- labels:
geoip_country_code: geoip_country_code
request_method: request_method
server_name: server_name
status: status
static_configs:
- targets:
- localhost
labels:
__path__: /var/log/nginx/*.access.log
env: ebx-test
job: nginx-access
- job_name: nginx-error
pipeline_stages:
- match:
selector: '{job="nginx-error"}'
stages:
- tenant:
value: nginx-log
- regex:
expression: '^(?P<timestamp>\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(?P<level>\w+)\].*?,
server: (?P<server_name>[^,]+)'
- timestamp:
format: 2006/01/02 15:04:05
location: Asia/Shanghai
source: timestamp
- labels:
level: level
server_name: server_name
static_configs:
- targets:
- localhost
labels:
__path__: /var/log/nginx/*.error.log
env: ebx-test
job: nginx-error
target_config:
sync_period: 10s
stdin: false
limits_config:
readline_rate: 10000
readline_burst: 10000
readline_rate_drop: true
max_streams: 0
max_line_size: 0
max_line_size_truncate: false
tracing:
enabled: true
wal:
enabled: false
dir: ""
cleanSegmentsOlderThan: 0s