You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/23 21:16:16 UTC

[jira] [Commented] (METRON-249) Field Transformation functions fail to handle invalid user inputs

    [ https://issues.apache.org/jira/browse/METRON-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347208#comment-15347208 ] 

ASF GitHub Bot commented on METRON-249:
---------------------------------------

GitHub user cestella opened a pull request:

    https://github.com/apache/incubator-metron/pull/174

    METRON-249: Field Transformation functions fail to handle invalid user inputs

    The field transformation functions fail to handle invalid user input.  Specifically it could not handle negative numbers, so `URL_TO_HOST(-123)` fails with a parser exception rather than handling this gracefully.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cestella/incubator-metron METRON-249

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-metron/pull/174.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #174
    
----
commit 8be5c171effd7e73cd0c8685b58ca5ffb779b1e1
Author: cstella <ce...@gmail.com>
Date:   2016-06-23T21:12:55Z

    Stellar did not properly handle negative numbers.

----


> Field Transformation functions fail to handle invalid user inputs 
> ------------------------------------------------------------------
>
>                 Key: METRON-249
>                 URL: https://issues.apache.org/jira/browse/METRON-249
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Neha Sinha
>              Labels: 0.2.1BETA
>         Attachments: LogException.rtf
>
>
> Hi,
> The field transformation functions fail to handle invalid user input .On providing invalid inputs the parser throws exceptions and fails to create the required indices in elasticsearch.
> ==========================
> Steps to Reproduce
> ==========================
> Edit the squid.json file and provide the following definition to it:-(Note-we are giving an invalid input :-123 to the URL_TO_HOST function)
> -----------------------------------------------------------------------------------------------
> {
>   "parserClassName": "org.apache.metron.parsers.GrokParser",
>   "sensorTopic": "squid",
>   "parserConfig": {
>     "grokPath": "/patterns/squid",
>     "patternLabel": "SQUID_DELIMITED",
>     "timestampField": "timestamp"
>   },
>   "fieldTransformations" : [
>     {
>       "transformation" : "MTL"
>     ,"output" : [ "full_hostname", "domain_without_subdomains" ]
>     ,"config" : {
>       "full_hostname" : “URL_TO_HOST(123)"
>       ,"domain_without_subdomains" : "DOMAIN_REMOVE_SUBDOMAINS(full_hostname)"
>                 }
>     }
>                            ]
> }
> ----------------------------------------------------------------------------------------------------
> Replay Squid events/logs and monitor the logs in storm for squid topology.
> Attached exception log would be seen and no indexes would be created respective to the logs.
> Expected Behaviour :-
> 1.The error should be more clean.
> 2.Since we cannot validate the inputs the invalid inputs should be ignored and the indices should get created anyway based on the Grok parser output 
> Regards,
> Neha



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)