omni-lchen / zabbix-cloudwatch

71 stars 61 forks source link

This solution works fine in Python2.7 but gives error in 2.6 #20

Closed macadminrohit closed 6 years ago

macadminrohit commented 6 years ago

Traceback (most recent call last): File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 415, in cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions) File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 190, in getCloudWatchData aws_metrics = json.loads(open(aws_services_conf).read()) File "/usr/lib64/python2.6/json/init.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode obj, end = self._scanner.iterscan(s, **kw).next() File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib64/python2.6/json/decoder.py", line 183, in JSONObject value, end = iterscan(s, idx=end, context=context).next() File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib64/python2.6/json/decoder.py", line 217, in JSONArray value, end = iterscan(s, idx=end, context=context).next() File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib64/python2.6/json/decoder.py", line 193, in JSONObject raise ValueError(errmsg("Expecting , delimiter", s, end - 1)) ValueError: Expecting , delimiter: line 458 column 5 (char 10715)

macadminrohit commented 6 years ago

Fixed it, There was a delimeter missing in services.conf file.