<?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: snowincident command not working, its not getting detected as search/spl command in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498490#M61337</link>
    <description>&lt;P&gt;Use the &lt;A href="https://docs.splunk.com/Documentation/AddOns/released/ServiceNow/Usestreamingcommands"&gt;snowincdentstream&lt;/A&gt; command instead.&lt;/P&gt;

&lt;P&gt;Convert the &lt;CODE&gt;--account "ServiceNow Dev" --category "Hardware" --correlation_id timestamp.":".hostname --impact 1 --state 1 --contact_type "Email" --short_description "Nishad - Splunk Created - CPU utilization is".PercentCPULoad." on ".hostname." Threshold - 90 &amp;lt;= ".PercentCPULoad." &amp;lt;=100" --assignment_group "Tools Testing Group" ci_identifier=hostname&lt;/CODE&gt; part of your search to eval statements and then add &lt;CODE&gt;| snowincdentstream&lt;/CODE&gt; at the end.&lt;/P&gt;

&lt;P&gt;Example from above documentation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The following example search creates an incident when CPU usage is 95 or higher.

sourcetype="CPURates" earliest=-5m latest=now 
| stats avg(CPU) as CPU last(_time) as time by host 
| where CPU&amp;gt;=95 | eval contact_type="email" 
| eval ci_identifier=host | eval priority="1" 
| eval category="Software" | eval subcategory="database" 
| eval short_description="CPU on ". host ." is at ". CPU 
| eval account="user1"
| snowincidentstream
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 02 Feb 2020 16:12:40 GMT</pubDate>
    <dc:creator>spayneort</dc:creator>
    <dc:date>2020-02-02T16:12:40Z</dc:date>
    <item>
      <title>snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498488#M61335</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have installed Service Now Add on App, my service now administrator has followed all the steps needed from the Service now side.&lt;BR /&gt;
Using the alert action with ServiceNow incident integration works fine and creates incidents in service now. However, we have limited fields that we can define in the ServiceNow alert action like we cannot define field IMPACT and Servicenow auto assigns the impact. &lt;/P&gt;

&lt;H1&gt;So I wanted to use a custom generating command that gives me flexibility to generate the SeviceNow incident with additional fields as parameters. Here is my search (My alert condition if servers exceed &amp;gt; 90% cpu) raise ServiceNow incident &lt;/H1&gt;

&lt;P&gt;index=os host=* sourcetype=cpu cpu=all NOT( &lt;BR /&gt;
    [| inputlookup servers.csv &lt;BR /&gt;
    | where status="decom" OR status="complete blacklist" OR status="DC Outage" &lt;BR /&gt;
    | rename target as host &lt;BR /&gt;
    | table host]) &lt;BR /&gt;
| eval PercentCPULoad = 100 - pctIdle &lt;BR /&gt;
| stats min(PercentCPULoad) as PercentCPULoad by host &lt;BR /&gt;
| eval hostname=upper(mvindex(split(host,"."),0)) &lt;BR /&gt;
| where PercentCPULoad &amp;gt;= 90 &lt;BR /&gt;
| eval timestamp=strftime(now(),"%Y-%m-%d %H:%M:%S") &lt;BR /&gt;
| eval Impact = 1 &lt;BR /&gt;
| &lt;STRONG&gt;snowincident&lt;/STRONG&gt; --account "ServiceNow Dev" --category "Hardware" --correlation_id timestamp.":".hostname --impact 1 --state 1 --contact_type "Email" --short_description "Nishad - Splunk Created - CPU utilization is".PercentCPULoad." on ".hostname." Threshold - 90 &amp;lt;= ".PercentCPULoad." &amp;lt;=100" --assignment_group "Tools Testing Group" ci_identifier=hostname&lt;/P&gt;

&lt;P&gt;However, this doesn't work and I get below error message.&lt;BR /&gt;
*&lt;EM&gt;Error in 'snowincident' command: This command must be the first command of a search. *&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;As per Splunk documentation, there certain steps that we need to carry on the ServiceNow server to integrate with Splunk, my SNOW administrator confirmed that he has followed all the steps as per the below documentation.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/AddOns/released/ServiceNow/ConfigureServiceNowtointegratewithSplunkEnterprise" target="_blank"&gt;https://docs.splunk.com/Documentation/AddOns/released/ServiceNow/ConfigureServiceNowtointegratewithSplunkEnterprise&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Can you please suggest what is missing, for searching I am using the SNOW_TA app the command 'snowincident' is not detected.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498488#M61335</guid>
      <dc:creator>nishad_tupe</dc:creator>
      <dc:date>2020-09-30T03:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498489#M61336</link>
      <description>&lt;P&gt;try workflow&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.1/Knowledge/CreateworkflowactionsinSplunkWeb"&gt;workflow&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 22:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498489#M61336</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-30T22:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498490#M61337</link>
      <description>&lt;P&gt;Use the &lt;A href="https://docs.splunk.com/Documentation/AddOns/released/ServiceNow/Usestreamingcommands"&gt;snowincdentstream&lt;/A&gt; command instead.&lt;/P&gt;

&lt;P&gt;Convert the &lt;CODE&gt;--account "ServiceNow Dev" --category "Hardware" --correlation_id timestamp.":".hostname --impact 1 --state 1 --contact_type "Email" --short_description "Nishad - Splunk Created - CPU utilization is".PercentCPULoad." on ".hostname." Threshold - 90 &amp;lt;= ".PercentCPULoad." &amp;lt;=100" --assignment_group "Tools Testing Group" ci_identifier=hostname&lt;/CODE&gt; part of your search to eval statements and then add &lt;CODE&gt;| snowincdentstream&lt;/CODE&gt; at the end.&lt;/P&gt;

&lt;P&gt;Example from above documentation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The following example search creates an incident when CPU usage is 95 or higher.

sourcetype="CPURates" earliest=-5m latest=now 
| stats avg(CPU) as CPU last(_time) as time by host 
| where CPU&amp;gt;=95 | eval contact_type="email" 
| eval ci_identifier=host | eval priority="1" 
| eval category="Software" | eval subcategory="database" 
| eval short_description="CPU on ". host ." is at ". CPU 
| eval account="user1"
| snowincidentstream
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Feb 2020 16:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498490#M61337</guid>
      <dc:creator>spayneort</dc:creator>
      <dc:date>2020-02-02T16:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498491#M61338</link>
      <description>&lt;P&gt;Hello, thanks Spayneort - &lt;BR /&gt;
Yes, I tried this and it works as expected. Though there is one glitch at least from the ServiceNow implementation side.&lt;BR /&gt;
I cannot pass certain arguments for e.g. description -&amp;gt; that maps the ServiceNow description field.&lt;BR /&gt;
ServiceNow TA App Python files come with default parameters and unfortunately not all fields are available. &lt;BR /&gt;
For e.g., I want to pass the description even if Eval - it doesn't get mapped to the description field in service now because incident_base.py is missing that field any idea how can we pass more custom fields. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 20:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498491#M61338</guid>
      <dc:creator>nishad_tupe</dc:creator>
      <dc:date>2020-02-03T20:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498492#M61339</link>
      <description>&lt;P&gt;The workflow works for incident data you are bringing from the service now database, where you can have drill down on specific search/report/dashboard and it will open up the ServiceNow incident for details.&lt;BR /&gt;
Hope this helps. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 20:47:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498492#M61339</guid>
      <dc:creator>nishad_tupe</dc:creator>
      <dc:date>2020-02-03T20:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498493#M61340</link>
      <description>&lt;P&gt;See &lt;A href="https://answers.splunk.com/answers/736869"&gt;https://answers.splunk.com/answers/736869&lt;/A&gt; for instructions on adding additional fields. &lt;/P&gt;

&lt;P&gt;There is also &lt;A href="https://splunkbase.splunk.com/app/4811/"&gt;https://splunkbase.splunk.com/app/4811/&lt;/A&gt;. This app does not require the integration to be set up on the ServiceNow side and allows more fields to be used by default.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 21:13:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498493#M61340</guid>
      <dc:creator>spayneort</dc:creator>
      <dc:date>2020-02-03T21:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: snowincident command not working, its not getting detected as search/spl command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498494#M61341</link>
      <description>&lt;P&gt;Thank you once again, indeed this is a great help. As per the post, &lt;A href="https://answers.splunk.com/answers/736869"&gt;https://answers.splunk.com/answers/736869&lt;/A&gt;, I am not interested in UI so following the first two steps will give me the required fields right, I don't want to have changes in the HTML since I am not using UI based alert action. &lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 21:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/snowincident-command-not-working-its-not-getting-detected-as/m-p/498494#M61341</guid>
      <dc:creator>nishad_tupe</dc:creator>
      <dc:date>2020-02-03T21:54:13Z</dc:date>
    </item>
  </channel>
</rss>

