we are using the latest version of the plugin and replica_primary is not working anymore. We do this:
/usr/lib/nagios/plugins/check_mongodb.py -H $ADDRESS -A replica_primary -r shard01 Traceback (most recent call last): File "/usr/lib/nagios/plugins/check_mongodb.py", line 1587, in <module> sys.exit(main(sys.argv[1:])) File "/usr/lib/nagios/plugins/check_mongodb.py", line 258, in main return check_replica_primary(con, host, warning, critical, perf_data, replicaset, mongo_version) File "/usr/lib/nagios/plugins/check_mongodb.py", line 1359, in check_replica_primary db.last_primary_server.update_one({"_id": "last_primary"}, {"$set": last_primary_server_record}, upsert=True) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 1489, in __call__ self.__name.split(".")[-1]) TypeError: 'Collection' object is not callable. If you meant to call the 'update_one' method on a 'Collection' object it is failing because no such method exists.
Using python 2.7.6 on Ubuntu 14.04 and pymongo 2.6.3 against a mongodb master 3.2.4
Hi,
we are using the latest version of the plugin and replica_primary is not working anymore. We do this:
/usr/lib/nagios/plugins/check_mongodb.py -H $ADDRESS -A replica_primary -r shard01 Traceback (most recent call last): File "/usr/lib/nagios/plugins/check_mongodb.py", line 1587, in <module> sys.exit(main(sys.argv[1:])) File "/usr/lib/nagios/plugins/check_mongodb.py", line 258, in main return check_replica_primary(con, host, warning, critical, perf_data, replicaset, mongo_version) File "/usr/lib/nagios/plugins/check_mongodb.py", line 1359, in check_replica_primary db.last_primary_server.update_one({"_id": "last_primary"}, {"$set": last_primary_server_record}, upsert=True) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 1489, in __call__ self.__name.split(".")[-1]) TypeError: 'Collection' object is not callable. If you meant to call the 'update_one' method on a 'Collection' object it is failing because no such method exists.
Using python 2.7.6 on Ubuntu 14.04 and pymongo 2.6.3 against a mongodb master 3.2.4Thanks
bert