-
Notifications
You must be signed in to change notification settings - Fork 296
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
Elasticsearch output - dots in key names #1188
Comments
extra keys are also concatenated with "_" without choice. |
@cert-lv last i checked ES stopped allowing "." in key name. You can use the |
Hello, @navtej , Yes, I remember the period when dots were not allowed. Now we use ES 6.x (with 5.x it was In short - Elasticsearch 2.x does not support dots-to-object transformation and so dots in field names are not allowed in versions 2.0 - 2.3. In modern ES such fields are converted into multilevel objects. |
@cert-lv does adding dot as replacement_char works for you? |
@navtej, yes, as I've mentioned fast solution is to replace dots with dots, it works. I've also noticed, that putting nothing in flatten_fields disables concatenation of extra fields with "_", so the second question is solved too. But one more question - currently you put everything into one single ES indice, intelmq by default. May I send a Pull Request with a small fix to split indices into names like intelmq-MM-YYYY ? So users can manage/delete/backup indices by month. |
@cert-lv please see this, https://github.com/navtej/intelmq/blob/latest/intelmq/bots/outputs/elasticsearch/output.py . it uses dynamic index based on date and time from time observation. I havent been able to make it generic because people may have vastly varied requirements. |
I guess we can close this issue or we still have something open on it? |
IMHO what has been discussed/explained here should go to the bot's documentation. And I suggest that the replacement char parameter could be made optional (handle nonexistence and empy) if it is not necessary anymore. |
Anyone willing to update the documentation with the findings mentioned here? |
@cert-lv do you want to take it up. |
https://github.com/certtools/intelmq/blob/master/docs/Bots.md#elasticsearch-output-bot - seems to already contain the info regarding this issue, so I'll close it. |
Hi,
Modern Elasticsearch supports dots in key names. Currently an output bot does a replacement ("." to "_" by default) without any options.
One solution could be to add a bool config switch to enable/disable the replacement. (Somewhen in the future, probably, this func could be removed at all).
Fast solution is to replace dots with dots.
Also this ticked is opened as you wanted to change the default/name of the parameter.
The text was updated successfully, but these errors were encountered: