Archive2

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
Reply
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!