Add MongoDB as archive mode in the Event Console

Hello,

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,
Georgi

Hi,

please look at thios article:

Hi,

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

The problem appear in try construction.

try:
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.