This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
integration_test_cfg.yaml
191 lines (191 loc) · 8.71 KB
/
integration_test_cfg.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#
# Copyright 2019 New Relic Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: requestcount
namespace: istio-system
spec:
template: metric
params:
value: "1"
dimensions:
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
service.name: conditional((context.reporter.kind | "inbound") == "outbound", source.workload.name | "unknown", destination.workload.name | "unknown")
source.workload: source.workload.name | "unknown"
source.workload.namespace: source.workload.namespace | "unknown"
source.principal: source.principal | "unknown"
source.app: source.labels["app"] | "unknown"
source.version: source.labels["version"] | "unknown"
source.ip: source.ip | ip("0.0.0.0")
destination.workload: destination.workload.name | "unknown"
destination.workload.namespace: destination.workload.namespace | "unknown"
destination.principal: destination.principal | "unknown"
destination.app: destination.labels["app"] | "unknown"
destination.version: destination.labels["version"] | "unknown"
destination.service: destination.service.host | "unknown"
destination.service.name: destination.service.name | "unknown"
destination.service.namespace: destination.service.namespace | "unknown"
request.protocol: api.protocol | context.protocol | "unknown"
request.time: request.time | timestamp("2001-01-01T00:00:01+00:00")
response.code: response.code | 200
response.flags: context.proxy_error_code | "-"
connection.securityPolicy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none"))
connection.mtls: connection.mtls | false
connection.duration: connection.duration | "1s"
---
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: requestsize
namespace: istio-system
spec:
template: metric
params:
value: request.size | 0
dimensions:
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
service.name: conditional((context.reporter.kind | "inbound") == "outbound", source.workload.name | "unknown", destination.workload.name | "unknown")
source.workload: source.workload.name | "unknown"
source.workload.namespace: source.workload.namespace | "unknown"
source.principal: source.principal | "unknown"
source.app: source.labels["app"] | "unknown"
source.version: source.labels["version"] | "unknown"
source.ip: source.ip | ip("0.0.0.0")
destination.workload: destination.workload.name | "unknown"
destination.workload.namespace: destination.workload.namespace | "unknown"
destination.principal: destination.principal | "unknown"
destination.app: destination.labels["app"] | "unknown"
destination.version: destination.labels["version"] | "unknown"
destination.service: destination.service.host | "unknown"
destination.service.name: destination.service.name | "unknown"
destination.service.namespace: destination.service.namespace | "unknown"
request.protocol: api.protocol | context.protocol | "unknown"
request.time: request.time | timestamp("2001-01-01T00:00:01+00:00")
response.code: response.code | 200
response.flags: context.proxy_error_code | "-"
connection.securityPolicy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none"))
connection.mtls: connection.mtls | false
connection.duration: connection.duration | "1s"
---
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: requestduration
namespace: istio-system
spec:
template: metric
params:
value: response.duration | "0ms"
dimensions:
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
service.name: conditional((context.reporter.kind | "inbound") == "outbound", source.workload.name | "unknown", destination.workload.name | "unknown")
source.workload: source.workload.name | "unknown"
source.workload.namespace: source.workload.namespace | "unknown"
source.principal: source.principal | "unknown"
source.app: source.labels["app"] | "unknown"
source.version: source.labels["version"] | "unknown"
source.ip: source.ip | ip("0.0.0.0")
destination.workload: destination.workload.name | "unknown"
destination.workload.namespace: destination.workload.namespace | "unknown"
destination.principal: destination.principal | "unknown"
destination.app: destination.labels["app"] | "unknown"
destination.version: destination.labels["version"] | "unknown"
destination.service: destination.service.host | "unknown"
destination.service.name: destination.service.name | "unknown"
destination.service.namespace: destination.service.namespace | "unknown"
request.protocol: api.protocol | context.protocol | "unknown"
request.time: request.time | timestamp("2001-01-01T00:00:01+00:00")
response.code: response.code | 200
response.flags: context.proxy_error_code | "-"
connection.securityPolicy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none"))
connection.mtls: connection.mtls | false
connection.duration: connection.duration | "1s"
---
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: responsesize
namespace: istio-system
spec:
template: metric
params:
value: response.size | 0
dimensions:
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
service.name: conditional((context.reporter.kind | "inbound") == "outbound", source.workload.name | "unknown", destination.workload.name | "unknown")
source.workload: source.workload.name | "unknown"
source.workload.namespace: source.workload.namespace | "unknown"
source.principal: source.principal | "unknown"
source.app: source.labels["app"] | "unknown"
source.version: source.labels["version"] | "unknown"
source.ip: source.ip | ip("0.0.0.0")
destination.workload: destination.workload.name | "unknown"
destination.workload.namespace: destination.workload.namespace | "unknown"
destination.principal: destination.principal | "unknown"
destination.app: destination.labels["app"] | "unknown"
destination.version: destination.labels["version"] | "unknown"
destination.service: destination.service.host | "unknown"
destination.service.name: destination.service.name | "unknown"
destination.service.namespace: destination.service.namespace | "unknown"
request.protocol: api.protocol | context.protocol | "unknown"
request.time: request.time | timestamp("2001-01-01T00:00:01+00:00")
response.code: response.code | 200
response.flags: context.proxy_error_code | "-"
connection.securityPolicy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none"))
connection.mtls: connection.mtls | false
connection.duration: connection.duration | "1s"
---
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
name: newrelic-http
namespace: istio-system
spec:
match: (context.protocol == "http" || context.protocol == "grpc") && (match((request.useragent | "-"), "kube-probe*") == false)
actions:
- handler: newrelic
instances:
- requestcount
- requestsize
- requestduration
- responsesize
---
apiVersion: "config.istio.io/v1alpha2"
kind: handler
metadata:
name: newrelic
namespace: istio-system
spec:
adapter: newrelic
connection:
address: "%s"
params:
namespace: istio
metrics:
requestduration.instance.istio-system:
name: request.duration.seconds
type: SUMMARY
requestsize.instance.istio-system:
name: request.bytes
type: GAUGE
requestcount.instance.istio-system:
name: request.total
type: COUNT
responsesize.instance.istio-system:
name: response.bytes
type: GAUGE
---