Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better built-in support for URI query parsing #1

Open
pvdb opened this issue Nov 4, 2012 · 0 comments
Open

Better built-in support for URI query parsing #1

pvdb opened this issue Nov 4, 2012 · 0 comments
Assignees

Comments

@pvdb
Copy link
Owner

pvdb commented Nov 4, 2012

Production use of ntail often requires filtering on URI query params, which at the moment isn't very well supported out of the box.

Given a log line with the following uri part of the request component:

/index?qux=blegga&foo=bar

Using the DSL, building a filter on any of the URI query params cannot be more sophisticated then:

-f "uri =~ /blegga/"

Unless you resort to something like:

-f "CGI::parse(URI::parse(uri).query)['qux'] == 'blegga'"

It would be much easier/nicer if ntail implemented this out-of-the-box, something along the lines of:

-f "uri_query_params['qux'] == 'blegga'"

The following StackOverflow post contains a number of viable alternatives for implementing this ntail feature:

http://stackoverflow.com/questions/2500462/how-to-extract-url-parameters-from-a-url-with-ruby-or-rails

/cc @jspc

@ghost ghost assigned pvdb Nov 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant