<?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: Are there limitations on using the searchmatch() eval function in props.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Are-there-limitations-on-using-the-searchmatch-eval-function-in/m-p/407524#M72265</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval aaa=case(
    action=="opened","success",
    action=="closed","success",
    action=="succeeded","success",
    action=="failed","failure",
    action=="Accepted","success",
    action=="Invalid","failure",
    match(_raw, "(?i)error trying to bind as user"),"failure",
    action=="new user","created",
    action=="new group","created",
    action=="add" AND app=="usermod","modified",
    action=="removed" AND app="gpasswd","modified",
    app=="usermodd" AND action=="change","modified",
    app=="usermod" AND action=="lock","modified",
    match(_raw, "(?i)setting system clock"),"success",
    action=="clock_sync","success",
    app=="chage" and action=="changed","modified",
    app=="aide" AND action="created","added",
    app=="aide" AND action=="changed","modified",
    app=="aide" AND action=="removed","deleted",
    app=="ip route" AND action=="add","added",
    match(_raw, "(?i)changed password expiry"),"modified",
    match(_raw, "(?i)ip route add"),"added",
    match(_raw, "(?i)ip route del"),"deleted",
    match(_raw, "(?i)ip route replace"),"modified",
    useradd_action=="new user" OR useradd_action=="new group","added",
    action=="Up" OR action=="up","modified",
    action=="Down" OR action=="down","modified")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 03 Mar 2019 07:04:01 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-03-03T07:04:01Z</dc:date>
    <item>
      <title>Are there limitations on using the searchmatch() eval function in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Are-there-limitations-on-using-the-searchmatch-eval-function-in/m-p/407523#M72264</link>
      <description>&lt;P&gt;I have the following eval statement:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval aaa=case(
    action=="opened","success",
    action=="closed","success",
    action=="succeeded","success",
    action=="failed","failure",
    action=="Accepted","success",
    action=="Invalid","failure",
    searchmatch("error trying to bind as user"),"failure",
    action=="new user","created",
    action=="new group","created",
    action=="add" AND app=="usermod","modified",
    action=="removed" AND app="gpasswd","modified",
    app=="usermodd" AND action=="change","modified",
    app=="usermod" AND action=="lock","modified",
    searchmatch("setting system clock"),"success",
    action=="clock_sync","success",
    app=="chage" and action=="changed","modified",
    app=="aide" AND action="created","added",
    app=="aide" AND action=="changed","modified",
    app=="aide" AND action=="removed","deleted",
    app=="ip route" AND action=="add","added",
    searchmatch("changed password expiry"),"modified",
    searchmatch("ip route add"),"added",
    searchmatch("ip route del"),"deleted",
    searchmatch("ip route replace"),"modified",
    useradd_action=="new user" OR useradd_action=="new group","added",
    action=="Up" OR action=="up","modified",
    action=="Down" OR action=="down","modified")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I use that statement in the search pipeline, it works.  If I define it in an &lt;CODE&gt;EVAL-&lt;/CODE&gt; statement in &lt;CODE&gt;props.conf&lt;/CODE&gt;, it breaks completely.  If I remove the &lt;CODE&gt;searchmatch()&lt;/CODE&gt; statements, it works.&lt;/P&gt;

&lt;P&gt;Is &lt;CODE&gt;searchmatch()&lt;/CODE&gt; not supported in &lt;CODE&gt;props.conf&lt;/CODE&gt;?  If not, is there a workaround?  I tried things like:  &lt;CODE&gt;_raw=="*my text*"&lt;/CODE&gt; and that didn't work either.  &lt;/P&gt;

&lt;P&gt;I understand &lt;CODE&gt;searchmatch()&lt;/CODE&gt; is an alias for the &lt;CODE&gt;match()&lt;/CODE&gt; statement.  I tried using &lt;CODE&gt;match()&lt;/CODE&gt; as well and that doesn't work either.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 18:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Are-there-limitations-on-using-the-searchmatch-eval-function-in/m-p/407523#M72264</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2019-02-25T18:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Are there limitations on using the searchmatch() eval function in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Are-there-limitations-on-using-the-searchmatch-eval-function-in/m-p/407524#M72265</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval aaa=case(
    action=="opened","success",
    action=="closed","success",
    action=="succeeded","success",
    action=="failed","failure",
    action=="Accepted","success",
    action=="Invalid","failure",
    match(_raw, "(?i)error trying to bind as user"),"failure",
    action=="new user","created",
    action=="new group","created",
    action=="add" AND app=="usermod","modified",
    action=="removed" AND app="gpasswd","modified",
    app=="usermodd" AND action=="change","modified",
    app=="usermod" AND action=="lock","modified",
    match(_raw, "(?i)setting system clock"),"success",
    action=="clock_sync","success",
    app=="chage" and action=="changed","modified",
    app=="aide" AND action="created","added",
    app=="aide" AND action=="changed","modified",
    app=="aide" AND action=="removed","deleted",
    app=="ip route" AND action=="add","added",
    match(_raw, "(?i)changed password expiry"),"modified",
    match(_raw, "(?i)ip route add"),"added",
    match(_raw, "(?i)ip route del"),"deleted",
    match(_raw, "(?i)ip route replace"),"modified",
    useradd_action=="new user" OR useradd_action=="new group","added",
    action=="Up" OR action=="up","modified",
    action=="Down" OR action=="down","modified")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Mar 2019 07:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Are-there-limitations-on-using-the-searchmatch-eval-function-in/m-p/407524#M72265</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-03-03T07:04:01Z</dc:date>
    </item>
  </channel>
</rss>

