We're using this repository for sometime to monitor our MySQL databases with no issue so far.
Recently we added a PostgreSQL in our RDS and we aren't able to integrate to Zabbix. The error that we got was:
# ./zabbixCloudWatch.py -z "localhost" -x "pginstance" -a "aws_account" -r "aws_region" -s "RDS" -d "DBInstanceIdentifier=pginstance" -p "300" -f "2018-04-16 13:10:00" -t "2018-04-16 13:15:00"
Traceback (most recent call last):
File "./zabbixCloudWatch.py", line 368, in <module>
sendLatestCloudWatchData(zabbix_server, zabbix_host, cw_data)
File "./zabbixCloudWatch.py", line 221, in sendLatestCloudWatchData
zabbix_key_timestamp = int(time.mktime(sorts[0]['Timestamp'].timetuple()))
UnboundLocalError: local variable 'sorts' referenced before assignment
After some investigation I was able to find that because of the first metric been a MySQL only the PostgreSQL wasn't able to populate the Zabbix.
I changed the lines 62-63 for the 66-67 in the _conf/aws_servicesmetrics.conf file and now we're abel to monitor the PostgreSQL as well.
Old
Hi,
We're using this repository for sometime to monitor our MySQL databases with no issue so far. Recently we added a PostgreSQL in our RDS and we aren't able to integrate to Zabbix. The error that we got was:
After some investigation I was able to find that because of the first metric been a MySQL only the PostgreSQL wasn't able to populate the Zabbix.
I changed the lines 62-63 for the 66-67 in the _conf/aws_servicesmetrics.conf file and now we're abel to monitor the PostgreSQL as well. Old
New
I hope this can help other with the same issue ;)