README.md 20.6 KB
Newer Older
1
sumologic-collector Cookbook
Ben Newton's avatar
Ben Newton committed
2
============================
Ben Vidulich's avatar
Ben Vidulich committed
3
4
[![Cookbook Version](https://img.shields.io/cookbook/v/sumologic-collector.svg?style=flat)](https://supermarket.chef.io/cookbooks/sumologic-collector)
[![Build Status](https://travis-ci.org/SumoLogic/sumologic-collector-chef-cookbook.svg?branch=master)](https://travis-ci.org/SumoLogic/sumologic-collector-chef-cookbook)
JJ Asghar's avatar
JJ Asghar committed
5
[![Build Status](https://jenkins-01.eastus.cloudapp.azure.com/job/sumologic-collector-cookbook/badge/icon)](https://jenkins-01.eastus.cloudapp.azure.com/job/sumologic-collector-cookbook/)
Ben Vidulich's avatar
Ben Vidulich committed
6

Matt Whipple's avatar
Matt Whipple committed
7
This cookbook installs the Sumo Logic collector or updates an existing one if it was set to use [Local Configuration Mangement](https://help.sumologic.com/Send_Data/Local_Configuration_File_Management). Installation on Linux uses the shell script
Duc Ha's avatar
Duc Ha committed
8
installer and on Windows uses the exe installer. Here are the steps it follows:
Ben Newton's avatar
Ben Newton committed
9

Duc Ha's avatar
Duc Ha committed
10
1. Sets up `sumo.conf` and `sumo.json` (or the json folder). By default the standard Linux logs (system and security) are captured. On Windows the application and system event logs are captured.
sumoway's avatar
sumoway committed
11
12
13
2. Downloads latest installer
3. Runs installer
4. Starts collector and registers with the Sumo Logic service
sumoway's avatar
sumoway committed
14

15
For collector update, the existing collector must have been switched to use Local Configuration Mangement - see the instructions to
Matt Whipple's avatar
Matt Whipple committed
16
17
18
configure [New Collectors](https://help.sumologic.com/Send_Data/Local_Configuration_File_Management/Local_File_Configuration_Management_for_New_Collectors_and_Sources)
or [Existing Collectors](https://help.sumologic.com/Send_Data/Local_Configuration_File_Management/Local_Configuration_File_Management_for_Existing_Collectors_and_Sources)
for more details. The steps the cookbook follows:
Duc Ha's avatar
Duc Ha committed
19

Duc Ha's avatar
Duc Ha committed
20
21
22
23
1. Verify that the collector folder exists.
2. (Optional) Recreate `sumo.conf` and `sumo.json` (or the json files under the json folder).
3. Restart the collector for the changes to take effect.   

sumoway's avatar
sumoway committed
24
The collector Requires outbound access to https://collectors.sumologic.com.
Duc Ha's avatar
Duc Ha committed
25
Edit `sumo.json` (or the json files under the json folder) to add/edit/remove sources.  After installation you can
Karl Q's avatar
Karl Q committed
26
[test connectivity](http://help.sumologic.com/Send_Data/Installed_Collectors/Step_1._Prepare_to_Install_Collectors/03Test_Connectivity).
sumoway's avatar
sumoway committed
27

28

Duc Ha's avatar
Duc Ha committed
29
30
31
Note
------
Starting from 19.107, there are 2 major extensions to SumoLogic collectors:
32
* You can configure a collector's parameters from a set of json files under a common folder. Each of the json file will represent a source on that collector. Updates made to a json file will then be reflected on its corresponding source. Note that the format of this kind of file is **slightly different** from that of the traditional single json file (sumo.json) and they are **not** compatible. You also need to use the parameter `syncSources` instead of `sources` inside `sumo.conf`.
Matt Whipple's avatar
Matt Whipple committed
33
See more details [here](https://help.sumologic.com/Send_Data/Installed_Collectors/sumo.conf).
34
* You can change a collector's existing parameters through local configuration json file(s) continuously. Before this, using collector API was the only option.
Matt Whipple's avatar
Matt Whipple committed
35
More information about this is [here](https://help.sumologic.com/Send_Data/Local_Configuration_File_Management)
Ben Vidulich's avatar
Ben Vidulich committed
36

Duc Ha's avatar
Duc Ha committed
37
Installation
Ben Newton's avatar
Ben Newton committed
38
------------
39
1. Create an [Access Key](http://help.sumologic.com/Manage/Security/Access_Keys)
Yoway Buorn's avatar
Yoway Buorn committed
40
2. Install the cookbook in your Chef repo (your knife version should be at least 11.10.4 and you should have the [knife github plugin](https://github.com/websterclay/knife-github-cookbooks) installed):
41
42
43
44

  ```
  knife cookbook github install SumoLogic/sumologic-collector-chef-cookbook
  ```
45
3. Specify data bag and item with your access credentials.  The data item should
46
47
contain attributes `accessID` and `accessKey`. Note that attribute names are case sensitive.  If the cases mismatch, the values will not appear when chef-client runs. The default data bag/item is
`['sumo-creds']['api-creds']`. More flexible approach is to set `node.run_state['sumo_key_id']` and `node.run_state['sumo_key_secret']` to supply credentials from your wrapper cookbook level. Please note, storing sensitive data anywhere outside of `node.run_state` is not safe, because it's being uploaded to the Chef Server at the end of chef-client run. `node.run_state` [is not persistent and generally discarded at the end of chef-client run](https://docs.chef.io/recipes.html#node-run-state). But you still want to make sure that credentials originates from a secure place, such as your own encrypted data bag, Chef Vault or alternative approach that stores and communicates your secrets in an encrypted manner.
Ben Vidulich's avatar
Ben Vidulich committed
48
4. (Optional) Decide if you want to use the Local Configuration Management feature by setting the attribute `default['sumologic']['local_management']` properly. By default this feature is on, to leverage the power of Chef.
Duc Ha's avatar
Duc Ha committed
49
5. (Optional) Select the json configuration option (i.e. through a single file or a folder) by setting the attribute `default['sumologic']['use_json_path_dir']` appropriately. By default a single json file is used.
Ben Vidulich's avatar
Ben Vidulich committed
50
6. (Optional) Check if the path to the json file or the json folder is set correctly in the attribute `default['sumologic']['sumo_json_path']`. By default this is the path to the json file at `/etc/sumo.json` on Linux or `c:\sumo\sumo.json` on Windows.
Duc Ha's avatar
Duc Ha committed
51
7. Upload the cookbook to your Chef Server:
52
53
54
55

  ```
  knife cookbook upload sumologic-collector
  ```
Duc Ha's avatar
Duc Ha committed
56
8. Add the `sumologic-collector` receipe to your node run lists.  This step depends
sumoway's avatar
sumoway committed
57
on your node configuration, so specifics will not be described in this README.md.
Ben Newton's avatar
Ben Newton committed
58

Duc Ha's avatar
Duc Ha committed
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
Attributes
----------

<table>
  <tr>
    <td>['sumologic']['ephemeral']</td>
    <td>Boolean</td>
    <td>Sumo Logic Ephemeral Setting</td>
    <td>Required</td>
  </tr>
  <tr>
    <td>['sumologic']['installDir'] </td>
    <td>String</td>
    <td>Sumo Logic Install Directory</td>
    <td>Required</td>
  </tr>
  <tr>
    <td>['sumologic']['credentials']['bag_name']</td>
    <td>String</td>
    <td>Name of the data bag.</td>
    <td>Required</td>
  </tr>
  <tr>
    <td>['sumologic']['credentials']['item_name']</td>
    <td>String</td>
    <td>Name of the item within the data bag. </td>
    <td>Required</td>
  </tr>
  <tr>
    <td>['sumologic']['credentials']['secret_file']</td>
    <td>String</td>
    <td>Path to the local file containing the encryption secret key.</td>
    <td>Optional</td>
  </tr>
</table>

Ben Vidulich's avatar
Ben Vidulich committed
96
97
98
Resource/Provider
-----------------

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
sumologic_collector
---------

Provides actions for installing and managing a SumoLogic Collector

### Actions
`default` = `:install_and_configure`

#### :install
Installs an unconfigured and unregistered SumoLogic Collector. Use `:configure` to configure it later
```ruby
sumologic_collector 'C:\sumo' do
  action :install
end
```

#### :install_and_configure
Installs and configures a SumoLogic Collector. This is the default action
```ruby
sumologic_collector 'C:\sumo' do
  collector_name 'fileserver'
  sumo_access_id 'MYACCESSID'
  sumo_access_key 'MYACCESSKEY'
  proxy_host 'proxy.mydomain.com'
  proxy_port '8080'
end
```

#### :configure
Configures a pre-installed but unconfigured (and unregistered) SumoLogic Collector

*Note: The recommended flow to use this is to have the collector installed without
configuration or registration by using the `:install` action*
```ruby
sumologic_collector 'C:\sumo' do
  collector_name 'fileserver'
  sumo_access_id 'MYACCESSID'
  sumo_access_key 'MYACCESSKEY'
  proxy_host 'proxy.mydomain.com'
  proxy_port '8080'
  action :configure
end
```

#### :remove
Uninstalls a SumoLogic collector using the provided uninstaller

```ruby
sumologic_collector 'C:\sumo' do
  action :remove
end
```

#### :start
Starts the SumoLogic Collector

```ruby
sumologic_collector 'C:\sumo' do
  action :start
end
```
#### :stop
Stops the SumoLogic Collector

```ruby
sumologic_collector 'C:\sumo' do
  action :stop
end
```

#### :restart
Restarts the SumoLogic Collector

```ruby
sumologic_collector 'C:\sumo' do
  action :restart
end
```

### Attribute Parameters
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Installed_Collectors/stu_user.properties)
for more information about these attributes.

| Attribute | Type | Description | Default | Required | Used Actions |
| --------- | ---- | ----------- | ------- | -------- | ------------ |
| `dir` | `String` | Directory where collector will be installed (`name` attribute) | none | `true` | all |
| `source` | `String` | URL to download collector installer from | none (uses the latest installer from SumoLogic) | `false` | `:install`, `:install_and_configure` |
| `collector_name` | `String` | Name of this Collector | `nil` | `false` | `:install_and_configure`, `:configure` |
| `collector_url` | `String` | URL used to register Collector for data collection API | `nil` | `false` | `:install_and_configure`, `:configure` |
Madan Kapoor's avatar
Madan Kapoor committed
188
| `collector_secure_files` | `Boolean` | Enable or disable enhanced file security | `nil` | `false` | `:install_and_configure`, `:install` |
189
190
191
| `host_name` | `String` | Hostname of this collector + default hostname of sources on it | `nil` | `false` | `:install_and_configure`, `:configure` |
| `description` | `String` | Description of this collector | `nil` | `false` | `:install_and_configure`, `:configure` |
| `category` | `String` | Default category for sources on this collector | `nil` | `false` | `:install_and_configure`, `:configure` |
192
193
194
195
196
197
198
199
200
201
202
203
| `sumo_token_and_url` | `String` | Encoded Setup Wizard token | `nil` | `false` | `:install_and_configure` |
| `sumo_access_id` | `String` | Access ID used when logging in with Access ID and Key | `nil` | `false` | `:install_and_configure`, `:configure` |
| `sumo_access_key` | `String` | Access Key used when logging in with Access ID and Key | `nil` | `false` | `:install_and_configure`, `:configure` |
| `proxy_host` | `String` | Sets proxy host when a proxy server is used | `nil` | `false` | `:install_and_configure`, `:configure` |
| `proxy_port` | `String`, `Fixnum` | Sets proxy port when a proxy server is used | `nil` | `false` | `:install_and_configure`, `:configure` |
| `proxy_user` | `String` | Sets proxy user when a proxy server is used with authentication | `nil` | `false` | `:install_and_configure`, `:configure` |
| `proxy_password` | `String` | Sets proxy password when a proxy server is used with authentication | `nil` | `false` | `:install_and_configure`, `:configure` |
| `proxy_ntlmdomain` | `String` | Sets proxy NTLM domain when a proxy server is used with NTLM authentication | `nil` | `false` | `:install_and_configure`, `:configure` |
| `sources` | `String` | Sets the JSON file describing sources to configure on registration | `nil` | `false` |  `:install_and_configure`, `:configure` |
| `sync_sources` | `String` | Sets the JSON file describing sources to configure on registration, which will be continuously monitored and synchronized with the Collector's configuration | `nil` | `false` | `:install_and_configure`, `:configure` |
| `ephemeral` | `Boolean` | When `true`, the Collector will be deleted after goes offline for a certain period of time | `false` | `false` | `:install_and_configure`, `:configure` |
| `clobber` | `Boolean` | When `true`, if there is any existing Collector with the same name, that Collector will be deleted | `false` | `false` | `:install_and_configure`, `:configure` |
204
| `disable_upgrade` | `Boolean` | If true, the collector rejects upgrade requests from Sumo. | `false` | `false` | `:install_and_configure`, `:configure` |
Srishti Jain's avatar
Srishti Jain committed
205
206
| `enable_script_source` | `Boolean` | Script Sources are disabled by default. You can enable them by setting this parameter to true. | `false` | `false` | `:install_and_configure`, `:configure` |
| `enable_action_source` | `Boolean` | Script Action Sources are disabled by default. You can enable them by setting this parameter to true. | `false` | `false` | `:install_and_configure`, `:configure` |
207
208
209
210
| `time_zone` | `String` | The default time zone for sources on this collector | `nil` | `false` | `:install_and_configure`, `:configure` |
| `target_cpu` | `Integer` | Target to which to limit the CPU usage of this collector | `nil` | `false` | `:install_and_configure`, `:configure` |
| `wrapper_java_initmemory` | `Integer` | Override the initial Java heap size | `nil` | `false` | `:configure` |
| `wrapper_java_maxmemory` | `Integer` | Override the maximum Java heap size | `nil` | `false` | `:configure` |
211
212
213
| `runas_username` | `String` | Which user the daemon will run as | `nil` | `false` | `:install_and_configure`, `:install` |
| `winrunas_password` | `String` | On Windows, the password for the user the service will run as | `nil` | `false` | `:install_and_configure`, `:install` |
| `skip_registration` | `Boolean` | When `true` the collector will not register upon installation | `false` | `nil` | `:install_and_configure` |
dev-rickjury's avatar
dev-rickjury committed
214
| `fields` | `Hash` | Sets the fields property in user.properties used by ingest budgets and other future features | `nil` | `false` | `:install_and_configure`, `:configure` |
215

Ben Vidulich's avatar
Ben Vidulich committed
216
217
218
sumologic_collector_installer
---------

219
220
*Note: `sumologic_collector_installer` has been deprecated, please use `sumologic_collector` with the `:install_and_configure` action (the default)*

Ben Vidulich's avatar
Ben Vidulich committed
221
222
223
224
225
226
227
228
229
Allows for additional customisation of the Sumo Logic Collector installer

### Actions
`default` = `:install`

- `:install` - installs the Sumo Logic Collector if it is not already installed

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
230
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Installed_Collectors/Step_4._Install_the_Collector/02_Quiet_Mode_Installation_Method)
Ben Vidulich's avatar
Ben Vidulich committed
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
for more information about these attributes.

- `dir` - Directory where the Collector will be installed
- `source` - URL where installer will be downloaded from
- `collector_name`
- `collector_url`
- `sumo_token_and_url`
- `sumo_access_id`
- `sumo_access_key`
- `proxy_host`
- `proxy_port`
- `proxy_user`
- `proxy_password`
- `proxy_ntlmdomain`
- `sources`
- `sync_sources`
- `ephemeral`
- `clobber`
- `runas_username`
- `winrunas_password`
- `skip_registration`

### Examples

```ruby
# Installs the Collector on Windows and skips registration
sumologic_collector_installer 'c:\sumo' do
  source 'https://collectors.sumologic.com/rest/download/win64'
  sumo_access_id node['SUMO_ACCESS_ID']
  sumo_access_key node['SUMO_ACCESS_KEY']
  skip_registration true
end
```

Ben Vidulich's avatar
Ben Vidulich committed
265
Collector Sources
Ben Vidulich's avatar
Ben Vidulich committed
266
267
268
269
---------

### Attribute Parameters

Ben Vidulich's avatar
Ben Vidulich committed
270
271
The following attributes are common to all of the sources listed below.

Matt Whipple's avatar
Matt Whipple committed
272
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
for more information about these attributes.

- `owner` - owner of the JSON Source configuration file
- `group` - group of the JSON Source configuration file
- `mode` - file mode of the JSON Source configuration file
- `source_name` - name of the source. **required**
- `source_json_directory` - directory where JSON Source configuration file will be stored. **required**
- `description`
- `category`
- `host_name`
- `time_zone`
- `automatic_date_parsing`
- `multiline_processing_enabled`
- `use_autoline_matching`
- `manual_prefix_regexp`
- `force_time_zone`
- `default_date_format`
- `filters`
- `alive`

Ben Vidulich's avatar
Ben Vidulich committed
293
sumo_source_docker
Ben Vidulich's avatar
Ben Vidulich committed
294
295
296
297
298
299
300
301
302
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
303
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
304
305
306
307
308
309
310
311
312
313
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `uri`
- `specified_containers`
- `all_containers`
- `cert_path`
- `source_type` - one of `:docker_stats`, `:docker_log`. **required**
314
- `collect_events`
Ben Vidulich's avatar
Ben Vidulich committed
315
316
317
318

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
319
sumo_source_docker 'docker_stats' do
Ben Vidulich's avatar
Ben Vidulich committed
320
321
322
323
324
325
  source_json_directory node['sumologic']['sumo_json_path']
  source_type :docker_stats
  uri 'https://127.0.0.1:2376'
  all_containers true
end

Ben Vidulich's avatar
Ben Vidulich committed
326
sumo_source_docker 'docker_log' do
Ben Vidulich's avatar
Ben Vidulich committed
327
328
329
330
331
332
333
  source_json_directory node['sumologic']['sumo_json_path']
  source_type :docker_log
  uri 'https://127.0.0.1:2376'
  all_containers true
end
```

Ben Vidulich's avatar
Ben Vidulich committed
334
sumo_source_local_file
Ben Vidulich's avatar
Ben Vidulich committed
335
336
337
338
339
340
341
342
343
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
344
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
345
346
347
348
349
350
351
352
353
354
355
356
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `path_expression` - **required**
- `blacklist`
- `encoding`

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
357
sumo_source_local_file 'local_file' do
Ben Vidulich's avatar
Ben Vidulich committed
358
359
360
361
362
  source_json_directory node['sumologic']['sumo_json_path']
  path_expression '/tmp/example'
end
```

Ben Vidulich's avatar
Ben Vidulich committed
363
sumo_source_local_windows_event_log
Ben Vidulich's avatar
Ben Vidulich committed
364
365
366
367
368
369
370
371
372
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
373
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
374
375
376
377
378
379
380
381
382
383
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `log_names` - **required**

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
384
sumo_source_local_windows_event_log 'local_win_event_log' do
Ben Vidulich's avatar
Ben Vidulich committed
385
386
387
388
389
  source_json_directory node['sumologic']['sumo_json_path']
  log_names ['security', 'application']
end
```

Ben Vidulich's avatar
Ben Vidulich committed
390
sumo_source_remote_file
Ben Vidulich's avatar
Ben Vidulich committed
391
392
393
394
395
396
397
398
399
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
400
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `remote_hosts` - **required**
- `remote_port` - **required**
- `remote_user` - **required**
- `remote_password` - **required**
- `key_path` - **required**
- `key_password`
- `path_expression` - **required**
- `auth_method` - one of `key` or `password`.
- `blacklist`

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
419
sumo_source_remote_file 'remote_file' do
Ben Vidulich's avatar
Ben Vidulich committed
420
421
422
423
424
425
426
427
428
429
430
  source_json_directory node['sumologic']['sumo_json_path']
  remote_hosts ['127.0.0.1']
  remote_port 22
  remote_user 'user'
  remote_password 'password'
  key_path ''
  path_expression '/tmp/example'
  auth_method 'password'
end
```

Ben Vidulich's avatar
Ben Vidulich committed
431
sumo_source_remote_windows_event_log
Ben Vidulich's avatar
Ben Vidulich committed
432
433
434
435
436
437
438
439
440
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
441
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
442
443
444
445
446
447
448
449
450
451
452
453
454
455
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `domain` - **required**
- `username` - **required**
- `password` - **required**
- `hosts` - **required**
- `log_names` - **required**

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
456
sumo_source_remote_windows_event_log 'remote_win_event_log' do
Ben Vidulich's avatar
Ben Vidulich committed
457
458
459
460
461
462
463
464
465
  source_json_directory node['sumologic']['sumo_json_path']
  domain 'mydomain'
  username 'user'
  password 'password'
  hosts ['myremotehost1']
  log_names ['security', 'application']
end
```

Ben Vidulich's avatar
Ben Vidulich committed
466
sumo_source_script
Ben Vidulich's avatar
Ben Vidulich committed
467
468
469
470
471
472
473
474
475
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
476
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `commands` - **required**
- `file`
- `working_dir`
- `timeout`
- `script`
- `cron_expression`

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
492
sumo_source_script 'script' do
Ben Vidulich's avatar
Ben Vidulich committed
493
494
495
496
497
498
  source_json_directory node['sumologic']['sumo_json_path']
  commands ['/bin/bash']
  cron_expression '0 * * * *'
end
```

Ben Vidulich's avatar
Ben Vidulich committed
499
sumo_source_syslog
Ben Vidulich's avatar
Ben Vidulich committed
500
501
502
503
504
505
506
507
508
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

Matt Whipple's avatar
Matt Whipple committed
509
See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
Ben Vidulich's avatar
Ben Vidulich committed
510
511
512
513
514
515
516
517
518
519
520
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `protocol`
- `port`

### Examples

```ruby
Ben Vidulich's avatar
Ben Vidulich committed
521
sumo_source_syslog 'syslog' do
Ben Vidulich's avatar
Ben Vidulich committed
522
523
524
525
  source_json_directory node['sumologic']['sumo_json_path']
end
```

526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
sumo_source_graphite_metrics
---------

### Actions
`default` = `:create`

- `:create` - creates a JSON Source configuration

### Attribute Parameters

See the [Sumo Logic documentation](https://help.sumologic.com/Send_Data/Sources/Use_JSON_to_Configure_Sources)
for more information about these attributes.

The following attribute parameters are in addition to the generic parameters
listed above.

- `protocol`
- `port`

### Examples

```ruby
sumo_source_graphite_metrics 'graphite' do
  source_json_directory node['sumologic']['sumo_json_path']
end
```

Ben Newton's avatar
Ben Newton committed
553
554
Contributing
------------
555
Please see CONTRIBUTING.md for guidelines
Ben Newton's avatar
Ben Newton committed
556
557
558
559
560


License and Authors
-------------------
Authors:
Duc Ha's avatar
Duc Ha committed
561
	Ben Newton (ben@sumologic.com), Duc Ha (duc@sumologic.com)