logstash-output-application_insights 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTORS +9 -0
- data/DEVELOPER.md +0 -0
- data/Gemfile +26 -0
- data/LICENSE +17 -0
- data/README.md +495 -0
- data/Rakefile +22 -0
- data/lib/logstash/outputs/application_insights.rb +393 -0
- data/lib/logstash/outputs/application_insights/blob.rb +923 -0
- data/lib/logstash/outputs/application_insights/block.rb +118 -0
- data/lib/logstash/outputs/application_insights/channel.rb +259 -0
- data/lib/logstash/outputs/application_insights/channels.rb +142 -0
- data/lib/logstash/outputs/application_insights/client.rb +110 -0
- data/lib/logstash/outputs/application_insights/clients.rb +113 -0
- data/lib/logstash/outputs/application_insights/config.rb +341 -0
- data/lib/logstash/outputs/application_insights/constants.rb +208 -0
- data/lib/logstash/outputs/application_insights/exceptions.rb +55 -0
- data/lib/logstash/outputs/application_insights/flow_control.rb +80 -0
- data/lib/logstash/outputs/application_insights/multi_io_logger.rb +69 -0
- data/lib/logstash/outputs/application_insights/shutdown.rb +96 -0
- data/lib/logstash/outputs/application_insights/state.rb +89 -0
- data/lib/logstash/outputs/application_insights/storage_cleanup.rb +214 -0
- data/lib/logstash/outputs/application_insights/sub_channel.rb +75 -0
- data/lib/logstash/outputs/application_insights/telemetry.rb +99 -0
- data/lib/logstash/outputs/application_insights/timer.rb +90 -0
- data/lib/logstash/outputs/application_insights/utils.rb +139 -0
- data/lib/logstash/outputs/application_insights/version.rb +24 -0
- data/logstash-output-application-insights.gemspec +50 -0
- data/spec/outputs/application_insights_spec.rb +42 -0
- metadata +151 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2992e3a202401238e6ce64bb81b14e36d215a13b
|
4
|
+
data.tar.gz: ef6fd4ac9fce577765515ab7fb35f964101b2275
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fccb9334a9591040d6bc9255a8e620517cbb2aa6e1907bd8167eb3235c829b8702c742f31faedb82088c03ac8dbec2c7d2a96ff96e4aa1234754fa462a6b7158
|
7
|
+
data.tar.gz: 066f4e308ab6df69ddc1ce574f987fc82d8a9dcdef9e72dbdd2bf7680d892908f44ba04c0f53323751755114be6fb4669538324ad62bf0567dca6d1834fdf0ce
|
data/CHANGELOG.md
ADDED
data/CONTRIBUTORS
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
The following is a list of people who have contributed ideas, code, bug
|
2
|
+
reports, or in general have helped logstash-output-application-insights along its way.
|
3
|
+
|
4
|
+
Contributors:
|
5
|
+
|
6
|
+
Note: If you've sent us patches, bug reports, or otherwise contributed to
|
7
|
+
logstash-output-application-insights plugin, and you aren't on the list above and
|
8
|
+
want to be, please let us know and we'll make sure you're here. Contributions from
|
9
|
+
folks like you are what make open source awesome.
|
data/DEVELOPER.md
ADDED
File without changes
|
data/Gemfile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# ----------------------------------------------------------------------------------
|
4
|
+
# Logstash Output Application Insights
|
5
|
+
#
|
6
|
+
# Copyright (c) Microsoft Corporation
|
7
|
+
#
|
8
|
+
# All rights reserved.
|
9
|
+
#
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the License);
|
11
|
+
# you may not use this file except in compliance with the License.
|
12
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
#
|
18
|
+
# See the Apache Version 2.0 License for specific language governing
|
19
|
+
# permissions and limitations under the License.
|
20
|
+
# ----------------------------------------------------------------------------------
|
21
|
+
|
22
|
+
source 'https://rubygems.org'
|
23
|
+
|
24
|
+
# Specify your gem's dependencies in logstash-output-application-insights.gemspec
|
25
|
+
|
26
|
+
gemspec :name => 'logstash-output-application-insights'
|
data/LICENSE
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
Logstash Output Application Insights
|
2
|
+
|
3
|
+
Copyright (c) Microsoft Corporation
|
4
|
+
|
5
|
+
All rights reserved.
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the License);
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
|
15
|
+
See the Apache Version 2.0 License for specific language governing
|
16
|
+
permissions and limitations under the License.
|
17
|
+
|
data/README.md
ADDED
@@ -0,0 +1,495 @@
|
|
1
|
+
# Microsoft Application Insights Output Plugin for Logstash
|
2
|
+
|
3
|
+
[![GitHub version](https://badge.fury.io/gh/microsoft%2Flogstash-output-application-insights.svg)](https://badge.fury.io/gh/microsoft%2Flogstash-output-application-insights)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/logstash-output-application_insights.svg)](https://badge.fury.io/rb/logstash-output-application_insights)
|
5
|
+
|
6
|
+
This project is a plugin for [Logstash](https://github.com/elastic/logstash).
|
7
|
+
|
8
|
+
# Plugin Features
|
9
|
+
|
10
|
+
# Supported Logstash Versions
|
11
|
+
|
12
|
+
* Logstash 2.3.2
|
13
|
+
* Logstash 2.3.4
|
14
|
+
|
15
|
+
Note:
|
16
|
+
|
17
|
+
* x64 Ruby for Windows is known to have some compatibility issues.
|
18
|
+
* the plugin depends on azure-storage that depends on gem nokogiri, which doesn't support Ruby 2.2+ on Windows.
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
# Setting up
|
25
|
+
|
26
|
+
## Install Logstash
|
27
|
+
|
28
|
+
- Download logstash from https://www.elastic.co/downloads/logstash
|
29
|
+
|
30
|
+
## Install logstash-output-application_insights output plugin
|
31
|
+
|
32
|
+
One command installation:
|
33
|
+
```sh
|
34
|
+
bin/logstash-plugin install "logstash-output-application_insights"
|
35
|
+
```
|
36
|
+
|
37
|
+
## Create configuration file
|
38
|
+
|
39
|
+
Example (input from files output Application Insights):
|
40
|
+
```ruby
|
41
|
+
input {
|
42
|
+
file {
|
43
|
+
path => "/../files/*"
|
44
|
+
start_position => "beginning"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
filter {
|
48
|
+
# some filters here
|
49
|
+
}
|
50
|
+
output {
|
51
|
+
application_insights {
|
52
|
+
intrumentation_key => "5a6714a3-ec7b-4999-ab96-232f1da92059"
|
53
|
+
table_id => "c24394e1-f077-420e-8a25-ef6fdf045938"
|
54
|
+
storage_account_name_key => [ "my-storage-account", "pfrYTwPgKyYNfKBY2QdF+v5sbgx8/eAQp+FFkGpPBnkMDE1k+ZNK3r3qIPqqw8UsOIUqaF3dXBdPDouGJuxNXQ==" ]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
```
|
58
|
+
|
59
|
+
## Run Logstash
|
60
|
+
```sh
|
61
|
+
bin/logstash -f 'file://localhost/../your-config-file'
|
62
|
+
```
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
# Installation options
|
69
|
+
|
70
|
+
## One command installation:
|
71
|
+
```sh
|
72
|
+
bin/logstash-plugin install "logstash-output-application_insights"
|
73
|
+
```
|
74
|
+
|
75
|
+
**If above does not work, or you would like to patch code here is a workaround to install this plugin within your logstash:**
|
76
|
+
|
77
|
+
- Check out/clone microsoft/logstash-output-application-insights code from github https://github.com/Microsoft/logstash-output-application-insights
|
78
|
+
|
79
|
+
## Option 1: Run in a local Logstash clone
|
80
|
+
|
81
|
+
- Edit Logstash `Gemfile` and add the logstash-output-application-insights plugin path:
|
82
|
+
```ruby
|
83
|
+
gem "logstash-output-application-insights", :path => "/../logstash-output-application-insights"
|
84
|
+
```
|
85
|
+
|
86
|
+
- Install plugin the plugin from the Logstash home
|
87
|
+
```sh
|
88
|
+
bin/logstash-plugin install --no-verify
|
89
|
+
```
|
90
|
+
|
91
|
+
## Option 2: Run in an installed Logstash
|
92
|
+
|
93
|
+
- Build your plugin gem
|
94
|
+
```sh
|
95
|
+
gem build logstash-output-application-insights.gemspec
|
96
|
+
```
|
97
|
+
|
98
|
+
- Install the plugin from the Logstash home
|
99
|
+
```sh
|
100
|
+
bin/logstash-plugin install "logstash-output-application_insights"
|
101
|
+
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
# Configuration parameters
|
107
|
+
|
108
|
+
### storage_account_name_key
|
109
|
+
Array of pairs, storage_account_name and an array of acces_keys. No default
|
110
|
+
At least one pair is required. If not defined, values will be taken (if exist) from Environment Variable: AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY
|
111
|
+
examples:
|
112
|
+
```ruby
|
113
|
+
storage_account_name_key => [ "my-storage-account", "pfrYTwPgKyYNfKBY2QdF+v5sbgx8/eAQp+FFkGpPBnkMDE1k+ZNK3r3qIPqqw8UsOIUqaF3dXBdPDouGJuxNXQ==" ]
|
114
|
+
|
115
|
+
storage_account_name_key => [ ["my-storage-account1", "key1"], "my-storage-account2", "key2"], ["my-storage-account3", "key3"] ]
|
116
|
+
|
117
|
+
storage_account_name_key => [ ["my-storage-account1", ["key11", "key12"]], ["my-storage-account1", "key2"], ["my-storage-account1", ["key3"] ]
|
118
|
+
```
|
119
|
+
|
120
|
+
### azure_storage_table_prefix
|
121
|
+
A prefix for the azure storage tables name used by this Logstash instance. Default host name
|
122
|
+
It is recommeded that each Logstash instance have a unique prefix, to avoid confusion and loss of tracking, although sharing tables won't damage proper execution.
|
123
|
+
If not set, the host name is used (not alphanumeric characters are removed, and converted downcase), if host name available.
|
124
|
+
The prefix string may contain only alphanumeric characters, it is case sensitive, and must start with a letter
|
125
|
+
example:
|
126
|
+
```ruby
|
127
|
+
azure_storage_table_prefix => "myprefix"
|
128
|
+
```
|
129
|
+
|
130
|
+
### azure_storage_container_prefix
|
131
|
+
A prefix for the azure storage containers name used by this Logstash instance. Default host name
|
132
|
+
It is recommeded that each Logstash prefix have a unique prefix, to avoid confusion and loss of tracking, although sharing containers won't damage proper execution.
|
133
|
+
if not set, the host name is used (not alphanumeric characters are removed, and converted downcase), if host name available.
|
134
|
+
The prefix string may contain only alphanumeric characters and dash, double dash are not allowed, it is case insesitive.
|
135
|
+
example:
|
136
|
+
```ruby
|
137
|
+
azure_storage_container_prefix => "myprefix"
|
138
|
+
```
|
139
|
+
|
140
|
+
### azure_storage_blob_prefix
|
141
|
+
A prefix for the azure storage blobs name used by this Logstash instance. Default host name
|
142
|
+
Each Logstash prefix MUST have a unique prefix, to avoid loss of data !!!
|
143
|
+
If not set, the host name is used (not alphanumeric characters are removed, and converted downcase), if host name available
|
144
|
+
string may include only characters that are allowed in any valid url
|
145
|
+
example:
|
146
|
+
```ruby
|
147
|
+
azure_storage_blob_prefix => "myprefix"
|
148
|
+
```
|
149
|
+
|
150
|
+
### intrumentation_key
|
151
|
+
Default Application Insights Analytics intrumentation_key. No default
|
152
|
+
It will be used only in case the key is not specified in the tables property associated to a table_id, or as field or metadata fields in the event
|
153
|
+
example:
|
154
|
+
```ruby
|
155
|
+
intrumentation_key => "5A6714A3-EC7B-4999-AB96-232F1DA92059"
|
156
|
+
```
|
157
|
+
|
158
|
+
### table_id
|
159
|
+
Default Application Insights Analytics table_id. No default
|
160
|
+
Will be used only in case it is not specified as field or metadata fields in the event
|
161
|
+
example:
|
162
|
+
```ruby
|
163
|
+
table_id => "C24394E1-F077-420E-8A25-EF6FDF045938"
|
164
|
+
```
|
165
|
+
|
166
|
+
### table_columns
|
167
|
+
Specifies the list of the fields that will be filtered from the event, fields not specified will be ignored. No Default (event all fields)
|
168
|
+
If not specified all fileds in events will be filtered, the order is kept. The order is essential in case of CSV serialization.
|
169
|
+
example:
|
170
|
+
```ruby
|
171
|
+
table_columns => [ "EventLogID", "AppName", "EnvironmentName", "ActivityID", "EventID", "Severity", "Title" ]
|
172
|
+
```
|
173
|
+
|
174
|
+
### case_insensitive_columns
|
175
|
+
If set to true, events fields are refered as case insensitive. Default false (case sensitive)
|
176
|
+
example:
|
177
|
+
```ruby
|
178
|
+
case_insensitive_columns => true
|
179
|
+
```
|
180
|
+
|
181
|
+
### blob_max_bytesize
|
182
|
+
Advanced, internal, should not be set. Default 1 GB.
|
183
|
+
Azure storage maximum bytesize is 192 GB ( = 50,000 * 4 MB )
|
184
|
+
example:
|
185
|
+
```ruby
|
186
|
+
blob_max_bytesize => 4000000000
|
187
|
+
```
|
188
|
+
|
189
|
+
### blob_max_events
|
190
|
+
Specifies, maximum number of events in one blob. Default 256,000 events
|
191
|
+
Setting it too low may improve latency, but will reduce ingestion performance
|
192
|
+
Setting it too high may damage latency up to maximum delay, but ingestion will be more efficient, and load on network will be lower
|
193
|
+
example:
|
194
|
+
```ruby
|
195
|
+
blob_max_events => 1000000
|
196
|
+
```
|
197
|
+
|
198
|
+
### blob_max_delay
|
199
|
+
Specifies maximum latency time, in seconds. Defualt 60 seconds
|
200
|
+
The latency time is measured since the time an event arrived till it is commited to azure storage, and Application Insights is notified.
|
201
|
+
The total latency time may be higher, as this is not the full ingestion flow
|
202
|
+
example:
|
203
|
+
```ruby
|
204
|
+
blob_max_delay => 3600
|
205
|
+
```
|
206
|
+
|
207
|
+
### blob_serialization
|
208
|
+
Specifies the blob serialziation to create. Default "json"
|
209
|
+
currently 2 types are supported "csv" and "json""
|
210
|
+
example:
|
211
|
+
```ruby
|
212
|
+
blob_serialization => "json""
|
213
|
+
```
|
214
|
+
|
215
|
+
### io_retry_delay
|
216
|
+
Interval of time between retries due to IO failures
|
217
|
+
example:
|
218
|
+
```ruby
|
219
|
+
io_retry_delay => 0.5
|
220
|
+
```
|
221
|
+
|
222
|
+
### io_max_retries
|
223
|
+
Number of retries on IO failures, before giving up, and move to available options
|
224
|
+
example:
|
225
|
+
```ruby
|
226
|
+
io_max_retries => 3
|
227
|
+
```
|
228
|
+
|
229
|
+
### blob_retention_time
|
230
|
+
Specifies the retention time of the blob in the container after it is notified to Application Insighta Analytics. Dfeauly 604,800 seconds (1 week)
|
231
|
+
Once the retention time expires, the blob is the deleted from container
|
232
|
+
example:
|
233
|
+
```ruby
|
234
|
+
blob_retention_time => 604800
|
235
|
+
```
|
236
|
+
|
237
|
+
### blob_access_expiry_time
|
238
|
+
Specifies the time Application Insights Analytics have access to the blob that are notifie. Default 86,400 seconds ( 1 day)
|
239
|
+
Blob access is limited with SAS URL
|
240
|
+
example:
|
241
|
+
```ruby
|
242
|
+
blob_retention_time => 604800
|
243
|
+
```
|
244
|
+
|
245
|
+
### csv_default_value
|
246
|
+
Specifies the string that is used as the value in a csv record, in case the field does not exist in the event. Default ""
|
247
|
+
example:
|
248
|
+
```ruby
|
249
|
+
csv_default_value => "-"
|
250
|
+
```
|
251
|
+
|
252
|
+
### serialized_event_field
|
253
|
+
Specifies a serialized event field name, that if exist in current event, its value as is will be taken as the serialized event. No Default
|
254
|
+
example:
|
255
|
+
```ruby
|
256
|
+
serialized_event_field => "serializedMessage"
|
257
|
+
```
|
258
|
+
|
259
|
+
|
260
|
+
### logger_level
|
261
|
+
Specifies the log level. valid values are: DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN. Default "INFO"
|
262
|
+
example:
|
263
|
+
```ruby
|
264
|
+
logger_level => "INFO"
|
265
|
+
```
|
266
|
+
|
267
|
+
### logger_files
|
268
|
+
Specifies the list of targets for the log. may include files, devices, "stdout" and "stderr". Default "logstash-output-application-insights.log"
|
269
|
+
example:
|
270
|
+
```ruby
|
271
|
+
csv_default_value => [ "c:/logstash/dev/runtime/log/logstash-output-application-insights.log", "stdout" ]
|
272
|
+
```
|
273
|
+
|
274
|
+
### logger_progname
|
275
|
+
Specifies the program name that will displayed in each log record. Default "AI"
|
276
|
+
Should be modified only in case there is another plugin with the same program name
|
277
|
+
example:
|
278
|
+
```ruby
|
279
|
+
logger_progname => "MSAI"
|
280
|
+
```
|
281
|
+
|
282
|
+
### logger_shift_size
|
283
|
+
Specifies maximum logfile size. No Default (no size limit)
|
284
|
+
Only applies when shift age is a number !!!
|
285
|
+
Not supported in Windows !!!
|
286
|
+
example (1 MB):
|
287
|
+
```ruby
|
288
|
+
logger_shift_size => 1048576
|
289
|
+
```
|
290
|
+
|
291
|
+
### logger_shift_age
|
292
|
+
Specifies Number of old logfiles to keep, or frequency of rotation (daily, weekly or monthly). No default (never)
|
293
|
+
Not supported in Windows !!!
|
294
|
+
examples:
|
295
|
+
```ruby
|
296
|
+
logger_shift_age => weekly
|
297
|
+
```
|
298
|
+
|
299
|
+
```ruby
|
300
|
+
logger_shift_age => 5
|
301
|
+
```
|
302
|
+
|
303
|
+
### resurrect_delay
|
304
|
+
Specifies the time interval, between tests that check whether a stoarge account came back to life, after it stoped responding. Default 10 seconds
|
305
|
+
example (half second):
|
306
|
+
```ruby
|
307
|
+
flow_control_delay => 0.5
|
308
|
+
```
|
309
|
+
|
310
|
+
### flow_control_suspend_bytes
|
311
|
+
Specifies the high water mark for the flow control, that is used to avoid out of memory crash. Default 52,428,800 Bytes (50 MB)
|
312
|
+
Once the memory consumption reach the high water mark, the plugin will stop accepting events, till memory is below the low water mark
|
313
|
+
example (200 MB):
|
314
|
+
```ruby
|
315
|
+
flow_control_suspend_bytes => 209715200
|
316
|
+
```
|
317
|
+
|
318
|
+
### flow_control_resume_bytes
|
319
|
+
Specifies the low water mark for the flow control, that is used to avoid out of memory crash. Default 41,820,160 Bytes (40 MB)
|
320
|
+
Once memory consumption reach the high water mark, the plugin will stop accepting events, till memory is below the low water mark
|
321
|
+
example (10 MB):
|
322
|
+
```ruby
|
323
|
+
flow_control_resume_bytes => 10455040
|
324
|
+
```
|
325
|
+
|
326
|
+
### flow_control_delay
|
327
|
+
Specifies the amount of time the flow control suspend receiving event. Default 1 second
|
328
|
+
It is to allow GC, and flush of event to Azure storage before checking whether memory is below low water mark
|
329
|
+
example (half second):
|
330
|
+
```ruby
|
331
|
+
flow_control_delay => 0.5
|
332
|
+
```
|
333
|
+
|
334
|
+
### ca_file
|
335
|
+
File path of the CA file, required only if having issue with SSL (see OpenSSL). No default
|
336
|
+
example:
|
337
|
+
```ruby
|
338
|
+
ca_file => "/path/to/cafile.crt"
|
339
|
+
```
|
340
|
+
|
341
|
+
### disable_telemetry
|
342
|
+
When set to true, telemetry about the plugin, won't be sent to Application Insights. Deafult false
|
343
|
+
example:
|
344
|
+
```ruby
|
345
|
+
disable_telemetry => true
|
346
|
+
```
|
347
|
+
|
348
|
+
### disable_cleanup
|
349
|
+
When set to true, storage cleanup won't be done by the plugin (should be done by some other means or by another Logstash process with this flag enabled) Default false
|
350
|
+
example:
|
351
|
+
```ruby
|
352
|
+
disable_cleanup => true
|
353
|
+
```
|
354
|
+
|
355
|
+
### delete_not_notified_blobs
|
356
|
+
When set to true, not notified blobs are deleted, if not set they are copied to the orphan-blobs container. Default false
|
357
|
+
example:
|
358
|
+
```ruby
|
359
|
+
delete_not_notified_blobs => true
|
360
|
+
```
|
361
|
+
### validate_endpoint
|
362
|
+
When set to true, access to application insights will be validated at initialization and if validation fail, logstash process will abort. Default false
|
363
|
+
example:
|
364
|
+
```ruby
|
365
|
+
validate_endpoint => true
|
366
|
+
```
|
367
|
+
|
368
|
+
### validate_storage
|
369
|
+
When set to true, access to azure storage for each of the configured accounts will be validated at initialization and if validation fail, logstash process will abort. Default false
|
370
|
+
example:
|
371
|
+
```ruby
|
372
|
+
validate_storage => true
|
373
|
+
```
|
374
|
+
|
375
|
+
### save_notified_blobs_records
|
376
|
+
When set to true, notified blobs records are saved in the state table, as long as blobs are retained in their containers. Default false
|
377
|
+
Used for troubleshooting
|
378
|
+
example:
|
379
|
+
```ruby
|
380
|
+
save_notified_blobs_records => true
|
381
|
+
```
|
382
|
+
|
383
|
+
### disable_notification
|
384
|
+
When set to true, notification is not sent to application insights, but behaves as if notified. Default false
|
385
|
+
Used for troubleshooting
|
386
|
+
example:
|
387
|
+
```ruby
|
388
|
+
disable_notification => true
|
389
|
+
```
|
390
|
+
|
391
|
+
### disable_blob_upload
|
392
|
+
When set to true, events are not uploaded, and blob not commited, but behaves as if uploaded and uploaded. Default false
|
393
|
+
Used for troubleshooting
|
394
|
+
example:
|
395
|
+
```ruby
|
396
|
+
disable_blob_upload => true
|
397
|
+
```
|
398
|
+
|
399
|
+
### stop_on_unknown_io_errors
|
400
|
+
When set to true, process will stop if an unknown IO error is detected. Default false
|
401
|
+
Used for troubleshooting
|
402
|
+
example:
|
403
|
+
```ruby
|
404
|
+
stop_on_unknown_io_errors => true
|
405
|
+
```
|
406
|
+
|
407
|
+
### notification_endpoint
|
408
|
+
when set notification are sent to an alternative endpoint. Default "https://dc.services.visualstudio.com/v2/track"
|
409
|
+
Used for troubleshooting
|
410
|
+
example:
|
411
|
+
```ruby
|
412
|
+
stop_on_unknown_io_errors => true
|
413
|
+
```
|
414
|
+
|
415
|
+
### notification_version
|
416
|
+
Advanced, internal, should not be set, the only current valid value is 1
|
417
|
+
|
418
|
+
### tables
|
419
|
+
Allow to support multiple tables, and to configure each table with its own parameters, using the global parameters as defaults.
|
420
|
+
It is only required if the plugin need to support mutiple table.
|
421
|
+
Tables is Hash, where the key is the table_id and the value is a has of specific properties, that their defualt value are the global properties.
|
422
|
+
The specific properties are: intrumentation_key, table_columns, blob_max_delay, csv_default_value, serialized_event_field, blob_serialization, csv_separator
|
423
|
+
template:
|
424
|
+
```ruby
|
425
|
+
tables => { "table_id1" => { properties } "table_id2" => { properties } }
|
426
|
+
```
|
427
|
+
|
428
|
+
Examples:
|
429
|
+
```ruby
|
430
|
+
tables => { "6f29a89e-1385-4317-85af-3ac1cea48058" => { "intrumentation_key" => "76c3b8e9-dfc6-4afd-8d4c-3b02fdadb19f", "blob_max_delay" => 60 } }
|
431
|
+
```
|
432
|
+
|
433
|
+
```ruby
|
434
|
+
tables => { "6f29a89e-1385-4317-85af-3ac1cea48058" => { "intrumentation_key" => "76c3b8e9-dfc6-4afd-8d4c-3b02fdadb19f", "blob_max_delay" => 60 }
|
435
|
+
"2e1b46aa-56d2-4e13-a742-d0db516d66fc" => { "intrumentation_key" => "76c3b8e9-dfc6-4afd-8d4c-3b02fdadb19f", "blob_max_delay" => 120 "ext" => "csv" "serialized_event_field" => "message" }
|
436
|
+
}
|
437
|
+
```
|
438
|
+
|
439
|
+
|
440
|
+
# Enviroment variables
|
441
|
+
|
442
|
+
###AZURE_STORAGE_ACCOUNT
|
443
|
+
Specifies the Azure storage account name
|
444
|
+
Will be used by the plugin to set the account name part in plugin property **storage_account_name_key** if it is missing
|
445
|
+
Example:
|
446
|
+
```sh
|
447
|
+
AZURE_STORAGE_ACCOUNT="my-storage-account"
|
448
|
+
```
|
449
|
+
|
450
|
+
###AZURE_STORAGE_ACCESS_KEY
|
451
|
+
Specifies the Azure storage account access key
|
452
|
+
Will be used by the plugin to set the key part in plugin property **storage_account_name_key** if it is missing
|
453
|
+
Example:
|
454
|
+
```sh
|
455
|
+
AZURE_STORAGE_ACCESS_KEY="pfrYTwPgKyYNfKBY2QdF+v5sbgx8/eAQp+FFkGpPBnkMDE1k+ZNK3r3qIPqqw8UsOIUqaF3dXBdPDouGJuxNXQ=="
|
456
|
+
```
|
457
|
+
|
458
|
+
# Setting up Http/Https Proxy
|
459
|
+
|
460
|
+
If you use a proxy server or firewall, you may need to set the HTTP_PROXY and/or HTTPS_PROXY **environment variables** in order to access Azure storage and Application Insights.
|
461
|
+
Examples:
|
462
|
+
```sh
|
463
|
+
HTTP_PROXY=http://proxy.example.org
|
464
|
+
HTTPS_PROXY=https://proxy.example.org
|
465
|
+
```
|
466
|
+
|
467
|
+
- If the proxy server requires a user name and password, include them in the following form:
|
468
|
+
```sh
|
469
|
+
HTTP_PROXY=http://username:password@proxy.example.org
|
470
|
+
```
|
471
|
+
|
472
|
+
- If the proxy server uses a port other than 80, include the port number:
|
473
|
+
```sh
|
474
|
+
HTTP_PROXY=http://username:password@proxy.example.org:8080
|
475
|
+
```
|
476
|
+
|
477
|
+
# Setting up SSL certificates
|
478
|
+
|
479
|
+
When using SSL/HTTPS, typically log in or authentication may require a CA Authority (CA) certificate. If the required certificate is not already bundled in the system. it may be configured in the plugin (see above ca_file)
|
480
|
+
example:
|
481
|
+
```ruby
|
482
|
+
ca_file => "/path/to/cafile.crt"
|
483
|
+
```
|
484
|
+
|
485
|
+
# Getting Started for Contributors
|
486
|
+
|
487
|
+
If you would like to become an active contributor to this project please follow the instructions provided in [CONTRIBUTING.md](CONTRIBUTING.md) and [DEVELOPER.md](DEVELOPER.md)
|
488
|
+
|
489
|
+
# Provide Feedback
|
490
|
+
|
491
|
+
If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Microsoft/logstash-output-application-insights/issues) section of the project.
|
492
|
+
|
493
|
+
# Code of Conduct
|
494
|
+
|
495
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|