Getting Data In

How to write data into different sourcetype?

wangzhaoyu
New Member

Hello,

I am doing an addon, in the addon i am going to get data from multi-endpoints, and write them to different sourcetypes. But the result is: if sequential_mode is 0, it writes the first endpoint's data into all sourcetypes, if sequential_mode is 1, it writes all endpoints' data into all sourcetypes. what's wrong in my config? Is there any other parameters or config files should i have to config? Here is my inputs.conf. Thanks!

[test://test.com--424-]
host = test.com
endpoint = https://test.com/api/endpoint_1
cookies =
http_header_propertys =
auth_type = oauth2
oauth2_token_type = Bearer
oauth2_access_token =
oauth2_refresh_token =
oauth2_client_id =
oauth2_client_secret =
oauth2_resource_id =
index_error_response_codes = 0
index = idx_test
http_method = GET
interval = 300
response_type = json
disabled = 0
sequential_mode = 1
request_timeout = 60
sourcetype = endpoint_1
response_handler = testhandler
streaming_request = 0

[test://test.com--703-]
host = test.com
endpoint = https://test/api/endpoint_2
cookies =
http_header_propertys =
auth_type = oauth2
oauth2_token_type = Bearer
oauth2_access_token =
oauth2_refresh_token =
oauth2_refresh_url =
oauth2_client_id =
oauth2_client_secret =
oauth2_resource_id =
index_error_response_codes = 0
index = idx_test
http_method = GET
interval = 300
response_type = json
disabled = 0
sequential_mode = 1
request_timeout = 60
sourcetype = endpoint_2
response_handler = testhandler
streaming_request = 0

Tags (3)
0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...