<?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 Add-on Builder: When editing the script, how can I go about logging specific things to Splunk that can be searched for? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274108#M31921</link>
    <description>&lt;P&gt;Found my own answer looking right at me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
      helper.addevent("hello", sourcetype="sample_sourcetype")&lt;BR /&gt;
        helper.addevent("world", sourcetype="sample_sourcetype")&lt;BR /&gt;
        helper.writeevents(index="summary", host="localhost", source="localhost")&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:42:33 GMT</pubDate>
    <dc:creator>larryleeroberts</dc:creator>
    <dc:date>2020-09-29T12:42:33Z</dc:date>
    <item>
      <title>Splunk Add-on Builder: When editing the script, how can I go about logging specific things to Splunk that can be searched for?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274107#M31920</link>
      <description>&lt;P&gt;I am working on the Splunk Add-On Builder and so far really liking it. It's making me learn Python &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
I do have one question though that I can not seem to find an answer too. When I am editing the script in the Add-On Builder, how can I go about logging specific things to Splunk that can be searched for?&lt;/P&gt;

&lt;P&gt;For example, I am building a customized alert. When used, I would like to log to Splunk something like...&lt;BR /&gt;
"Splunk alert for  was triggered on "&lt;/P&gt;

&lt;P&gt;I would also like to specify the source.&lt;/P&gt;

&lt;P&gt;I can not seem to find any example of this. Can anyone provide a code example?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274107#M31920</guid>
      <dc:creator>larryleeroberts</dc:creator>
      <dc:date>2017-02-02T15:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder: When editing the script, how can I go about logging specific things to Splunk that can be searched for?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274108#M31921</link>
      <description>&lt;P&gt;Found my own answer looking right at me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
      helper.addevent("hello", sourcetype="sample_sourcetype")&lt;BR /&gt;
        helper.addevent("world", sourcetype="sample_sourcetype")&lt;BR /&gt;
        helper.writeevents(index="summary", host="localhost", source="localhost")&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274108#M31921</guid>
      <dc:creator>larryleeroberts</dc:creator>
      <dc:date>2020-09-29T12:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder: When editing the script, how can I go about logging specific things to Splunk that can be searched for?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274109#M31922</link>
      <description>&lt;P&gt;The above helper functions are to index the data. &lt;BR /&gt;
If you want your alert action to log info to internal logs, you can use&lt;BR /&gt;
helper.log_info("my info message")&lt;BR /&gt;
helper.log_error("my error message")&lt;BR /&gt;
There are example of helper.log_info in commented area that you can leverage&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:39:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274109#M31922</guid>
      <dc:creator>ehaddad_splunk</dc:creator>
      <dc:date>2020-09-29T12:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on Builder: When editing the script, how can I go about logging specific things to Splunk that can be searched for?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274110#M31923</link>
      <description>&lt;P&gt;Thanks!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 13:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-Builder-When-editing-the-script-how-can-I-go-about/m-p/274110#M31923</guid>
      <dc:creator>larryleeroberts</dc:creator>
      <dc:date>2017-02-03T13:59:00Z</dc:date>
    </item>
  </channel>
</rss>

