mirror of
https://github.com/alibaba/higress.git
synced 2026-02-28 14:40:50 +08:00
Signed-off-by: zty98751 <zty98751@alibaba-inc.com> Co-authored-by: Kent Dong <ch3cho@qq.com>
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
{{- $o11y := .Values.global.o11y }}
|
|
{{- if $o11y.enabled }}
|
|
{{- $config := $o11y.promtail }}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: higress-promtail
|
|
namespace: {{ .Release.Namespace }}
|
|
data:
|
|
promtail.yaml: |
|
|
server:
|
|
log_level: info
|
|
http_listen_port: {{ $config.port }}
|
|
|
|
clients:
|
|
- url: http://higress-console-loki.{{ .Release.Namespace }}:3100/loki/api/v1/push
|
|
|
|
positions:
|
|
filename: /tmp/promtail-positions.yaml
|
|
target_config:
|
|
sync_period: 10s
|
|
scrape_configs:
|
|
- job_name: access-logs
|
|
static_configs:
|
|
- targets:
|
|
- localhost
|
|
labels:
|
|
__path__: /var/log/proxy/access.log
|
|
pipeline_stages:
|
|
- json:
|
|
expressions:
|
|
authority:
|
|
method:
|
|
path:
|
|
protocol:
|
|
request_id:
|
|
response_code:
|
|
response_flags:
|
|
route_name:
|
|
trace_id:
|
|
upstream_cluster:
|
|
upstream_host:
|
|
upstream_transport_failure_reason:
|
|
user_agent:
|
|
x_forwarded_for:
|
|
- labels:
|
|
authority:
|
|
method:
|
|
path:
|
|
protocol:
|
|
request_id:
|
|
response_code:
|
|
response_flags:
|
|
route_name:
|
|
trace_id:
|
|
upstream_cluster:
|
|
upstream_host:
|
|
upstream_transport_failure_reason:
|
|
user_agent:
|
|
x_forwarded_for:
|
|
- timestamp:
|
|
source: timestamp
|
|
format: RFC3339Nano
|
|
{{- end }}
|