Skip to content

Commit 979db29

Browse files
authored
Update index.html.markdown
Add example usage for default_date_formats, filters and fields common parameters
1 parent d6c3aa8 commit 979db29

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

website/docs/index.html.markdown

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,45 @@ The following properties are common to ALL sources and can be used to configure
127127
- `default_date_formats` - (Optional) Define the format for the timestamps present in your log messages. You can specify a locator regex to identify where timestamps appear in log lines. Requires 'automatic_date_parsing' set to True.
128128
+ `format` - (Required) The timestamp format supplied as a Java SimpleDateFormat, or "epoch" if the timestamp is in epoch format.
129129
+ `locator` - (Optional) Regular expression to locate the timestamp within the messages.
130+
131+
Usage:
132+
```hcl
133+
default_date_formats {
134+
format = "MM-dd-yyyy HH:mm:ss"
135+
locator = "timestamp:(.*)\\s"
136+
}
137+
```
130138
- `filters` - (Optional) If you'd like to add a filter to the source.
131139
+ `filter_type` - (Required) The type of filter to apply. (Exclude, Include, Mask, or Hash)
132140
+ `name` - (Required) The Name for the filter.
133-
+ `regexp` - (Required) Regular expression to match within the messages. When used with Incude/Exclude the expression must match the entire message.
134-
+ `mask` - (Optional) When applying a Mask rule, replaces the detected expression with this string.
141+
+ `regexp` - (Required) Regular expression to match within the messages. When used with Incude/Exclude the expression must match the entire message. When used with Mask/Hash rules the expression must contain an unnamed capture group to hash/mask.
142+
+ `mask` - (Optional) When applying a Mask rule, replaces the detected expression with this string.
143+
144+
Usage:
145+
```hcl
146+
filters {
147+
filter_type = "Include"
148+
name = "Sample Include"
149+
regexp = ".*\\d{16}.*"
150+
}
151+
filters {
152+
filter_type = "Mask"
153+
name = "Sample Mask"
154+
regexp = "(\\d{16})"
155+
mask = "MaskedID"
156+
}
157+
```
135158
- `cutoff_timestamp` - (Optional) Only collect data more recent than this timestamp, specified as milliseconds since epoch (13 digit).
136159
- `cutoff_relative_time` - (Optional) Can be specified instead of cutoffTimestamp to provide a relative offset with respect to the current time. Example: use -1h, -1d, or -1w to collect data that's less than one hour, one day, or one week old, respectively.
137160
- `fields` - (Optional) Map containing key/value pairs.
138-
161+
162+
Usage:
163+
```hcl
164+
fields = {
165+
environment = "production"
166+
service = "apache"
167+
}
168+
```
139169
## Configuring SNS Subscription
140170
This is supported in the following resources.
141171
- `sumologic_cloudfront_source`

0 commit comments

Comments
 (0)