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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...