Skip to content

dot to underscore replacement in ES output #708

@konstantin-kornienko-epam

Description

This code in es.c is replacing dots to underscores in keys (fileds name):

       /*
         * Sanitize key name, Elastic Search 2.x don't allow dots
         * in field names:
         *
         *   https://goo.gl/R5NMTr
         */
        char *p   = ptr_key;
        char *end = ptr_key + key_size;
        while (p != end) {
            if (*p == '.') *p = '_';
            p++;
        }

This behavior relies on this article, that is applicable for Elastic 2.x.

But for Elastic 5.0 and higher dots are permitted again :). Actually Elastic Beats™ are using dot in field names, example: filebeat fields for kubernetes:.

So maybe it makes sense to have an option in es output "Replace dots in fields name"?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions