<?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 Running a script via a button call in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708548#M117037</link>
    <description>&lt;P&gt;Is it possible to execute a script through a button click and display the script's output on a Splunk dashboard? Has anyone implemented something similar before? Any guidance would be greatly appreciated, as I am currently stuck on this. Thank you!&lt;/P&gt;</description>
    <pubDate>Sun, 12 Jan 2025 15:02:19 GMT</pubDate>
    <dc:creator>rohithvr19</dc:creator>
    <dc:date>2025-01-12T15:02:19Z</dc:date>
    <item>
      <title>Running a script via a button call</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708548#M117037</link>
      <description>&lt;P&gt;Is it possible to execute a script through a button click and display the script's output on a Splunk dashboard? Has anyone implemented something similar before? Any guidance would be greatly appreciated, as I am currently stuck on this. Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2025 15:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708548#M117037</guid>
      <dc:creator>rohithvr19</dc:creator>
      <dc:date>2025-01-12T15:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script via a button call</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708552#M117040</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/275198"&gt;@rohithvr19&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check my answer below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-call-a-Python-script-from-a-dashboard-and-output-its/m-p/398088" target="_blank"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-call-a-Python-script-from-a-dashboard-and-output-its/m-p/398088&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;An upvote would be appreciated if any of my replies help you solve the problem or gain knowledge.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2025 15:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708552#M117040</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2025-01-12T15:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script via a button call</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708553#M117041</link>
      <description>&lt;P&gt;Hi bud,&lt;BR /&gt;&lt;BR /&gt;Have you tried creating a &amp;lt;p&amp;gt; on the dashboard and telling the script to display it?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1" script="my_js.js"&amp;gt;
&amp;lt;label&amp;gt;My JS Output&amp;lt;/label&amp;gt;
&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;input type="button" value="Submit" id="submitButton" /&amp;gt;
&amp;lt;h1&amp;gt;This is my output&amp;lt;h1&amp;gt;
&amp;lt;p id="my_script_output"&amp;gt;&amp;lt;/p
&amp;lt;/html&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Then your js:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;document.getElementById("submitButton").addEventListener("click", output);
function(output() {
let script_output = "This is my Output."
document.getElementById("my_script_output").innerHTML = script_output;
}&lt;/LI-CODE&gt;&lt;P&gt;Does depend on how complex you want it to be...&lt;/P&gt;&lt;P&gt;Let me know how you get on with this &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2025 15:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708553#M117041</guid>
      <dc:creator>oO0NeoN0Oo</dc:creator>
      <dc:date>2025-01-12T15:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script via a button call</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708576#M117049</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/275198"&gt;@rohithvr19&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said in my answer to yourp revious question it's possible, but think to your requirements, because the performance of a script button will be very very low and the better approach isn't the script execution with a button, but a near real time scheduled search, as described in&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Export-Logs-from-Zabbix-to-Splunk-Dashboard-via-API-on-Button/m-p/708529#M239598" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Export-Logs-from-Zabbix-to-Splunk-Dashboard-via-API-on-Button/m-p/708529#M239598&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 07:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708576#M117049</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-01-13T07:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Running a script via a button call</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708590#M117062</link>
      <description>&lt;P&gt;1. You're posting this one in a "Getting data in" section with "HEC" and "scripted input" labels. Are you sure it's really about getting data into your Splunk?&lt;/P&gt;&lt;P&gt;2. What kind of script are you talking about? A JS code in your browser? A script on the Search Head? Something else?&lt;/P&gt;&lt;P&gt;3. Are you aware of the security implications?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 10:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Running-a-script-via-a-button-call/m-p/708590#M117062</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-01-13T10:00:09Z</dc:date>
    </item>
  </channel>
</rss>

