[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Gerhard Lausser
gerhard.lausser at consol.de
Tue Feb 28 22:15:35 UTC 2012
The following commit has been merged in the debian/master branch:
commit ce1b7a97fe37e0e82633d4a5afb992b90e7de2f5
Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date: Sun Jan 22 13:48:36 2012 +0100
Logstore_mongodb inserts documents in safe mode
diff --git a/shinken/modules/logstore_mongodb.py b/shinken/modules/logstore_mongodb.py
index 8d2e6cc..f24f46b 100644
--- a/shinken/modules/logstore_mongodb.py
+++ b/shinken/modules/logstore_mongodb.py
@@ -92,6 +92,7 @@ class LiveStatusLogStoreMongoDB(BaseModule):
try:
self.conn = pymongo.Connection(self.mongodb_uri, fsync=True)
self.db = self.conn[self.database]
+
self.is_connected = True
except AutoReconnect, exp:
# now what, ha?
@@ -121,7 +122,7 @@ class LiveStatusLogStoreMongoDB(BaseModule):
print "Unexpected error:", exp
try:
if logline.logclass != LOGCLASS_INVALID:
- self.db.logs.insert(values)
+ self.db.logs.insert(values, safe=True)
except Exception, exp:
print "An error occurred:", exp
print "DATABASE ERROR!!!!!!!!!!!!!!!!!"
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list