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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...