- fluentd record:
1490924392 {"log": "GET / HTTP/1.1 200"}
- sent as:
GET / HTTP/1.1 200
<match splunk.**>
@type splunk_tcp
host example.com
port 8089
# format parameter
format raw
event_key log
# ssl parameter
use_ssl true
ca_file /path/to/ca.pem
# buffered output parameter
flush_interval 10s
</match>
This example shows json format.
- fluentd record:
1490924392 {"method": "GET", path: "/", code: 200}
- sent as:
{"time": 1490924392, "method": "GET", path: "/", code: 200}
<match splunk.**>
@type splunk_tcp
host example.com
port 8089
format json
# ssl parameter
use_ssl true
ca_file /path/to/ca.pem
# flush
flush_interval 10s
</match>
You can use a sourcetype configuration like the following.
[fluentd]
TIME_PREFIX=\"time\":
TIME_FORMAT=%s
KV_MODE=json
The value must be splunk_tcp
.
The Splunk hostname.
The Splunk port.
The value specified by event_key
parameter is sent to Splunk as an event.
If the key missing in a record, nothing is sent.
- event_key
KV_MODE=json
can be used as sourcetype configuration.
- use_fluentd_time
- time_key
- time_format
- localtime
Key-value pairs like the following.
time=1490862563 method="GET" path="/" code=200
KV_MODE=auto
can be used as sourcetype configuration.
- use_fluentd_time
- time_key
- time_format
- localtime
For raw
format.
This parameter is required when the format is raw
.
For json
and kv
format.
The default: true
If set to true
, fluentd's timestamp is injected to the top of the record before sent to Splunk.
For example, the first record is converted to the next one.
{"method": "GET", path: "/", code: 200}
{"time": 1490862563, "method": "GET", path: "/", code: 200}
If your record already has the column for a timestamp, this parameter should be false
.
For json
and kv
format.
The default: time
The key which is inserted into a record by use_fluend_time
parameter.
For json
and kv
format.
The default: unixtime
The format of timestamp which is inserted by use_fluentd_time
parameter.
You can specify a strftime format or unixtime
(unix timestamp as integer).
For example,
time_format %Y-%m-%dT%H:%M:%S%z
the first record record is converted to the next one by this time_format
.
{"method": "GET", path: "/", code: 200}
{"time": "2017-03-30T08:29:23+0000", "method": "GET", path: "/", code: 200}
For json
and kv
format
The default: false
If true
, use local time when the timestamp formatted as the strftime format. Otherwise UTC is used.
The default: "\n"
The line breaker used when multiple records are sent at once.
The default: false
Use SSL when connecting to Splunk.
The default: true
Enable/Disable SSL certificate verification.
The path of CA file.
The path of client certificate file.
The path of client key file
The passphrase of client key.