-
Notifications
You must be signed in to change notification settings - Fork 1
/
appsettings.json
215 lines (207 loc) · 9.98 KB
/
appsettings.json
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
{
// Setting in this values can be overridden by environment variables.
// Read more: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#non-prefixed-environment-variables
"DiscoveryOptions": {
// Semicolon separated string of ECS clusters to include.
// At least one of "EcsClusters" or "CloudMapNamespaces" must be provided.
// Example:
// "EcsClusters": "ecs-cluster1"
"EcsClusters": "",
// Semicolon separated string of tag key-value pairs to select ECS services.
// If a selector is provided, service must match all tags in the selector.
// If selector is not provided, all services in the clusters are included.
// Tag value selector supports wildcard symbol: *.
// Tags key/value matching is case-sensitive.
// Example:
// Given the following selector: "service_discovery=true;component=app;other_tag=*;"
// All services with the tag "service_discovery" set to "true"
// and "component" set to "app"
// and "other_tag" set to any value will be included.
// IMPORTANT:
// 1. It is your responsibility to ensure that all tags are present on the resource
// 2. If you specify 'CloudMapServiceSelectorTags' - it is your responsibility to ensure
// that ecs services and corresponding cloud map services are both included via selectors specified.
"EcsServiceSelectorTags": "",
// Semicolon separated string of CloudMap namespaces to include.
// When 'EcsClusters' parameter is specified,
// all ECS services that are using Service Connect are always included in lookup.
// This parameter allows you to include additional namespaces to discover
// services using AWS Service Discovery (legacy).
// Example:
// "CloudMapNamespaces": "namespace1;namespace2;",
"CloudMapNamespaces": "",
// Semicolon separated string of tag key-value pairs to select CloudMap services.
// See comments to "EcsServiceSelectorTags" above for more information.
// Example: "service_discovery=true;component=app"
"CloudMapServiceSelectorTags": "",
// Semicolon separated string of tag names to include in the service discovery response as metadata.
// Supports glob pattern matching using * and ?.
// Controls which tags are included in the service discovery response as metadata.
// Because metadata labels are dictionary keys, they must be unique.
// Therefore, tags are resolved in the following priority:
// ECS Task > ECS Service > Cloud Map Service > Cloud Map Namespace
// If no value is provided, no tags will be included.
// To include all tags, set value to "*".
// Example:
// Having "EcsTaskTags" set to "service_discovery;app_*"
// will include all tags with their values where aws tag 'Key' property
// starts with "app_", or aws tag 'Key' property equals "service_discovery".
"EcsTaskTags": "*",
"EcsServiceTags": "*",
"CloudMapServiceTags": "*",
"CloudMapNamespaceTags": "*",
// Semicolon separated string of labels to include in the service discovery response as metadata.
// Will be added to all discovered targets.
// For example, "environment=dev;region=us-west-2"
// If value needs to have a semicolon, or equals sign, it must be prefixed using %.
// For example, "eval_expression=a%=%=b;components=a%;b%;;"
// would be parsed as "eval_expression=a==b;components=a;b;"
// Any label that is not a valid Prometheus label will be transformed to such.
// Read more: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#labelname
// Example:
// "static_key_1=static_value_1;static_key_2=static_value_2;"
"ExtraPrometheusLabels": "",
// Specifies the TTL for the cache of service discovery results.
// Set to 0 to disable caching (request to AWS will be made upon every http request).
"CacheTtlSeconds": 60,
// When set to 'true', top-level resources (clusters, namespaces) will be cached.
// This significantly reduces the number of requests to AWS, but may result in stale data.
// Data is cached for 10 minutes.
"CacheTopLevelResources": true,
// Tag prefix to identify metrics port, [path | "/metrics"], [name | ""] triplets.
//
// Must be at least three characters long, start with a letter, and end with an underscore.
// This prefix has a special meaning and is used to identify the metrics path, port, and name
// for the service scrape configuration (in a single ecs service you may have multiple
// containers listening on different ports, possibly having a different path you need to scrape from).
//
// 'PATH', 'PORT', 'NAME' will be appended to the prefix to identify
// metrics path, port, and scrape configuration names respectively.
// If your service contains multiple metrics paths
// or ports, you can tag your resources using the following format:
// * METRICS_PATH_1 = /metrics
// * METRICS_PORT_1 = 9001
// * METRICS_NAME_1 = application
//
// * METRICS_PATH_2 = /metrics2
// * METRICS_PORT_2 = 9002
// * METRICS_NAME_2 = sidecar
// .. etc ..
// System won't care of anything after _PATH, _PORT, or _NAME,
// so as long as these postfixes are identical for triplets,
// you can use any postfix (including empty) you prefer,
// which makes the following combination valid:
// * METRICS_PATH_SVC-ONE = /metrics
// * METRICS_PORT_SVC-ONE = 9001
// * METRICS_NAME_SVC-ONE = svc-one
//
// as well as this:
// * METRICS_PORT = 9001 (default path "/metrics" will be used, no configuration name will be added)
//
// If a path is not provided, default path "/metrics" will be used.
// If a name is not provided, the service name will be omitted from labels ('scrape_target_name' label).
//
// This directly affects the Prometheus http sd scrape configuration:
// [{
// "targets": [
// "10.200.10.200:${METRICS_PORT}"
// ],
// "labels": {
// "__metrics_path__": "${METRICS_PATH}",
// "scrape_target_name": "${METRICS_NAME}",
// ...
// }
// }]
"MetricsPathPortTagPrefix": "METRICS_",
// Semicolon separated string of relabel configurations to apply to the scrape configuration result.
// This allows using simple syntax to create new labels with existing values,
// or to combine multiple pre-calculated labels into a single label.
//
// The intended use case is to create new labels based on existing labels, so that you don't have to
// modify your Grafana Dashboards or alerting rules when you change the way you tag your resources.
//
// Relabel configurations are applied to the scrape configuration before it is returned to the client.
// You can only operate using labels that are already present in the target.
//
// Example:
// Consider the following response of discovery target for configuration without relabeling:
//
// {
// "targets": ["10.200.10.200:8080"],
// "labels": {
// "__metrics_path__": "/metrics",
// "instance": "10.200.10.200",
// "scrape_target_name": "app",
// "ecs_cluster": "my-cluster",
// "ecs_service": "my-service",
// ...
// }
// },
//
// By applying the following re-label configuration:
// "service_and_cluster={{ecs_cluster}}-{{ecs_service}};"
//
// This will create a new label 'service_and_cluster' with the value of 'ecs_cluster' and 'ecs_service' labels combined:
//
// {
// "targets": ["10.200.10.200:8080"],
// "labels": {
// "__metrics_path__": "/metrics",
// "instance": "10.200.10.200",
// "scrape_target_name": "app",
// "ecs_cluster": "my-cluster",
// "ecs_service": "my-service",
// "service_and_cluster": "my-cluster-my-service",
// ...
// }
// },
//
// If your intent is to only 'rename' the existing label, you can use the following syntax:
// "cluster={{ecs_cluster}};"
//
// This will create a new label 'cluster' with the value of 'ecs_cluster' label.
//
// IMPORTANT:
// 1) If amy of the replacement tokens are not found in the source labels, it will not be replaced at all.
// 2) You can replace existing labels ("ecs_cluster=my-{{ecs_cluster}};").
// 3) All relabel configurations are applied in order defined.
// 4) You can have multiple relabel configurations for the same label.
// They will be applied in order defined ("a=1;a={{a}}-2;" will result in a="1-2").
// 5) If your replacement configuration does not contain any replacement tokens, it must begin with _tmp.
// This is to prevent accidental overwriting of existing labels. Otherwise, the configuration will be ignored.
//
// Adding prefix to all labels is the most common use case for temporary labels:
// "_tmp=my_awesome_app;ecs_cluster={{_tmp}}_{{ecs_cluster}};ecs_service={{_tmp}}_{{ecs_service}};"
//
// To have a fall-backs, use 'ExtraPrometheusLabels' option. These have the lowest priority,
// and are only added to the response if the label is not already present in the target
// (matching tag is not present in any of the original resources).
"RelabelConfigurations": "",
},
"AWS": {
},
"Serilog": {
"Using": [
"Serilog.Sinks.Console"
],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Apptality": "Information",
"Microsoft": "Warning",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information",
"System": "Warning",
"Amazon": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
}
]
},
"AllowedHosts": "*"
}