<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk Addon Build shows zero events - event section of code in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750924#M82167</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/155831"&gt;@tej57&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code, I reused the template that the addon builder app started.&amp;nbsp; The data input is also setup, it was built by the app, I have to give it a name and put the interval to 30 seconds.&lt;/P&gt;&lt;P&gt;Formatting here is not good....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# encoding = utf-8&lt;/P&gt;&lt;P&gt;import os&lt;BR /&gt;import sys&lt;BR /&gt;import time&lt;BR /&gt;import datetime&lt;/P&gt;&lt;P&gt;'''&lt;BR /&gt;IMPORTANT&lt;BR /&gt;Edit only the validate_input and collect_events functions.&lt;BR /&gt;Do not edit any other part in this file.&lt;BR /&gt;This file is generated only once when creating the modular input.&lt;BR /&gt;'''&lt;BR /&gt;'''&lt;BR /&gt;# For advanced users, if you want to create single instance mod input, uncomment this method.&lt;BR /&gt;def use_single_instance_mode():&lt;BR /&gt;return True&lt;BR /&gt;'''&lt;/P&gt;&lt;P&gt;def validate_input(helper, definition):&lt;BR /&gt;"""Implement your own validation logic to validate the input stanza configurations"""&lt;BR /&gt;# This example accesses the modular input variable&lt;BR /&gt;# password = definition.parameters.get('password', None)&lt;BR /&gt;# username = definition.parameters.get('username', None)&lt;BR /&gt;# finesse_ip = definition.parameters.get('finesse_ip', None)&lt;BR /&gt;pass&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def collect_events(helper, ew):&lt;BR /&gt;import requests&lt;BR /&gt;from requests.auth import HTTPBasicAuth&lt;/P&gt;&lt;P&gt;finesse_ip = helper.get_arg('finesse_ip')&lt;BR /&gt;username = helper.get_arg('username')&lt;BR /&gt;password = helper.get_arg('password')&lt;/P&gt;&lt;P&gt;url = f"https://{finesse_ip}/finesse/api/SystemInfo"&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;response = requests.get(url, auth=HTTPBasicAuth(username, password), verify=False)&lt;/P&gt;&lt;P&gt;if response.status_code == 200:&lt;BR /&gt;helper.log_info(f"Successfully retrieved data from {url}")&lt;BR /&gt;else:&lt;BR /&gt;helper.log_error(f"Request failed. Status: {response.status_code}, Body: {response.text}")&lt;/P&gt;&lt;P&gt;event = helper.new_event(&lt;BR /&gt;data=response.text,&lt;BR /&gt;source=helper.get_input_type(),&lt;BR /&gt;index=helper.get_output_index(),&lt;BR /&gt;host="finesse1a",&lt;BR /&gt;sourcetype=helper.get_sourcetype()&lt;BR /&gt;)&lt;BR /&gt;ew.write_event(event)&lt;/P&gt;&lt;P&gt;except Exception as e:&lt;BR /&gt;helper.log_error(f"Error during request to {url}: {str(e)}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Aug 2025 13:50:40 GMT</pubDate>
    <dc:creator>spamarea1</dc:creator>
    <dc:date>2025-08-01T13:50:40Z</dc:date>
    <item>
      <title>Splunk Addon Build shows zero events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750749#M82158</link>
      <description>&lt;P&gt;Addon Builder 4.5.0,&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;Modular input using my&lt;/DIV&gt;&lt;DIV class=""&gt;Python code.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;In this example the collection interval is set for 30 seconds. I added a log to verify it is running here:&amp;nbsp;log_file = "/opt/splunk/etc/apps/TA-api1/logs/vosfin_cli.log"&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;The main page (Configure Data Collection) shows all the 'input names' that I built. But looking at the 'event count', I see a 0.&amp;nbsp; When I go into the log, it shows it running and giving me data ok.&amp;nbsp; Why doesn't the event count up every time the script runs?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Is there addition configuration in inputs, props or web.conf that I need to add/edit to make it count up?&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 15:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750749#M82158</guid>
      <dc:creator>spamarea1</dc:creator>
      <dc:date>2025-07-30T15:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750923#M82166</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310592"&gt;@spamarea1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Would you be able to share the python code to check further why it is not ingesting events? And can you also confirm if ew.write_event(event) has been set properly? Did you also check on the Add-on Builder UI if it is ingesting events when you run the Test button?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 13:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750923#M82166</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2025-08-01T13:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750924#M82167</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/155831"&gt;@tej57&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code, I reused the template that the addon builder app started.&amp;nbsp; The data input is also setup, it was built by the app, I have to give it a name and put the interval to 30 seconds.&lt;/P&gt;&lt;P&gt;Formatting here is not good....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# encoding = utf-8&lt;/P&gt;&lt;P&gt;import os&lt;BR /&gt;import sys&lt;BR /&gt;import time&lt;BR /&gt;import datetime&lt;/P&gt;&lt;P&gt;'''&lt;BR /&gt;IMPORTANT&lt;BR /&gt;Edit only the validate_input and collect_events functions.&lt;BR /&gt;Do not edit any other part in this file.&lt;BR /&gt;This file is generated only once when creating the modular input.&lt;BR /&gt;'''&lt;BR /&gt;'''&lt;BR /&gt;# For advanced users, if you want to create single instance mod input, uncomment this method.&lt;BR /&gt;def use_single_instance_mode():&lt;BR /&gt;return True&lt;BR /&gt;'''&lt;/P&gt;&lt;P&gt;def validate_input(helper, definition):&lt;BR /&gt;"""Implement your own validation logic to validate the input stanza configurations"""&lt;BR /&gt;# This example accesses the modular input variable&lt;BR /&gt;# password = definition.parameters.get('password', None)&lt;BR /&gt;# username = definition.parameters.get('username', None)&lt;BR /&gt;# finesse_ip = definition.parameters.get('finesse_ip', None)&lt;BR /&gt;pass&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def collect_events(helper, ew):&lt;BR /&gt;import requests&lt;BR /&gt;from requests.auth import HTTPBasicAuth&lt;/P&gt;&lt;P&gt;finesse_ip = helper.get_arg('finesse_ip')&lt;BR /&gt;username = helper.get_arg('username')&lt;BR /&gt;password = helper.get_arg('password')&lt;/P&gt;&lt;P&gt;url = f"https://{finesse_ip}/finesse/api/SystemInfo"&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;response = requests.get(url, auth=HTTPBasicAuth(username, password), verify=False)&lt;/P&gt;&lt;P&gt;if response.status_code == 200:&lt;BR /&gt;helper.log_info(f"Successfully retrieved data from {url}")&lt;BR /&gt;else:&lt;BR /&gt;helper.log_error(f"Request failed. Status: {response.status_code}, Body: {response.text}")&lt;/P&gt;&lt;P&gt;event = helper.new_event(&lt;BR /&gt;data=response.text,&lt;BR /&gt;source=helper.get_input_type(),&lt;BR /&gt;index=helper.get_output_index(),&lt;BR /&gt;host="finesse1a",&lt;BR /&gt;sourcetype=helper.get_sourcetype()&lt;BR /&gt;)&lt;BR /&gt;ew.write_event(event)&lt;/P&gt;&lt;P&gt;except Exception as e:&lt;BR /&gt;helper.log_error(f"Error during request to {url}: {str(e)}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 13:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750924#M82167</guid>
      <dc:creator>spamarea1</dc:creator>
      <dc:date>2025-08-01T13:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750925#M82168</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310592"&gt;@spamarea1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Did you run the test button before saving? If the output shows blank white screen, it'll not ingest any data. Also, try to add more loggers to isolate the problem. Also, for once, add a info log of the response.txt itself. So that you can understand what the output should look like.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 14:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750925#M82168</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2025-08-01T14:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750926#M82169</link>
      <description>&lt;P&gt;I did the save and finish buttons.&amp;nbsp; I get output when I hit the test and I see it when I search using the index and sourcetype.&amp;nbsp; The data is even put into dashboard.&amp;nbsp; I just have to run this manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 14:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750926#M82169</guid>
      <dc:creator>spamarea1</dc:creator>
      <dc:date>2025-08-01T14:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750927#M82170</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310592"&gt;@spamarea1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;So, where do you see 0 events? On the sourcetype-extraction page of the Add-on Builder? Can you please share a screenshot of it?&lt;/P&gt;&lt;P&gt;I assume it is because of the nature of the data flow set up. Your Add-on Builder would be present on one of the Enterprise Servers and the data would be ingested into different server on which Indexer is residing. So, whenever the input runs, it collects the data and sends it to the indexer server.&lt;/P&gt;&lt;P&gt;If the indexing happens locally, you would be able to see the events on the Add-on Builder page. Let me know if what I'm understanding is incorrect and screenshot would be better to troubleshoot further.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;If the above solution helps, an upvote is appreciated..!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 14:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750927#M82170</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2025-08-01T14:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750946#M82171</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="addonbuilder-0-events.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/39825iB3240D2751CD97E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="addonbuilder-0-events.png" alt="addonbuilder-0-events.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get here I click apps &amp;gt; addon builder &amp;gt; add on list &amp;gt; data inputs.&amp;nbsp; Then the list of scripts that I built are listed. If I hit edit, it goes through the entire configuration again, if I click on code, it goes to the script. All scripts run when I hit test and can be found via a search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Aug 2025 13:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750946#M82171</guid>
      <dc:creator>spamarea1</dc:creator>
      <dc:date>2025-08-02T13:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Addon Build shows zero events - event section of code</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750973#M82180</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310592"&gt;@spamarea1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;If the server on which you are building the TA is not indexing locally, it will show 0 events only. If the server is acting as an indexer or is indexing locally, then only it'll show the events count. Hence, if you want to search the data, you'll have to log on to Search Head and search against the index to view the events.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you were still not able to understand the concept.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Tejas.&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;If the above solution helps, an upvote is appreciated..!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 08:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Addon-Build-shows-zero-events/m-p/750973#M82180</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2025-08-04T08:04:19Z</dc:date>
    </item>
  </channel>
</rss>

