-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
12-logentry.yaml
48 lines (46 loc) · 1.42 KB
/
12-logentry.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# # Configuration for logentry instances
# apiVersion: config.istio.io/v1alpha2
# kind: instance
# metadata:
# name: newlog
# namespace: istio-system
# spec:
# compiledTemplate: logentry
# params:
# severity: '"info"'
# timestamp: request.time
# variables: # Getting values from Envoy attributes https://istio.io/docs/reference/config/policy-and-telemetry/attribute-vocabulary/
# source: source.labels["app"] | source.workload.name | "unknown"
# user: source.user | "unknown"
# destination: destination.labels["app"] | destination.workload.name | "unknown"
# responseCode: response.code | 0
# responseSize: response.size | 0
# latency: response.duration | "0ms"
# monitored_resource_type: '"UNSPECIFIED"'
# ---
# # Configuration for a stdio handler
# apiVersion: config.istio.io/v1alpha2
# kind: handler
# metadata:
# name: newloghandler
# namespace: istio-system
# spec:
# compiledAdapter: stdio
# params:
# severity_levels:
# warning: 1 # Params.Level.WARNING
# outputAsJson: true
# ---
# # Rule to send logentry instances to a stdio handler
# apiVersion: config.istio.io/v1alpha2
# kind: rule
# metadata:
# name: newlogstdio
# namespace: istio-system
# spec:
# match: destination.service.host == "greeter-server.default.svc.cluster.local" #logging only greeter-server
# actions:
# - handler: newloghandler
# instances:
# - newlog
# ---