Skip to content

Commit 9e5e331

Browse files
committed
Update config "regex" to "timestamp.regex"
1 parent e8593df commit 9e5e331

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Use the below schema to configure Splunk Connect for Kafka
136136
"kerberos.user.principal": "<The Kerberos user principal the connector may use to authenticate with Kerberos>",
137137
"kerberos.keytab.path": "<The path to the keytab file to use for authentication with Kerberos>"
138138
"enable.timestamp.extraction": "<true|false>",
139-
"regex": "<regex for timestamp extraction>",
139+
"timestamp.regex": "<regex for timestamp extraction>",
140140
"timestamp.format": "<time-format for timestamp extraction>"
141141
}
142142
}
@@ -229,7 +229,7 @@ Use the below schema to configure Splunk Connect for Kafka
229229
| Name | Description | Default Value |
230230
|-------- |----------------------------|-----------------------|
231231
| `enable.timestamp.extraction` | To enable timestamp extraction ,set the value of this field to `true`. <br/> **NOTE:** <br/> Applicable only if `splunk.hec.raw` is `false` | `false` |
232-
| `regex` | Regex for timestamp extraction. <br/> **NOTE:** <br/> Regex must have name captured group `"time"` For eg.: `\\\"time\\\":\\s*\\\"(?<time>.*?)\"` | `""` |
232+
| `timestamp.regex` | Regex for timestamp extraction. <br/> **NOTE:** <br/> Regex must have name captured group `"time"` For eg.: `\\\"time\\\":\\s*\\\"(?<time>.*?)\"` | `""` |
233233
| `timestamp.format` | Time-format for timestamp extraction .<br/>For eg.: <br/>If timestamp is `1555209605000` , set `timestamp.format` to `"epoch"` format .<br/> If timestamp is `Jun 13 2010 23:11:52.454 UTC` , set `timestamp.format` to `"MMM dd yyyy HH:mm:ss.SSS zzz"` | `""` |
234234

235235
## Load balancing

src/main/java/com/splunk/kafka/connect/SplunkSinkConnectorConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public final class SplunkSinkConnectorConfig extends AbstractConfig {
9191

9292
// Input the Regex String and timestamp format
9393
static final String ENABLE_TIMESTAMP_EXTRACTION_CONF = "enable.timestamp.extraction";
94-
static final String REGEX_CONF = "regex";
94+
static final String REGEX_CONF = "timestamp.regex";
9595
static final String TIMESTAMP_FORMAT_CONF = "timestamp.format";
9696

9797
// Kafka configuration description strings

test/lib/connect_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,13 @@
206206
"topics": "date_format",
207207
"splunk_hec_raw": False,
208208
"enable_timestamp_extraction" : "true",
209-
"regex": r"\\\"time\\\":\\s*\\\"(?<time>.*?)\"",
209+
"timestamp_regex": r"\\\"time\\\":\\s*\\\"(?<time>.*?)\"",
210210
"timestamp_format": "MMM dd yyyy HH:mm:ss.SSS zzz"},
211211
{"name": "test_extracted_timestamp_epochformat",
212212
"splunk_sourcetypes": "epoch_format",
213213
"topics": "epoch_format",
214214
"splunk_hec_raw": False,
215215
"enable_timestamp_extraction" : "true",
216-
"regex": r"\\\"time\\\":\\s*\\\"(?<time>.*?)\"",
216+
"timestamp_regex": r"\\\"time\\\":\\s*\\\"(?<time>.*?)\"",
217217
"timestamp_format": "epoch"}
218218
]

test/lib/connector.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"value.converter.schema.registry.url": "{{value_converter_schema_registry_url}}",
5050
"value.converter.schemas.enable": "{{value_converter_schemas_enable}}",
5151
"enable.timestamp.extraction": "{{enable_timestamp_extraction}}",
52-
"regex": "{{regex}}",
52+
"timestamp.regex": "{{timestamp_regex}}",
5353
"timestamp.format": "{{timestamp_format}}"
5454
}
5555
}

0 commit comments

Comments
 (0)