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!

ATTENTION!! We’re MOVING (not really)

Hey, all! In an effort to keep this Slack workspace secure and also to make our new members' experience easy, ...

Splunk Admins: Build a Smarter Stack with These Must-See .conf25 Sessions

  Whether you're running a complex Splunk deployment or just getting your bearings as a new admin, .conf25 ...

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...