-
Notifications
You must be signed in to change notification settings - Fork 2
Allow dissect to be type aware #10
Comments
I was looking at the syntax of grok, we are using something like
So looking at this I think we would like to find something that has some meaning maybe we could use A few examples:
I think we should keep a limited list of types, I think grok have a good list of type: int, long, double, float and boolean. |
thanks @ph. can we enhance the proposal to accommodate timestamp parsing as well? we have had a lot of customers ask us to be able to efficiently parse timestamps out |
Date or timestamp is a bigger problem but I think we could make it work with patterns maybe something like:
The main problem I see is how we define the format because we have multiples implementations: Java/Go and this will be more complex to converge. Maybe the date is an exception and it should be a separate processor if you look at Grok it doesn't consider the date as a parsable primitive and you are encourage to delegate the work to a specialized processors: Date filter in Logstash and the Date processor in Elasticsearch. |
Dissect relies on
We'd use:
Which would produce: { "id": 1, "value": 123.12, "buy": true, "size": 32.0 } and { "id": 999, "value": 12.1, "buy": false, "weight": 55.0 } |
Also, for reference, the logstash dissect implementation has a |
I like the |
Just to be clear, This reminds me that we also need to define where this operator can be placed within the expression (usually at the end) and which operators can it be combined with (e.g. maybe don’t allow combining with |
Oh, I've misread that so For the position, your suggestion to have it at the end of the expression is a good thing. Correct I think we should disallow it for
I haven't looked at this but maybe |
And we also should consider that it could be the right call to make here. Implementing conversion brings many edge cases, which some we've handled in the mutate filter's convert (still has issues). Users already get hit by this disconnect when using logstash's dissect filter, example here. Even elasticsearch's convert processor has its own implementation details and feature requests. Adding this capability to dissect may cause some expectation that all of these have parity between them, especially for use cases like this one, where a user is already relying on the convert processor and moves to the not-exactly-the-same dissect's convert feature. |
I haven't thought about it. it's been there since day 0, and we're not sure how many folks depend on it. we're spending some time thinking about telemetry and that could help us understand if this feature is used or if it should be deprecated. |
On the Logstash side it's unlikely we'll be implementing this in a near future, as logstash already provides the ability to do conversion within the dissect filter and on this side there hasn't been a demand for this either due to performance or reduced configuration size. That said I don't want to block you from contributing this feature. If you agree with any of the syntax suggestions here - or have another - and have created a go implementation that demonstrates it working, we can review the PRs:
Regarding feature parity across implementations, maybe we can start versioning this spec. For example, current version can be 1.0.0, and this new feature would land in 1.1.0, since it's a new capability that doesn't break previous ones. |
I agree with @jsvd proposal. |
Hi There, I am writing pattern in logstash version 7.10.2 or 7.15.2 for my log having different lines of pattern using Dissect filter with its key Modifier-> to remove space or spaces as per the log line before the next delimiter. But the Modifier-> is not working. Any suggestions? Please help My log line is like below: 2020-07-03 14:49:02,003 INFO [org.jboss.as.ee] (MSC service thread 1-2) Configuring component class My filter pattern with Dissect is like below: filter { I have two spaces after log level INFO and 1 space after log level DEBUG. So trying to use -> Modifier Please help Thanks! |
Grok processor currently allows the parsing to be type aware as seen here:
https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-basics
It would save the dissect processor some cycles on using
convert
processor to imply a non string type on the data.The text was updated successfully, but these errors were encountered: