<?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: assign the value to another variable and set an alert in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576207#M200807</link>
    <description>&lt;P&gt;It works great.&lt;BR /&gt;Thank you for your help.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 15:28:58 GMT</pubDate>
    <dc:creator>ycho1</dc:creator>
    <dc:date>2021-11-24T15:28:58Z</dc:date>
    <item>
      <title>assign the value to another variable and set an alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576089#M200762</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I would like to ask a question on how to assign the value to another variable and set an alert.&lt;BR /&gt;I have a this data output from Splunk.&lt;/P&gt;&lt;P&gt;I would like to assign the value to another variables and set an alert when the value become(s) is greater than a threshold like 10 or 20.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;for example&lt;BR /&gt;when TX_UPS value &amp;gt;= 10, then I send an alert.&lt;/P&gt;&lt;P&gt;how should I approach this in Splunk Alert job?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;shipper count&lt;BR /&gt;TX_UPS 10&lt;BR /&gt;TX_USPS 15&lt;BR /&gt;TX_FedEx 5&lt;BR /&gt;CO_UPS 5&lt;BR /&gt;CO_USPS 9&lt;BR /&gt;CO_FedEx 2&lt;BR /&gt;MO_UPS 5&lt;BR /&gt;MO_USPS 20&lt;BR /&gt;MO_FedEx 3&lt;BR /&gt;GA_UPS 15&lt;BR /&gt;GA_USPS 10&lt;BR /&gt;GA_FedEx 5&lt;BR /&gt;PA_UPS 9&lt;BR /&gt;PA_USPS 21&lt;BR /&gt;PA_FedEx 8&lt;BR /&gt;NY_UPS 30&lt;BR /&gt;NY_USPS 99&lt;BR /&gt;NY_FedEx 20&lt;/P&gt;&lt;P&gt;index=main AND "*TRACKING*"&lt;BR /&gt;| stats count by shipper&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 21:11:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576089#M200762</guid>
      <dc:creator>ycho1</dc:creator>
      <dc:date>2021-11-23T21:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: assign the value to another variable and set an alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576099#M200767</link>
      <description>&lt;P&gt;This seems pretty straightforward so I must be missing something.&amp;nbsp; This query will trigger an alert if any shipper has a count greater than 10, provided the alert is set to trigger when there are more than zero results.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main AND "*TRACKING*"
| stats count by shipper
| where count &amp;gt; 10&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 23 Nov 2021 22:02:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576099#M200767</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-23T22:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: assign the value to another variable and set an alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576100#M200768</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;SPAN&gt;richgalloway for your input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However,&amp;nbsp;&lt;/SPAN&gt;I need to know the shipper name that becomes above the threshold.&lt;/P&gt;&lt;P&gt;since there a multiple shippers, I need to specify which shipper has greater than the threshold.&lt;BR /&gt;your solution "where count &amp;gt; 10" doesn't tell me which shipper name though.&lt;BR /&gt;My guess would be I need to assign each shipper value&lt;BR /&gt;for example:&lt;BR /&gt;&lt;BR /&gt;| eval TX_UPS_VAL = (count AND where shipper = TX_UPS)&lt;BR /&gt;does it make sense?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 22:13:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576100#M200768</guid>
      <dc:creator>ycho1</dc:creator>
      <dc:date>2021-11-23T22:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: assign the value to another variable and set an alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576184#M200793</link>
      <description>&lt;P&gt;Did you TRY the query?&lt;/P&gt;&lt;P&gt;The command &lt;FONT face="courier new,courier"&gt;| stats count by &lt;STRONG&gt;shipper&lt;/STRONG&gt;&lt;/FONT&gt; does indeed specify the shipper name.&lt;/P&gt;&lt;P&gt;The command &lt;FONT face="courier new,courier"&gt;| where count &amp;gt; 10&lt;/FONT&gt; merely removes those results with a count less than or equal to ten.&lt;/P&gt;&lt;P&gt;You should end up with something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;shipper count
TX_USPS 15
MO_USPS 20
GA_UPS 15
PA_USPS 21
NY_UPS 30
NY_USPS 99
NY_FedEx 20&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 13:57:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576184#M200793</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-24T13:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: assign the value to another variable and set an alert</title>
      <link>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576207#M200807</link>
      <description>&lt;P&gt;It works great.&lt;BR /&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 15:28:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/assign-the-value-to-another-variable-and-set-an-alert/m-p/576207#M200807</guid>
      <dc:creator>ycho1</dc:creator>
      <dc:date>2021-11-24T15:28:58Z</dc:date>
    </item>
  </channel>
</rss>

