You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for your work. But i have a problem when i launch cli command to retrieve metrics from RDS instance.
When i launch this command : ./cron.RDS.sh "database-zabbix" "FOUQUET RDS" "127.0.0.1" "awsfouquet" "eu-west-3"
Or this command : ./zabbixCloudWatch.py -z "127.0.0.1" -x "FOUQUET RDS" -a "awsfouquet" -r "" -s "RDS" -d "DBInstanceIdentifier=database-zabbix" -p "60" -f "2019-12-05 15:30:00" -t "2019-12-05 16:00:00"
I have these errors :
Traceback (most recent call last):
File "./zabbixCloudWatch.py", line 394, in
cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions)
File "./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'
But if i try to get metrics from AWS CLI, it works well : aws cloudwatch get-metric-statistics --namespace 'AWS/RDS' --metric-name 'CPUUtilization' --dimensions Name=DBInstanceIdentifier,Value=database-zabbix --start-time '2019-12-05T12:00:00Z' --end-time '2019-12-05T12:30:00Z' --period 60 --statistics 'Maximum'
Hello. I have the same problem. It appears when I uncomment get_metric_statistics function in zabbixCloudWatch.py. I have done it trying to solve other problem (TypeError: 'NoneType' object is not iterable) without success.
Thanks for your help. This is the line you talk ? (line 78 and 165) : get_metric_statistics(period, start_time, end_time, metric_name, namespace, statistics, dimensions=None, unit=None)
Because these lines are commented in my zabbixCloudWatch.py. If i uncomment these lines i have this error :
Traceback (most recent call last):
File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 394, in <module>
cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions)
File "/opt/zabbix/cloudwatch/zabbixCloudWatch.py", line 165, in getCloudWatchData
get_metric_statistics(period, start_time, end_time, metric_name, namespace, statistics, dimensions=None, unit=None)
NameError: global name 'get_metric_statistics' is not defined
Hi,
First, thank you for your work. But i have a problem when i launch cli command to retrieve metrics from RDS instance.
When i launch this command :
./cron.RDS.sh "database-zabbix" "FOUQUET RDS" "127.0.0.1" "awsfouquet" "eu-west-3"
Or this command :
./zabbixCloudWatch.py -z "127.0.0.1" -x "FOUQUET RDS" -a "awsfouquet" -r "" -s "RDS" -d "DBInstanceIdentifier=database-zabbix" -p "60" -f "2019-12-05 15:30:00" -t "2019-12-05 16:00:00"
I have these errors :
Traceback (most recent call last):
File "./zabbixCloudWatch.py", line 394, in
cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions)
File "./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'
But if i try to get metrics from AWS CLI, it works well :
aws cloudwatch get-metric-statistics --namespace 'AWS/RDS' --metric-name 'CPUUtilization' --dimensions Name=DBInstanceIdentifier,Value=database-zabbix --start-time '2019-12-05T12:00:00Z' --end-time '2019-12-05T12:30:00Z' --period 60 --statistics 'Maximum'
Result :
{
"Timestamp": "2019-12-05T12:24:00Z",
"Maximum": 1.47540983606554,
"Unit": "Percent"
}
],
"Label": "CPUUtilization"
Thanks for your help.
The text was updated successfully, but these errors were encountered: