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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...