-
Notifications
You must be signed in to change notification settings - Fork 10
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
Could not open the database: 'module' object has no attribute 'Connection' #16
Comments
If you need to store logs in a MongoDB database without LiveStatus, you should use this module: https://github.com/shinken-monitoring/mod-mongo-logs. If you need LS, I cannot help ... sorry |
I have an idea: So i think but not sure: What do you think ? |
You can try this fix ... or you can have a look in the source code of the mongo-logs module how it is managed. |
i applied the modifications (mongoClient) now the connection to mongo v3 is works !!
i created a fork here: https://github.com/Azef1/mod-logstore-mongodb But a new error in brokerd.log, i have several lines:
I think it's a problem about the function manage_log_brok (https://github.com/Azef1/mod-logstore-mongodb/blob/master/module/module.py#L205) but i don't understand this function. |
Once again, have a look at my mongo-logs module, because I copied and modified the log line analyzer of LiveStatus because I found some missing information ... |
Ok now i haven't error
|
I suppose you copied too much code ... you must debug your python code. |
Hi,
So i think all is ok!!!!! |
You can submit a Pull Request from your fork and the module maintainer will be able to merge it ... |
Got into the same trouble while trying to parallelize hyperopt. @Azef1, please, explain in more detail how precisely can I use your code to make MongoTrials work after all. |
@Azef1 : can you submit a PR from your forked module ? |
Hello,
but I installed the fork of Azef1 and I have mongo-logs and logstore-mongodb on my shinken I need to remove one module or not ? I need to install livestatus module for nagvis and for livestatus it needs logstore-mongodb or mongo-logs With module of Azef1 it can replace mongo-logs ? J'ai installé le fork de Azef1 en plus du module mongo-logs donc j'ai les deux modules logstore-mongodb et mongo-logs |
For WebUI2 you do not need this module nor the mongo-logs one ... the mongo-logs module is made to store the Shinken logs in a mongo DB and the WebUI2 uses this module to display an history and availability from the logs, but it is not mandatory. The database error that occured is mainly because of the difference betweeen Mongo2 and Mongo3 versions ... for the fork of @Azef1 I cannot help 😉 |
Oui voila donc pour avoir un webui2 fonctionnel il faut garder mongo-logs, mais pour nagvis il lui faut livestatus qui a besoin de logstore-mongodb, c'est le problème. Enfin la j'ai testé la version de GuusH avec le fix de lermit et j'ai plus d'erreur dans le broker enfin rien qui bloque je crois |
C'et cela, la WebUI est fonctionnelle même si le module |
Ok for NagVis, i installed Livestatus module + mod-logstore-null module here
Quickly to explain my code: |
Hi,
I try to install this module to use with livestatus but in my brokerd.log i have this error:
Could not open the database: 'module' object has no attribute 'Connection'
I installed releases 1.4.2 because i have pymongo 3.
I started with default params in logstore_mongodb.cfg:
The logs results is:
I checked my database in mongo :
I have a "shinken" database and "logs" collection
So i edited logstore_mongodb.cfg to set database and collection:
But i have same error :
Could not open the database ....
My mongo works well with webui2. Have an idea to solve the error ?
The text was updated successfully, but these errors were encountered: