You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/31 23:53:50 UTC

[GitHub] [nifi] pvillard31 opened a new pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

pvillard31 opened a new pull request #4966:
URL: https://github.com/apache/nifi/pull/4966


   Thank you for submitting a contribution to Apache NiFi.
   
   Please provide a short description of the PR here:
   
   #### Description of PR
   
   _Enables X functionality; fixes bug NIFI-YYYY._
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [ ] Does your PR title start with **NIFI-XXXX** where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `main`)?
   
   - [ ] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._
   
   ### For code changes:
   - [ ] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] Have you verified that the full build is successful on JDK 8?
   - [ ] Have you verified that the full build is successful on JDK 11?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the `LICENSE` file, including the main `LICENSE` file under `nifi-assembly`?
   - [ ] If applicable, have you updated the `NOTICE` file, including the main `NOTICE` file found under `nifi-assembly`?
   - [ ] If adding new Properties, have you added `.displayName` in addition to .name (programmatic access) for each of the new properties?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] turcsanyip commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
turcsanyip commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-814669723


   @pvillard31 Thanks for the improvement!
   @ottobackwards Thanks for the review!
   
   Merging to main.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] asfgit closed pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #4966:
URL: https://github.com/apache/nifi/pull/4966


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] ottobackwards commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
ottobackwards commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-811863455


   @pvillard31, this looks good, but I don't don't see where you actually have the Property added?  I'm sorry if I'm missing something obvious.  I haven't finished my first coffee.
   
   Also, when this is working, and if raw is configured vs. something else, would I get records when I previously wouldn't?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] pvillard31 commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
pvillard31 commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-813468805


   I'll add the example in the additional details page, this is a good point.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] ottobackwards commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
ottobackwards commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-813594526


   Awesome.  Ship it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] pvillard31 commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
pvillard31 commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-813524134


   Doc/example added


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] pvillard31 commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
pvillard31 commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-813303948


   Thanks for the quick review @ottobackwards - I completely missed the addition of the allowable value in the property... I just relied on the unit tests... I guess I should not push a pull request at 2 in the morning :)
   
   Right now, if using ``append``, this would add the message into the ``_raw`` field of the previous message, while ``skip`` would completely dismiss the message.
   
   Example:
   
   I'm sending two messages
   - ``<6>Feb 28 12:00:00 192.168.0.1 aliyun[11111]: [error] Syslog test``
   - ``This is a bad message...``
   
   I'm using the Grok Reader with the following pattern:
   ``<%{POSINT:priority}>%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:hostname} %{WORD:ident}%{GREEDYDATA:message}``
   
   If using ``skip`` with a JSON Writer, I'd get:
   ````
   [ {
     "priority" : "6",
     "timestamp" : "Feb 28 12:00:00",
     "hostname" : "192.168.0.1",
     "ident" : "aliyun",
     "message" : "[11111]: [error] Syslog test",
     "stackTrace" : null,
     "_raw" : "<6>Feb 28 12:00:00 192.168.0.1 aliyun[11111]: [error] Syslog test"
   } ]
   ````
   
   If using ``append``:
   ````
   [ {
     "priority" : "6",
     "timestamp" : "Feb 28 12:00:00",
     "hostname" : "192.168.0.1",
     "ident" : "aliyun",
     "message" : "[11111]: [error] Syslog test\nThis is a bad message...",
     "stackTrace" : null,
     "_raw" : "<6>Feb 28 12:00:00 192.168.0.1 aliyun[11111]: [error] Syslog test\nThis is a bad message..."
   } ]
   ````
   
   If using ``raw``:
   ````
   [ {
     "priority" : "6",
     "timestamp" : "Feb 28 12:00:00",
     "hostname" : "192.168.0.1",
     "ident" : "aliyun",
     "message" : "[11111]: [error] Syslog test",
     "stackTrace" : null,
     "_raw" : "<6>Feb 28 12:00:00 192.168.0.1 aliyun[11111]: [error] Syslog test"
   }, {
     "priority" : null,
     "timestamp" : null,
     "hostname" : null,
     "ident" : null,
     "message" : null,
     "stackTrace" : null,
     "_raw" : "This is a bad message..."
   } ]
   ````


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] ottobackwards edited a comment on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
ottobackwards edited a comment on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-811863455


   @pvillard31, this looks good, but I don't don't see where you actually have the  allowable values added to the Property?  I'm sorry if I'm missing something obvious.  I haven't finished my first coffee.
   
   Also, when this is working, and if raw is configured vs. something else, would I get records when I previously wouldn't?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] ottobackwards commented on pull request #4966: NIFI-8389 - Grok Reader - raw data strategy when no match

Posted by GitBox <gi...@apache.org>.
ottobackwards commented on pull request #4966:
URL: https://github.com/apache/nifi/pull/4966#issuecomment-813438721


   That is a perfect explanation, thank you @pvillard31.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org