Mixer templates

A Mixer template defines which data Mixer should organize, and in what form the data should be in. To get metrics and access logs, we need the metric and logentry templates. For instance, the following template tells Mixer to output the log with the source and destination name, the method, the request URL, and so on:

apiVersion: config.istio.io/v1alpha2
kind: logentry
metadata:
name: accesslog
namespace: istio-system
spec:
severity: '"info"'
timestamp: request.time
variables:
source: source.workload.name | "unknown"
destination: destination.workload.name | "unknown"
method: request.method | ""
url: request.path | ""
protocol: request.scheme | ""
responseCode: response.code | 0
responseSize: response.size | 0
requestSize: request.size | 0
latency: response.duration | "0ms"
monitored_resource_type: '"UNSPECIFIED"'

The complete reference for each kind of template can be found here: https://istio.io/docs/reference/config/policy-and-telemetry/templates/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset