<?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: Stats command error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666015#M228485</link>
    <description>&lt;P&gt;Please share your full search as the advice already given seems to fix the apparent errors in your example.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 14:59:09 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-10-24T14:59:09Z</dc:date>
    <item>
      <title>Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660846#M228155</link>
      <description>&lt;P&gt;index=abcd | stats count(eval(searchmatch(''&lt;A href="https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X" target="_blank" rel="noopener"&gt;https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X&lt;/A&gt;'))) as ''&lt;A href="https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X" target="_blank" rel="noopener"&gt;https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X&lt;/A&gt;'&amp;nbsp; OR&amp;nbsp;count(eval(searchmatch('value2')))&amp;nbsp; as 'value2'&lt;/P&gt;&lt;P&gt;I'm getting this error:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;Error in 'stats' command: The argument '''&lt;A href="https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X" target="_blank" rel="noopener"&gt;https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X&lt;/A&gt;'' is invalid.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;this works fine with many other URLs and ips, is there any special character that is not allowed with stats?&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:08:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660846#M228155</guid>
      <dc:creator>yasit</dc:creator>
      <dc:date>2023-10-16T11:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660886#M228175</link>
      <description>&lt;P&gt;The equal sign might be causing issues, escape them with backward slash. Also, the OR keyword between two stats fields is invalid, remove it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abcd | stats count(eval(searchmatch("https://drive.google.com/uc?export\=download&amp;amp;id\=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X"))) as "https://drive.google.com/uc?export=download&amp;amp;id=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X"   count(eval(searchmatch("value2")))  as "value2"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 Oct 2023 15:33:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660886#M228175</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2023-10-16T15:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660889#M228176</link>
      <description>&lt;P&gt;The string following "AS" should be a valid field name or a partial field name with a wildcard.&amp;nbsp; You can rename the field to something more verbose later in the query using &lt;FONT face="courier new,courier"&gt;rename&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 15:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/660889#M228176</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-16T15:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/665971#M228474</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;still the stats command is raising the error while escaping the with \&lt;BR /&gt;error:&amp;nbsp;&lt;SPAN&gt;The argument ''The argument ''&lt;A href="https://abc.......?export\" target="_blank"&gt;https://abc.......?export\&lt;/A&gt;=download&amp;amp;id\=1HGFF5ziAFGn8161CKQC$Xyuhni9PNK_X'' is invalid."is invalid.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:55:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/665971#M228474</guid>
      <dc:creator>yasit</dc:creator>
      <dc:date>2023-10-24T07:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666008#M228482</link>
      <description>&lt;P&gt;Your quotes before the http appear to be two SINGLE quotes rather than a double quote. Once you fix that you get a different error about dynamic fields and it looks like it doesn't like the $ sign in the searchmatch string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 14:17:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666008#M228482</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-10-24T14:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666011#M228483</link>
      <description>&lt;P&gt;what can be the solution here as I'm creating this query dynamically with format and giving as an input to base query.&amp;nbsp;&lt;BR /&gt;how can i escape these special charachters&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 14:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666011#M228483</guid>
      <dc:creator>yasit</dc:creator>
      <dc:date>2023-10-24T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Stats command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666015#M228485</link>
      <description>&lt;P&gt;Please share your full search as the advice already given seems to fix the apparent errors in your example.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 14:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-command-error/m-p/666015#M228485</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-24T14:59:09Z</dc:date>
    </item>
  </channel>
</rss>

