Add MongoDB as archive mode in the Event Console


I am looking for someone who enabled MongoDB as an archive mode for the Event Console.
By default the Event Console is set to keep logs in a file but also has hidden functionality which allows to keep them in MongoDB.

I will be very grateful if someone can help me.

Best Regards,


please look at thios article:


This post also is mine. I narrowed the problem to this file:
File “/omd/sites/tncoper/lib/python/cmk/ec/”, line 130, in _connect_mongodb

The problem appear in try construction.

from pymongo.connection import Connection
from pymongo import DESCENDING
from pymongo.errors import OperationFailure
import datetime
except ImportError:
Connection = None

It looks like the script cannot import Connection. I replaced it with MongoClient and it is the same.

Does anyone can help with some ideas?

You can look in mkeventd code. There are some hints about mongo connections.