cmanaha / python-elasticsearch-logger

Python Elasticsearch handler for the standard python logging framework
Other
232 stars 115 forks source link

It is not possible to define an index with fixed name #80

Closed da-sh closed 3 years ago

da-sh commented 3 years ago

https://github.com/cmanaha/python-elasticsearch-logger/blob/27ee809b4eba309d198a8909d9c559754e257197/cmreslogging/handlers.py#L47

Hello! The ability to configure handler in such a way that it creates an index with a fixed name is very lacking.

We have several dozen services implemented in our system that use this library to write logs to ELK. And we had a problem when using this lib with the default settings - ELK was overloaded with indexes that are created every day. Yes, of course we can use the ability to add a suffix with the number of years only, as temporary solution - but this doesn't solve another problem: in this case it is not possible to perform end-to-end log analysis for a service, cause of te index "splits" on the borders of day/month/year. This is inconvenient (very) for our support - they have to look at logs for two or more indexes at once.

It would be great if you could configure the handler so that it doesn't add anything to the index at all. It's not that hard, is it?

With best regards, Dmitry

da-sh commented 3 years ago

in fact, this is the same remark as #69 So I'm closing this one