Skip to content

Commit

Permalink
Merge pull request #15 from omegazeng/master
Browse files Browse the repository at this point in the history
Update zabbix-mongodb.py
  • Loading branch information
omni-lchen authored Sep 27, 2018
2 parents 31b23d4 + 006b1d3 commit b5be92e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/zabbix-mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit b5be92e

Please sign in to comment.