Open turbaszek opened 3 years ago
Additionally when working on #94 I got the following warning. It would be good to address it:
/usr/local/lib/python3.8/site-packages/elasticsearch/connection/base.py:190: ElasticsearchDeprecationWarning: [types removal] Specifying types in document index requests is deprecated, use the typeless endpoints instead (/{index}/_doc/{id}, /{index}/_doc, or /{index}/_create/{id}).
warnings.warn(message, category=ElasticsearchDeprecationWarning)
Hi @turbaszek, I can take a look into this if it is still available?
@skekre98 sure! I did some changes in #94 around this. However what we need is to:
Doing #114 I saw that we have also similar logic of creating es connection in: https://github.com/apache/kibble/blob/5bf37a8c0db83c918fa476a3a1b653390026e169/kibble/scanners/brokers/kibbleES.py#L286-L298
Yeah there is lot of duplication which cna be simplified.
Same with yaml file used by scanners to, I think we can unify those configs in the top level .ini file
Currently we implement two times the same class:
KibbleDatabase
:https://github.com/apache/kibble/blob/2abfcc871dd35ddc727317267a4595f8230b53eb/kibble/setup/makeaccount.py#L27
https://github.com/apache/kibble/blob/2abfcc871dd35ddc727317267a4595f8230b53eb/kibble/api/plugins/database.py#L121
What should be done:
kibble/database.py
that will keep definition of this object.KibbleConfigParser
fromkibble/configuration.py