Splunk Dev

How to print to "output: testing enviroment" in Splunk Add-on Builder using Python Input?

Edward1234
Engager

I am stuck. I am using the Splunk Add-on Builder with a Python data input and I want to print my variables that are set in "Data Input Definition" area to the "output" area. I can't get anything to print. Not even "print("HELLO")" will show up. I tried the logging functions and they don't work.

I have a text data input called "splunk_hec_url".

In " def collect_events" I have this:

    print("testing")
    splunk_hec_url_ID= helper.get_arg('splunk_hec_url')
    print(splunk_hec_url_ID)

When I click "test", nothing shows up in the output section. What am I doing wrong? How do I get anything to print to the output section? I tried "helper.log_info("log message")" and that doesn't show up either.

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...