<?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: EVAL issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167693#M47755</link>
    <description>&lt;P&gt;Is the &lt;CODE&gt;QR&lt;/CODE&gt; field being crated for sure?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fields QR
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Jun 2015 14:38:36 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-06-19T14:38:36Z</dc:date>
    <item>
      <title>EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167685#M47747</link>
      <description>&lt;P&gt;I've extracted a field called QR from a sourcetype, and it's working perfectly, but is returning numerical data, and I need specific words for a Enterprise Security dashboard to work. When I type the following eval command into the search bar it works perfectly, but when I place it in props.conf it doesn't execute correctly (new field is not created):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype = MSAD:NT6:DNS | eval message_type = if(QR==0, "RESPONSE", "QUERY")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm wondering if I'm running into an order of precedence issue, where my EVAL is kicking off before a QR field is even created.&lt;BR /&gt;
I have the following in my transforms and props files.&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[MSAD:NT6:DNS]
[dns_qr_extraction]
REGEX = (QR)\s+(\d)
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[MSAD:NT6:DNS]
REPORT-dns_qr_extraction = dns_qr_extraction
EVAL message_type = if(QR==0, "RESPONSE", QR==1, "QUERY", "UNKNOWN")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167685#M47747</guid>
      <dc:creator>jsmith39</dc:creator>
      <dc:date>2015-06-19T13:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167686#M47748</link>
      <description>&lt;P&gt;You are missing a hyphen, try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-message_type = if(QR==0, "RESPONSE", QR==1, "QUERY", "UNKNOWN)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This mistake should have caused Splunk to give you an error every time you restart Splunk (which you probably did) so be sure to pay attention to the output &lt;EM&gt;EVERY&lt;/EM&gt; time you restart Splunk!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167686#M47748</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167687#M47749</link>
      <description>&lt;P&gt;That was a format issue when I was typing into answers.splunk.com, thanks for replying though appreciate the thought.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167687#M47749</guid>
      <dc:creator>jsmith39</dc:creator>
      <dc:date>2015-06-19T13:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167688#M47750</link>
      <description>&lt;P&gt;You also have a mismatch in your &lt;CODE&gt;props.conf&lt;/CODE&gt; stanza header: &lt;CODE&gt;[dns_qr_lookup_action]&lt;/CODE&gt; should be &lt;CODE&gt;[dns_qr_extraction]&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167688#M47750</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T13:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167689#M47751</link>
      <description>&lt;P&gt;Again, just being clumsy when putting my question on this website, in my server files, everything is typed correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 13:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167689#M47751</guid>
      <dc:creator>jsmith39</dc:creator>
      <dc:date>2015-06-19T13:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167690#M47752</link>
      <description>&lt;P&gt;You do see that I changed &lt;CODE&gt;EVAL message_type&lt;/CODE&gt; to &lt;CODE&gt;EVAL-message_type&lt;/CODE&gt;, right?  I ask because you fixed your question (which I reformatted for clarity) for the other "wrong" answer but not for this one.  Is perhaps this the actual problem?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167690#M47752</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167691#M47753</link>
      <description>&lt;P&gt;Thank you, you're right, I did miss turning EVAL message_type into EVAL-message_type.&lt;BR /&gt;
Unfortunately this still isn't having the desired effect of creating a message_type field.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:19:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167691#M47753</guid>
      <dc:creator>jsmith39</dc:creator>
      <dc:date>2020-09-28T20:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167692#M47754</link>
      <description>&lt;P&gt;You also do not need &lt;CODE&gt;[MSAD:NT6:DNS]&lt;/CODE&gt; in &lt;CODE&gt;transforms.conf&lt;/CODE&gt; so remove that.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167692#M47754</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167693#M47755</link>
      <description>&lt;P&gt;Is the &lt;CODE&gt;QR&lt;/CODE&gt; field being crated for sure?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fields QR
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jun 2015 14:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-issue/m-p/167693#M47755</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-19T14:38:36Z</dc:date>
    </item>
  </channel>
</rss>

