It works to run the | curl method=get to my URL, but when setting it up as a modular input I get errors in the
ta_webtools_curl_inputs.log.
I am running version 2.0.2 of the tool on Splunk Enterprise 8.0.4.
The error:
2021-01-20 12:08:50,106 ERROR pid=125277 tid=MainThread file=base_modinput.py:log_error:309 | Get error when collecting events.
Traceback (most recent call last):
File "/opt/splunk/etc/apps/TA-webtools/bin/ta_webtools/aob_py3/modinput_wrapper/base_modinput.py", line 128, in stream_events
self.collect_events(ew)
File "/opt/splunk/etc/apps/TA-webtools/bin/curl_inputs.py", line 84, in collect_events
input_module.collect_events(self, ew)
File "/opt/splunk/etc/apps/TA-webtools/bin/input_module_curl_inputs.py", line 43, in collect_events
if len(payload)>0:
TypeError: object of type 'NoneType' has no len()
Any pointers to what may cause this error?
Perhaps @jkat54 ?
Found the problem by digging a bit in the code.
input_module_curl_inputs.py", line 43, is getting and testing the values from inputs configuration.
Seems that len test is failing instead of setting 0 if nothing is entered in the (put) payload section.
So I just entered {"dummy":"load"} in the Payload section and the input started working.
Found the problem by digging a bit in the code.
input_module_curl_inputs.py", line 43, is getting and testing the values from inputs configuration.
Seems that len test is failing instead of setting 0 if nothing is entered in the (put) payload section.
So I just entered {"dummy":"load"} in the Payload section and the input started working.