-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalues.yaml
167 lines (164 loc) · 5.01 KB
/
values.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
mode: daemonset
presets:
logsCollection:
enabled: true
includeCollectorLogs: false
kubernetesAttributes:
enabled: true
kubeletMetrics:
enabled: true
kubernetesEvents:
enabled: true
hostMetrics:
enabled: true
extraEnvs:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: otel-secret
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: otel-secret
key: AWS_SECRET_ACCESS_KEY
- name: AWS_SESSION_TOKEN
valueFrom:
secretKeyRef:
name: otel-secret
key: AWS_SESSION_TOKEN
- name: SPLUNK_HEC_TOKEN
valueFrom:
secretKeyRef:
name: otel-secret
key: SPLUNK_HEC_TOKEN
- name: SPLUNK_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: otel-secret
key: SPLUNK_ACCESS_TOKEN
- name: SPLUNK_TRACE_URL
valueFrom:
configMapKeyRef:
name: otel-configmap
key: SPLUNK_TRACE_URL
- name: SPLUNK_API_URL
valueFrom:
configMapKeyRef:
name: otel-configmap
key: SPLUNK_API_URL
- name: SPLUNK_INGEST_URL
valueFrom:
configMapKeyRef:
name: otel-configmap
key: SPLUNK_INGEST_URL
- name: SPLUNK_HEC_URL
valueFrom:
configMapKeyRef:
name: otel-configmap
key: SPLUNK_HEC_URL
- name: CLOUDWATCH_LOG_GROUP_NAME
valueFrom:
configMapKeyRef:
name: otel-configmap
key: CLOUDWATCH_LOG_GROUP_NAME
- name: CLOUDWATCH_LOG_STREAM_NAME
valueFrom:
configMapKeyRef:
name: otel-configmap
key: CLOUDWATCH_LOG_STREAM_NAME
- name: CLOUDWATCH_REGION
valueFrom:
configMapKeyRef:
name: otel-configmap
key: CLOUDWATCH_REGION
config:
receivers:
prometheus/agent:
config:
scrape_configs:
- job_name: otel-agent
scrape_interval: 10s
static_configs:
- targets:
- ${K8S_POD_IP}:8889
receiver_creator:
receivers:
prometheus_simple:
config:
endpoint: '`endpoint`:`"prometheus.io/port" in annotations ? annotations["prometheus.io/port"]
: 9090`'
metrics_path: '`"prometheus.io/path" in annotations ? annotations["prometheus.io/path"]
: "/metrics"`'
rule: type == "pod" && annotations["prometheus.io/scrape"] == "true" && "istio.io/rev"
in labels
processors:
resourcedetection:
detectors: [ ec2, eks ]
override: true
attributes/istio:
actions:
- action: delete
key: source_cluster
- action: delete
key: destination_cluster
- action: delete
key: source_canonical_service
- action: delete
key: destination_canonical_service
- action: delete
key: source_canonical_revision
- action: delete
key: destination_canonical_revision
include:
match_type: regexp
metric_names:
- istio_.*
transform/istio_service_name:
error_mode: ignore
log_statements:
- context: resource
statements:
- set(attributes["service.name"], Concat([attributes["k8s.pod.labels.app"],
attributes["k8s.namespace.name"]], ".")) where attributes["service.name"]
== nil and attributes["k8s.pod.labels.app"] != nil and attributes["k8s.namespace.name"]
!= nil
- set(cache["owner_name"], attributes["k8s.pod.name"]) where attributes["service.name"]
== nil and attributes["k8s.pod.name"] != nil
- replace_pattern(cache["owner_name"], "^(.+?)-(?:(?:[0-9bcdf]+-)?[bcdfghjklmnpqrstvwxz2456789]{5}|[0-9]+)$$",
"$$1") where attributes["service.name"] == nil and cache["owner_name"] !=
nil
- set(attributes["service.name"], Concat([cache["owner_name"], attributes["k8s.namespace.name"]],
".")) where attributes["service.name"] == nil and cache["owner_name"] != nil
and attributes["k8s.namespace.name"] != nil
exporters:
splunk_hec:
token: "${SPLUNK_HEC_TOKEN}"
endpoint: "${SPLUNK_HEC_URL}"
profiling_data_enabled: false
awscloudwatchlogs:
log_group_name: "${CLOUDWATCH_LOG_GROUP_NAME}"
log_stream_name: "${CLOUDWATCH_LOG_STREAM_NAME}"
region: "${CLOUDWATCH_REGION}"
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_TRACE_URL}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
api_url: "${SPLUNK_API_URL}"
ingest_url: "${SPLUNK_INGEST_URL}"
sync_host_metadata: true
service:
pipelines:
traces:
processors: [resourcedetection]
exporters: [sapm, signalfx]
metrics:
receivers: [receiver_creator]
processors: [resourcedetection, attributes/istio]
exporters: [signalfx]
logs:
processors: [resourcedetection, transform/istio_service_name]
exporters: [splunk_hec, awscloudwatchlogs]