You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@metron.apache.org by Farrukh Naveed Anjum <an...@gmail.com> on 2018/01/15 10:38:58 UTC

Metron Reference Application (Profiling Your Streams Fails)

Hi,

I am trying to setup up Metron Reference Application (SQUID) Example given
on main metron website.

I am facing a problem during (Profiling Your Streams ) Config_Put Step


CONFIG_PUT(profilerConfig)

*It causes to display following error*

[!] No enum constant
org.apache.metron.common.configuration.ConfigurationType.{
  "profiles": [
    {
      "profile": "squid-miss",
      "foreach": "ip_src_addr",
      "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
      "update": {
        "m": "STATS_ADD(m, 1)"
      },
      "result": "m"
    },
    {
      "profile": "url-length",
      "foreach": "ip_src_addr",
      "onlyif": "source.type == 'squid'",
      "update": {
        "m": "STATS_ADD(m, LENGTH(url))"
      },
      "result": "m"
    }
  ]
}
java.lang.IllegalArgumentException: No enum constant
org.apache.metron.common.configuration.ConfigurationType.{
  "profiles": [
    {
      "profile": "squid-miss",
      "foreach": "ip_src_addr",
      "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
      "update": {
        "m": "STATS_ADD(m, 1)"
      },
      "result": "m"
    },
    {
      "profile": "url-length",
      "foreach": "ip_src_addr",
      "onlyif": "source.type == 'squid'",
      "update": {
        "m": "STATS_ADD(m, LENGTH(url))"
      },
      "result": "m"
    }
  ]
}
        at java.lang.Enum.valueOf(Enum.java:238)
        at
org.apache.metron.common.configuration.ConfigurationType.valueOf(ConfigurationType.java:31)
        at
org.apache.metron.management.ConfigurationFunctions$ConfigPut.apply(ConfigurationFunctions.java:269)
        at
org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(StellarCompiler.java:556)
        at
org.apache.metron.stellar.common.StellarCompiler$Expression.apply(StellarCompiler.java:160)
        at
org.apache.metron.stellar.common.BaseStellarProcessor.parse(BaseStellarProcessor.java:152)
        at
org.apache.metron.stellar.common.shell.StellarExecutor.execute(StellarExecutor.java:287)
        at
org.apache.metron.stellar.common.shell.StellarShell.handleStellar(StellarShell.java:270)
        at
org.apache.metron.stellar.common.shell.StellarShell.execute(StellarShell.java:409)
        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)


How can I solve this problem

-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Thanks for helping. I am not getting the *is_alert = true* in the Thread
intel Feeds part, does these Setller commands have to do anything with it ?

On Tue, Jan 16, 2018 at 1:43 PM, Mohan Venkateshaiah <
mvenkateshaiah@hortonworks.com> wrote:

> The third argument for PROFILE_GET should be a list
> of ProfilePeriod objects.
>
>
>
> Try
>
>
>
> *PROFILE_GET("squid-miss", "127.0.0.1", PROFILE_FIXED(2, “HOURS”))*
>
>
>
> You will find more info on client API for accessing the profiles generated
> by the Metron Profiler here,
>
>
>
> https://metron.apache.org/current-book/metron-analytics/
> metron-profiler-client/index.html
>
>
>
>
>
> Thanks
>
> Mohan DV
>
>
>
> *From: *Farrukh Naveed Anjum <an...@gmail.com>
> *Reply-To: *"user@metron.apache.org" <us...@metron.apache.org>
> *Date: *Tuesday, January 16, 2018 at 12:23 PM
> *To: *"user@metron.apache.org" <us...@metron.apache.org>
> *Cc: *Jon Zeolla <Ze...@gmail.com>
> *Subject: *Re: Metron Reference Application (Profiling Your Streams Fails)
>
>
>
> Another Typeo i guess
>
>
>
> *profile := PROFILE_GET("squid-miss", "127.0.0.1", 2, "HOURS")*
>
>
>
> [!]  ERROR: Variable profile not assigned
>
> [!] Cannot cast java.lang.Integer to java.util.List
>
> java.lang.ClassCastException: Cannot cast java.lang.Integer to
> java.util.List
>
>         at java.lang.Class.cast(Class.java:3369)
>
>         at org.apache.metron.stellar.common.utils.ConversionUtils.
> convert(ConversionUtils.java:42)
>
>         at org.apache.metron.profiler.client.stellar.Util.getArg(
> Util.java:115)
>
>         at org.apache.metron.profiler.client.stellar.GetProfile.
> apply(GetProfile.java:142)
>
>         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
>
>         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
>
>         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
>
>         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
>
>         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
>
>         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
>
>         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)
>
>
>
>
>
> On Tue, Jan 16, 2018 at 11:14 AM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
>
> Thanks,
>
>
>
> It seems to have worked for me.
>
>
>
> On Mon, Jan 15, 2018 at 7:37 PM, Simon Elliston Ball <
> simon@simonellistonball.com> wrote:
>
> Looks like a docs typo on the wiki:
>
> What you need is CONFIG_PUT(“PROFILER”, profilerConfig)
>
> Simon
>
>
> > On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com>
> wrote:
> >
> > Can you help on this ?
> >
> > On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Any Idea of getting ride of this problem ?
> >
> > On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Hi,
> >
> > I am trying to setup up Metron Reference Application (SQUID) Example
> given on main metron website.
> >
> > I am facing a problem during (Profiling Your Streams ) Config_Put Step
> >
> >
> > CONFIG_PUT(profilerConfig)
> >
> > It causes to display following error
> >
> > [!] No enum constant org.apache.metron.common.configuration.
> ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> > java.lang.IllegalArgumentException: No enum constant
> org.apache.metron.common.configuration.ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> >         at java.lang.Enum.valueOf(Enum.java:238)
> >         at org.apache.metron.common.configuration.
> ConfigurationType.valueOf(ConfigurationType.java:31)
> >         at org.apache.metron.management.ConfigurationFunctions$
> ConfigPut.apply(ConfigurationFunctions.java:269)
> >         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
> >         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
> >         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
> >         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
> >         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)
> >
> >
> > How can I solve this problem
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
>
>
>
>
>
> --
>
> With Regards
> Farrukh Naveed Anjum
>
>
>
>
>
> --
>
> With Regards
> Farrukh Naveed Anjum
>



-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Thanks for helping. I am not getting the *is_alert = true* in the Thread
intel Feeds part, does these Setller commands have to do anything with it ?

On Tue, Jan 16, 2018 at 1:43 PM, Mohan Venkateshaiah <
mvenkateshaiah@hortonworks.com> wrote:

> The third argument for PROFILE_GET should be a list
> of ProfilePeriod objects.
>
>
>
> Try
>
>
>
> *PROFILE_GET("squid-miss", "127.0.0.1", PROFILE_FIXED(2, “HOURS”))*
>
>
>
> You will find more info on client API for accessing the profiles generated
> by the Metron Profiler here,
>
>
>
> https://metron.apache.org/current-book/metron-analytics/
> metron-profiler-client/index.html
>
>
>
>
>
> Thanks
>
> Mohan DV
>
>
>
> *From: *Farrukh Naveed Anjum <an...@gmail.com>
> *Reply-To: *"user@metron.apache.org" <us...@metron.apache.org>
> *Date: *Tuesday, January 16, 2018 at 12:23 PM
> *To: *"user@metron.apache.org" <us...@metron.apache.org>
> *Cc: *Jon Zeolla <Ze...@gmail.com>
> *Subject: *Re: Metron Reference Application (Profiling Your Streams Fails)
>
>
>
> Another Typeo i guess
>
>
>
> *profile := PROFILE_GET("squid-miss", "127.0.0.1", 2, "HOURS")*
>
>
>
> [!]  ERROR: Variable profile not assigned
>
> [!] Cannot cast java.lang.Integer to java.util.List
>
> java.lang.ClassCastException: Cannot cast java.lang.Integer to
> java.util.List
>
>         at java.lang.Class.cast(Class.java:3369)
>
>         at org.apache.metron.stellar.common.utils.ConversionUtils.
> convert(ConversionUtils.java:42)
>
>         at org.apache.metron.profiler.client.stellar.Util.getArg(
> Util.java:115)
>
>         at org.apache.metron.profiler.client.stellar.GetProfile.
> apply(GetProfile.java:142)
>
>         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
>
>         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
>
>         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
>
>         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
>
>         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
>
>         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
>
>         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)
>
>
>
>
>
> On Tue, Jan 16, 2018 at 11:14 AM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
>
> Thanks,
>
>
>
> It seems to have worked for me.
>
>
>
> On Mon, Jan 15, 2018 at 7:37 PM, Simon Elliston Ball <
> simon@simonellistonball.com> wrote:
>
> Looks like a docs typo on the wiki:
>
> What you need is CONFIG_PUT(“PROFILER”, profilerConfig)
>
> Simon
>
>
> > On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com>
> wrote:
> >
> > Can you help on this ?
> >
> > On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Any Idea of getting ride of this problem ?
> >
> > On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Hi,
> >
> > I am trying to setup up Metron Reference Application (SQUID) Example
> given on main metron website.
> >
> > I am facing a problem during (Profiling Your Streams ) Config_Put Step
> >
> >
> > CONFIG_PUT(profilerConfig)
> >
> > It causes to display following error
> >
> > [!] No enum constant org.apache.metron.common.configuration.
> ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> > java.lang.IllegalArgumentException: No enum constant
> org.apache.metron.common.configuration.ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> >         at java.lang.Enum.valueOf(Enum.java:238)
> >         at org.apache.metron.common.configuration.
> ConfigurationType.valueOf(ConfigurationType.java:31)
> >         at org.apache.metron.management.ConfigurationFunctions$
> ConfigPut.apply(ConfigurationFunctions.java:269)
> >         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
> >         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
> >         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
> >         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
> >         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)
> >
> >
> > How can I solve this problem
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
>
>
>
>
>
> --
>
> With Regards
> Farrukh Naveed Anjum
>
>
>
>
>
> --
>
> With Regards
> Farrukh Naveed Anjum
>



-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Mohan Venkateshaiah <mv...@hortonworks.com>.
The third argument for PROFILE_GET should be a list of ProfilePeriod objects.

Try

PROFILE_GET("squid-miss", "127.0.0.1", PROFILE_FIXED(2, “HOURS”))

You will find more info on client API for accessing the profiles generated by the Metron Profiler here,

https://metron.apache.org/current-book/metron-analytics/metron-profiler-client/index.html


Thanks
Mohan DV

From: Farrukh Naveed Anjum <an...@gmail.com>
Reply-To: "user@metron.apache.org" <us...@metron.apache.org>
Date: Tuesday, January 16, 2018 at 12:23 PM
To: "user@metron.apache.org" <us...@metron.apache.org>
Cc: Jon Zeolla <Ze...@gmail.com>
Subject: Re: Metron Reference Application (Profiling Your Streams Fails)

Another Typeo i guess

profile := PROFILE_GET("squid-miss", "127.0.0.1", 2, "HOURS")

[!]  ERROR: Variable profile not assigned
[!] Cannot cast java.lang.Integer to java.util.List
java.lang.ClassCastException: Cannot cast java.lang.Integer to java.util.List
        at java.lang.Class.cast(Class.java:3369)
        at org.apache.metron.stellar.common.utils.ConversionUtils.convert(ConversionUtils.java:42)
        at org.apache.metron.profiler.client.stellar.Util.getArg(Util.java:115)
        at org.apache.metron.profiler.client.stellar.GetProfile.apply(GetProfile.java:142)
        at org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(StellarCompiler.java:556)
        at org.apache.metron.stellar.common.StellarCompiler$Expression.apply(StellarCompiler.java:160)
        at org.apache.metron.stellar.common.BaseStellarProcessor.parse(BaseStellarProcessor.java:152)
        at org.apache.metron.stellar.common.shell.StellarExecutor.execute(StellarExecutor.java:287)
        at org.apache.metron.stellar.common.shell.StellarShell.handleStellar(StellarShell.java:270)
        at org.apache.metron.stellar.common.shell.StellarShell.execute(StellarShell.java:409)
        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)


On Tue, Jan 16, 2018 at 11:14 AM, Farrukh Naveed Anjum <an...@gmail.com>> wrote:
Thanks,

It seems to have worked for me.

On Mon, Jan 15, 2018 at 7:37 PM, Simon Elliston Ball <si...@simonellistonball.com>> wrote:
Looks like a docs typo on the wiki:

What you need is CONFIG_PUT(“PROFILER”, profilerConfig)

Simon

> On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com>> wrote:
>
> Can you help on this ?
>
> On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <an...@gmail.com>> wrote:
> Any Idea of getting ride of this problem ?
>
> On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <an...@gmail.com>> wrote:
> Hi,
>
> I am trying to setup up Metron Reference Application (SQUID) Example given on main metron website.
>
> I am facing a problem during (Profiling Your Streams ) Config_Put Step
>
>
> CONFIG_PUT(profilerConfig)
>
> It causes to display following error
>
> [!] No enum constant org.apache.metron.common.configuration.ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
> java.lang.IllegalArgumentException: No enum constant org.apache.metron.common.configuration.ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
>         at java.lang.Enum.valueOf(Enum.java:238)
>         at org.apache.metron.common.configuration.ConfigurationType.valueOf(ConfigurationType.java:31)
>         at org.apache.metron.management.ConfigurationFunctions$ConfigPut.apply(ConfigurationFunctions.java:269)
>         at org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(StellarCompiler.java:556)
>         at org.apache.metron.stellar.common.StellarCompiler$Expression.apply(StellarCompiler.java:160)
>         at org.apache.metron.stellar.common.BaseStellarProcessor.parse(BaseStellarProcessor.java:152)
>         at org.apache.metron.stellar.common.shell.StellarExecutor.execute(StellarExecutor.java:287)
>         at org.apache.metron.stellar.common.shell.StellarShell.handleStellar(StellarShell.java:270)
>         at org.apache.metron.stellar.common.shell.StellarShell.execute(StellarShell.java:409)
>         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)
>
>
> How can I solve this problem
>
> --
> With Regards
> Farrukh Naveed Anjum
>
>
>
> --
> With Regards
> Farrukh Naveed Anjum
>
>
>
> --
> With Regards
> Farrukh Naveed Anjum



--
With Regards
Farrukh Naveed Anjum



--
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Another Typeo i guess

*profile := PROFILE_GET("squid-miss", "127.0.0.1", 2, "HOURS")*

[!]  ERROR: Variable profile not assigned
[!] Cannot cast java.lang.Integer to java.util.List
java.lang.ClassCastException: Cannot cast java.lang.Integer to
java.util.List
        at java.lang.Class.cast(Class.java:3369)
        at
org.apache.metron.stellar.common.utils.ConversionUtils.convert(ConversionUtils.java:42)
        at
org.apache.metron.profiler.client.stellar.Util.getArg(Util.java:115)
        at
org.apache.metron.profiler.client.stellar.GetProfile.apply(GetProfile.java:142)
        at
org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(StellarCompiler.java:556)
        at
org.apache.metron.stellar.common.StellarCompiler$Expression.apply(StellarCompiler.java:160)
        at
org.apache.metron.stellar.common.BaseStellarProcessor.parse(BaseStellarProcessor.java:152)
        at
org.apache.metron.stellar.common.shell.StellarExecutor.execute(StellarExecutor.java:287)
        at
org.apache.metron.stellar.common.shell.StellarShell.handleStellar(StellarShell.java:270)
        at
org.apache.metron.stellar.common.shell.StellarShell.execute(StellarShell.java:409)
        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)


On Tue, Jan 16, 2018 at 11:14 AM, Farrukh Naveed Anjum <
anjum.farrukh@gmail.com> wrote:

> Thanks,
>
> It seems to have worked for me.
>
> On Mon, Jan 15, 2018 at 7:37 PM, Simon Elliston Ball <
> simon@simonellistonball.com> wrote:
>
>> Looks like a docs typo on the wiki:
>>
>> What you need is CONFIG_PUT(“PROFILER”, profilerConfig)
>>
>> Simon
>>
>> > On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com>
>> wrote:
>> >
>> > Can you help on this ?
>> >
>> > On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <
>> anjum.farrukh@gmail.com> wrote:
>> > Any Idea of getting ride of this problem ?
>> >
>> > On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
>> anjum.farrukh@gmail.com> wrote:
>> > Hi,
>> >
>> > I am trying to setup up Metron Reference Application (SQUID) Example
>> given on main metron website.
>> >
>> > I am facing a problem during (Profiling Your Streams ) Config_Put Step
>> >
>> >
>> > CONFIG_PUT(profilerConfig)
>> >
>> > It causes to display following error
>> >
>> > [!] No enum constant org.apache.metron.common.confi
>> guration.ConfigurationType.{
>> >   "profiles": [
>> >     {
>> >       "profile": "squid-miss",
>> >       "foreach": "ip_src_addr",
>> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>> >       "update": {
>> >         "m": "STATS_ADD(m, 1)"
>> >       },
>> >       "result": "m"
>> >     },
>> >     {
>> >       "profile": "url-length",
>> >       "foreach": "ip_src_addr",
>> >       "onlyif": "source.type == 'squid'",
>> >       "update": {
>> >         "m": "STATS_ADD(m, LENGTH(url))"
>> >       },
>> >       "result": "m"
>> >     }
>> >   ]
>> > }
>> > java.lang.IllegalArgumentException: No enum constant
>> org.apache.metron.common.configuration.ConfigurationType.{
>> >   "profiles": [
>> >     {
>> >       "profile": "squid-miss",
>> >       "foreach": "ip_src_addr",
>> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>> >       "update": {
>> >         "m": "STATS_ADD(m, 1)"
>> >       },
>> >       "result": "m"
>> >     },
>> >     {
>> >       "profile": "url-length",
>> >       "foreach": "ip_src_addr",
>> >       "onlyif": "source.type == 'squid'",
>> >       "update": {
>> >         "m": "STATS_ADD(m, LENGTH(url))"
>> >       },
>> >       "result": "m"
>> >     }
>> >   ]
>> > }
>> >         at java.lang.Enum.valueOf(Enum.java:238)
>> >         at org.apache.metron.common.configuration.ConfigurationType.
>> valueOf(ConfigurationType.java:31)
>> >         at org.apache.metron.management.ConfigurationFunctions$ConfigPu
>> t.apply(ConfigurationFunctions.java:269)
>> >         at org.apache.metron.stellar.common.StellarCompiler.lambda$exit
>> TransformationFunc$13(StellarCompiler.java:556)
>> >         at org.apache.metron.stellar.common.StellarCompiler$Expression.
>> apply(StellarCompiler.java:160)
>> >         at org.apache.metron.stellar.common.BaseStellarProcessor.parse(
>> BaseStellarProcessor.java:152)
>> >         at org.apache.metron.stellar.common.shell.StellarExecutor.execu
>> te(StellarExecutor.java:287)
>> >         at org.apache.metron.stellar.common.shell.StellarShell.handleSt
>> ellar(StellarShell.java:270)
>> >         at org.apache.metron.stellar.common.shell.StellarShell.execute(
>> StellarShell.java:409)
>> >         at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
>> >         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1149)
>> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:624)
>> >         at java.lang.Thread.run(Thread.java:748)
>> >
>> >
>> > How can I solve this problem
>> >
>> > --
>> > With Regards
>> > Farrukh Naveed Anjum
>> >
>> >
>> >
>> > --
>> > With Regards
>> > Farrukh Naveed Anjum
>> >
>> >
>> >
>> > --
>> > With Regards
>> > Farrukh Naveed Anjum
>>
>>
>
>
> --
> With Regards
> Farrukh Naveed Anjum
>



-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Thanks,

It seems to have worked for me.

On Mon, Jan 15, 2018 at 7:37 PM, Simon Elliston Ball <
simon@simonellistonball.com> wrote:

> Looks like a docs typo on the wiki:
>
> What you need is CONFIG_PUT(“PROFILER”, profilerConfig)
>
> Simon
>
> > On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com>
> wrote:
> >
> > Can you help on this ?
> >
> > On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Any Idea of getting ride of this problem ?
> >
> > On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
> > Hi,
> >
> > I am trying to setup up Metron Reference Application (SQUID) Example
> given on main metron website.
> >
> > I am facing a problem during (Profiling Your Streams ) Config_Put Step
> >
> >
> > CONFIG_PUT(profilerConfig)
> >
> > It causes to display following error
> >
> > [!] No enum constant org.apache.metron.common.configuration.
> ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> > java.lang.IllegalArgumentException: No enum constant
> org.apache.metron.common.configuration.ConfigurationType.{
> >   "profiles": [
> >     {
> >       "profile": "squid-miss",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
> >       "update": {
> >         "m": "STATS_ADD(m, 1)"
> >       },
> >       "result": "m"
> >     },
> >     {
> >       "profile": "url-length",
> >       "foreach": "ip_src_addr",
> >       "onlyif": "source.type == 'squid'",
> >       "update": {
> >         "m": "STATS_ADD(m, LENGTH(url))"
> >       },
> >       "result": "m"
> >     }
> >   ]
> > }
> >         at java.lang.Enum.valueOf(Enum.java:238)
> >         at org.apache.metron.common.configuration.
> ConfigurationType.valueOf(ConfigurationType.java:31)
> >         at org.apache.metron.management.ConfigurationFunctions$
> ConfigPut.apply(ConfigurationFunctions.java:269)
> >         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
> >         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
> >         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
> >         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
> >         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
> >         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)
> >
> >
> > How can I solve this problem
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
> >
> >
> >
> > --
> > With Regards
> > Farrukh Naveed Anjum
>
>


-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Simon Elliston Ball <si...@simonellistonball.com>.
Looks like a docs typo on the wiki: 

What you need is CONFIG_PUT(“PROFILER”, profilerConfig)

Simon

> On 15 Jan 2018, at 10:45, Farrukh Naveed Anjum <an...@gmail.com> wrote:
> 
> Can you help on this ?
> 
> On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <an...@gmail.com> wrote:
> Any Idea of getting ride of this problem ?
> 
> On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <an...@gmail.com> wrote:
> Hi,
> 
> I am trying to setup up Metron Reference Application (SQUID) Example given on main metron website. 
> 
> I am facing a problem during (Profiling Your Streams ) Config_Put Step
> 
> 
> CONFIG_PUT(profilerConfig)
> 
> It causes to display following error
> 
> [!] No enum constant org.apache.metron.common.configuration.ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
> java.lang.IllegalArgumentException: No enum constant org.apache.metron.common.configuration.ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
>         at java.lang.Enum.valueOf(Enum.java:238)
>         at org.apache.metron.common.configuration.ConfigurationType.valueOf(ConfigurationType.java:31)
>         at org.apache.metron.management.ConfigurationFunctions$ConfigPut.apply(ConfigurationFunctions.java:269)
>         at org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(StellarCompiler.java:556)
>         at org.apache.metron.stellar.common.StellarCompiler$Expression.apply(StellarCompiler.java:160)
>         at org.apache.metron.stellar.common.BaseStellarProcessor.parse(BaseStellarProcessor.java:152)
>         at org.apache.metron.stellar.common.shell.StellarExecutor.execute(StellarExecutor.java:287)
>         at org.apache.metron.stellar.common.shell.StellarShell.handleStellar(StellarShell.java:270)
>         at org.apache.metron.stellar.common.shell.StellarShell.execute(StellarShell.java:409)
>         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)
> 
> 
> How can I solve this problem
> 
> -- 
> With Regards
> Farrukh Naveed Anjum
> 
> 
> 
> -- 
> With Regards
> Farrukh Naveed Anjum
> 
> 
> 
> -- 
> With Regards
> Farrukh Naveed Anjum


Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Can you help on this ?

On Mon, Jan 15, 2018 at 3:42 PM, Farrukh Naveed Anjum <
anjum.farrukh@gmail.com> wrote:

> Any Idea of getting ride of this problem ?
>
> On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
> anjum.farrukh@gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to setup up Metron Reference Application (SQUID) Example
>> given on main metron website.
>>
>> I am facing a problem during (Profiling Your Streams ) Config_Put Step
>>
>>
>> CONFIG_PUT(profilerConfig)
>>
>> *It causes to display following error*
>>
>> [!] No enum constant org.apache.metron.common.confi
>> guration.ConfigurationType.{
>>   "profiles": [
>>     {
>>       "profile": "squid-miss",
>>       "foreach": "ip_src_addr",
>>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>>       "update": {
>>         "m": "STATS_ADD(m, 1)"
>>       },
>>       "result": "m"
>>     },
>>     {
>>       "profile": "url-length",
>>       "foreach": "ip_src_addr",
>>       "onlyif": "source.type == 'squid'",
>>       "update": {
>>         "m": "STATS_ADD(m, LENGTH(url))"
>>       },
>>       "result": "m"
>>     }
>>   ]
>> }
>> java.lang.IllegalArgumentException: No enum constant
>> org.apache.metron.common.configuration.ConfigurationType.{
>>   "profiles": [
>>     {
>>       "profile": "squid-miss",
>>       "foreach": "ip_src_addr",
>>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>>       "update": {
>>         "m": "STATS_ADD(m, 1)"
>>       },
>>       "result": "m"
>>     },
>>     {
>>       "profile": "url-length",
>>       "foreach": "ip_src_addr",
>>       "onlyif": "source.type == 'squid'",
>>       "update": {
>>         "m": "STATS_ADD(m, LENGTH(url))"
>>       },
>>       "result": "m"
>>     }
>>   ]
>> }
>>         at java.lang.Enum.valueOf(Enum.java:238)
>>         at org.apache.metron.common.configuration.ConfigurationType.
>> valueOf(ConfigurationType.java:31)
>>         at org.apache.metron.management.ConfigurationFunctions$ConfigPu
>> t.apply(ConfigurationFunctions.java:269)
>>         at org.apache.metron.stellar.common.StellarCompiler.lambda$exit
>> TransformationFunc$13(StellarCompiler.java:556)
>>         at org.apache.metron.stellar.common.StellarCompiler$Expression.
>> apply(StellarCompiler.java:160)
>>         at org.apache.metron.stellar.common.BaseStellarProcessor.parse(
>> BaseStellarProcessor.java:152)
>>         at org.apache.metron.stellar.common.shell.StellarExecutor.execu
>> te(StellarExecutor.java:287)
>>         at org.apache.metron.stellar.common.shell.StellarShell.handleSt
>> ellar(StellarShell.java:270)
>>         at org.apache.metron.stellar.common.shell.StellarShell.execute(
>> StellarShell.java:409)
>>         at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>> Executor.java:1149)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>> lExecutor.java:624)
>>         at java.lang.Thread.run(Thread.java:748)
>>
>>
>> How can I solve this problem
>>
>> --
>> With Regards
>> Farrukh Naveed Anjum
>>
>
>
>
> --
> With Regards
> Farrukh Naveed Anjum
>



-- 
With Regards
Farrukh Naveed Anjum

Re: Metron Reference Application (Profiling Your Streams Fails)

Posted by Farrukh Naveed Anjum <an...@gmail.com>.
Any Idea of getting ride of this problem ?

On Mon, Jan 15, 2018 at 3:38 PM, Farrukh Naveed Anjum <
anjum.farrukh@gmail.com> wrote:

> Hi,
>
> I am trying to setup up Metron Reference Application (SQUID) Example given
> on main metron website.
>
> I am facing a problem during (Profiling Your Streams ) Config_Put Step
>
>
> CONFIG_PUT(profilerConfig)
>
> *It causes to display following error*
>
> [!] No enum constant org.apache.metron.common.configuration.
> ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
> java.lang.IllegalArgumentException: No enum constant
> org.apache.metron.common.configuration.ConfigurationType.{
>   "profiles": [
>     {
>       "profile": "squid-miss",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid' and action == 'TCP_MISS'",
>       "update": {
>         "m": "STATS_ADD(m, 1)"
>       },
>       "result": "m"
>     },
>     {
>       "profile": "url-length",
>       "foreach": "ip_src_addr",
>       "onlyif": "source.type == 'squid'",
>       "update": {
>         "m": "STATS_ADD(m, LENGTH(url))"
>       },
>       "result": "m"
>     }
>   ]
> }
>         at java.lang.Enum.valueOf(Enum.java:238)
>         at org.apache.metron.common.configuration.
> ConfigurationType.valueOf(ConfigurationType.java:31)
>         at org.apache.metron.management.ConfigurationFunctions$
> ConfigPut.apply(ConfigurationFunctions.java:269)
>         at org.apache.metron.stellar.common.StellarCompiler.lambda$
> exitTransformationFunc$13(StellarCompiler.java:556)
>         at org.apache.metron.stellar.common.StellarCompiler$
> Expression.apply(StellarCompiler.java:160)
>         at org.apache.metron.stellar.common.BaseStellarProcessor.
> parse(BaseStellarProcessor.java:152)
>         at org.apache.metron.stellar.common.shell.StellarExecutor.
> execute(StellarExecutor.java:287)
>         at org.apache.metron.stellar.common.shell.StellarShell.
> handleStellar(StellarShell.java:270)
>         at org.apache.metron.stellar.common.shell.StellarShell.
> execute(StellarShell.java:409)
>         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)
>
>
> How can I solve this problem
>
> --
> With Regards
> Farrukh Naveed Anjum
>



-- 
With Regards
Farrukh Naveed Anjum