All Apps and Add-ons

Webtools Add-on (TA-webtools) modular input fails

ivarny
Path Finder

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 ?

Labels (1)
Tags (1)
0 Karma
1 Solution

ivarny
Path Finder

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. 

View solution in original post

Tags (1)
0 Karma

ivarny
Path Finder

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. 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...