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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...