<?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 Sendemail using Python SDK in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Sendemail-using-Python-SDK/m-p/403798#M6937</link>
    <description>&lt;P&gt;I am trying to run the following search using Splunk python sdk. It returns the results but does not send the EMAIL as it does if i run the same search using the Splunk UI.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;searchquery_normal = 'search * earliest="8/26/2013:23:40:00"  latest="8/26/2013:23:55:00" index=os  host=* sourcetype=cpu | lookup chipot fqdn as host | search application_name="New App*" AND physical_environment_name="Production*" AND state="LIVE"| multikv fields pctUser,pctSystem,pctIowait,pctIdle,application_name | search all |eval cpu=100-pctIdle|stats avg(cpu) by host,application_name|rename avg(cpu) as cpualert|where cpualert &amp;gt;20|sort "application_name"|sendemail to="myemailid@domain.com" format=html subject=ALERT_CPU_sentfromPython  sendresults=true'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 27 Aug 2013 18:32:07 GMT</pubDate>
    <dc:creator>sunilsk1</dc:creator>
    <dc:date>2013-08-27T18:32:07Z</dc:date>
    <item>
      <title>Sendemail using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Sendemail-using-Python-SDK/m-p/403798#M6937</link>
      <description>&lt;P&gt;I am trying to run the following search using Splunk python sdk. It returns the results but does not send the EMAIL as it does if i run the same search using the Splunk UI.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;searchquery_normal = 'search * earliest="8/26/2013:23:40:00"  latest="8/26/2013:23:55:00" index=os  host=* sourcetype=cpu | lookup chipot fqdn as host | search application_name="New App*" AND physical_environment_name="Production*" AND state="LIVE"| multikv fields pctUser,pctSystem,pctIowait,pctIdle,application_name | search all |eval cpu=100-pctIdle|stats avg(cpu) by host,application_name|rename avg(cpu) as cpualert|where cpualert &amp;gt;20|sort "application_name"|sendemail to="myemailid@domain.com" format=html subject=ALERT_CPU_sentfromPython  sendresults=true'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2013 18:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Sendemail-using-Python-SDK/m-p/403798#M6937</guid>
      <dc:creator>sunilsk1</dc:creator>
      <dc:date>2013-08-27T18:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sendemail using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Sendemail-using-Python-SDK/m-p/403799#M6938</link>
      <description>&lt;P&gt;What app context are you executing the search with in both scenarios?  Alert_actions.conf can be app specific so that one app uses one mail server and settings yet another app can use a different mail server and settings.&lt;/P&gt;

&lt;P&gt;So if you have your email configured via alert_actions in yourAppName but you’re executing search from servicesNS/-/-  or etc... this could be the cause for the descrepancy.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 01:37:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Sendemail-using-Python-SDK/m-p/403799#M6938</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-11-27T01:37:10Z</dc:date>
    </item>
  </channel>
</rss>

