diff --git a/bin/zabbix-mongodb.py b/bin/zabbix-mongodb.py index 0f496b5..9063093 100755 --- a/bin/zabbix-mongodb.py +++ b/bin/zabbix-mongodb.py @@ -12,6 +12,8 @@ from pymongo import MongoClient, errors from sys import exit +import json + class MongoDB(object): """main script class""" # pylint: disable=too-many-instance-attributes @@ -95,7 +97,7 @@ def get_mongo_db_lld(self): dict_lld_metric = {} dict_lld_metric['{#MONGODBNAME}'] = db_name db_list.append(dict_lld_metric) - dict_metrics['value'] = {"data": db_list} + dict_metrics['value'] = '{"data": ' + json.dumps(db_list) + '}' self.__metrics.insert(0, dict_metrics) def get_oplog(self):