omni-lchen / zabbix-cloudwatch

71 stars 61 forks source link

AttributeError: 'NoneType' object has no attribute 'get_metric_statistics' #23

Open magnetogit opened 6 years ago

magnetogit commented 6 years ago

what's wrong?

root@xxx:/opt/zabbix/cloudwatch/conf# /opt/zabbix/cloudwatch/cron.d/cron.RDS.sh "databasexx" "localhost" "databasexx.clzmdeoafdm1.ap-southeast-1.rds.amazonaws.com" "zabbix" "ap-southeast-1a" Traceback (most recent call last): File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 370, in cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions) File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 181, in getCloudWatchData results = cw.get_metric_statistics(period, start_time, end_time, metric_name, namespace, statistics, dimensions) AttributeError: 'NoneType' object has no attribute 'get_metric_statistics'

tuapuikia commented 6 years ago

Something tell me you are using wrong DB_INSTANCE. Do you able to query the cloudwatch metric using awscli ?