<?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>question Re: Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187249#M75915</link>
    <description>&lt;P&gt;Did my answer help?  If so, please mark it so.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2018 03:51:54 GMT</pubDate>
    <dc:creator>nallen</dc:creator>
    <dc:date>2018-03-22T03:51:54Z</dc:date>
    <item>
      <title>Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187246#M75912</link>
      <description>&lt;P&gt;I am trying implement POC with usecase as below&lt;/P&gt;&lt;P&gt;I have windows log data being loaded to Indexing topic. I want to define a profiler which checks for failed logons in 15 minutes time frame and generate alerts in metron UI when failed logons count goes beyond threshold level.&lt;/P&gt;&lt;P&gt;For that I just started trying to define logon failed count profiler as below&lt;/P&gt;&lt;PRE&gt;{
	"profiles": [
	{
		"profile": "demo_iplogon_failed",
		"foreach": "ip_address",
		"onlyif": "source.type == 'demo_windowsnxlog' and event_id == 4625",
		"init": {
			"count": "0"
		},
		"update": {
			"count": "count + 1"
		},
		"result": {
			"triage": {
				"logon_failed_count": "count"
			}
		}
	}
	]
}
&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;But when I try to run the profiler, it is giving me an exception as below&lt;/P&gt;&lt;PRE&gt;[!] Assignment expression failed
java.lang.IllegalArgumentException: Assignment expression failed
        at org.apache.metron.stellar.common.shell.StellarResult.error(StellarResult.java:115)
        at org.apache.metron.stellar.common.shell.specials.AssignmentCommand.execute(AssignmentCommand.java:82)
        at org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor.execute(DefaultStellarShellExecutor.java:252)
        at org.apache.metron.stellar.common.shell.cli.StellarShell.execute(StellarShell.java:357)
        at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)&lt;/PRE&gt;&lt;P&gt;Can someone help me to figure out what is the problem in above profiler configuration?&lt;/P&gt;&lt;P&gt;Also, is there any other better way to implement my usecase with metron?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 22:06:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187246#M75912</guid>
      <dc:creator>anilcseiitm2006</dc:creator>
      <dc:date>2018-03-15T22:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187247#M75913</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11832/asubramanian.html" nodeid="11832"&gt;@asubramanian&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/3642/nallen.html" nodeid="3642"&gt;@nallen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;do you guys please look the issue I am facing and help me!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 17:40:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187247#M75913</guid>
      <dc:creator>anilcseiitm2006</dc:creator>
      <dc:date>2018-03-16T17:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187248#M75914</link>
      <description>&lt;P&gt;Hi Anil -&lt;/P&gt;&lt;P&gt;One problem here is that a failed assignment expression in the REPL does not provide a helpful error message.  I submitted a fix for this here &lt;A href="https://github.com/apache/metron/pull/966"&gt;https://github.com/apache/metron/pull/966&lt;/A&gt;.  To work around that in the REPL, you can just do something like the following to test your Profiler definition; basically don't use assignment.&lt;/P&gt;&lt;PRE&gt;[Stellar]&amp;gt;&amp;gt;&amp;gt; conf := SHELL_EDIT(conf)
{
   "profiles":[
      {
         "profile":"demo_iplogon_failed",
         "foreach":"ip_address",
         "onlyif":"source.type == 'demo_windowsnxlog' and event_id == 4625",
         "init":{
            "count":"0"
         },
         "update":{
            "count":"count + 1"
         },
         "result":{
            "profile":"count",
            "triage":{
               "logon_failed_count":"count"
            }
         }
      }
   ]
}
[Stellar]&amp;gt;&amp;gt;&amp;gt;
[Stellar]&amp;gt;&amp;gt;&amp;gt; PROFILER_INIT(conf)
&lt;/PRE&gt;&lt;P&gt;The issue with the profile definition, is that you don't have a 'result/profile' expression.  The 'result/profile' expression which persists the data in HBase is required.   Just add one like so below.&lt;/P&gt;&lt;PRE&gt;[Stellar]&amp;gt;&amp;gt;&amp;gt; conf
{
   "profiles":[
      {
         "profile":"demo_iplogon_failed",
         "foreach":"ip_address",
         "onlyif":"source.type == 'demo_windowsnxlog' and event_id == 4625",
         "init":{
            "count":"0"
         },
         "update":{
            "count":"count + 1"
         },
         "result":{
            "profile":"count",
            "triage":{
               "logon_failed_count":"count"
            }
         }
      }
   ]
}
[Stellar]&amp;gt;&amp;gt;&amp;gt; PROFILER_INIT(conf)
Profiler{1 profile(s), 0 messages(s), 0 route(s)}
&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Mar 2018 20:47:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187248#M75914</guid>
      <dc:creator>nallen</dc:creator>
      <dc:date>2018-03-16T20:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187249#M75915</link>
      <description>&lt;P&gt;Did my answer help?  If so, please mark it so.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 03:51:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187249#M75915</guid>
      <dc:creator>nallen</dc:creator>
      <dc:date>2018-03-22T03:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Metron Profiler: java.lang.IllegalArgumentException: Assignment expression failed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187250#M75916</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3642/nallen.html" nodeid="3642"&gt;@nallen&lt;/A&gt; thank you very much for the quick response. I was able to figure out the issue of adding profile to result and implemented! &lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 16:07:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Metron-Profiler-java-lang-IllegalArgumentException/m-p/187250#M75916</guid>
      <dc:creator>anilcseiitm2006</dc:creator>
      <dc:date>2018-03-22T16:07:39Z</dc:date>
    </item>
  </channel>
</rss>

