Search code examples
pythonzabbix

Python-AWS Cloudwatch-get RDS instance name


I'm totally noob for Python, i found this on GitHub and it works as expected, but couldn't figure out how to edit this to add RDS name/Lambda function name/ to output.

So don't know metric if more than one RDS/Lambda/ELB/Application ELB are monitored by zabbix.

https://github.com/omni-lchen/zabbix-cloudwatch/blob/master/zabbixCloudWatch.py


Solution

  • after line 191 try:

    elif aws_service == 'service name':
                   topic_name = dimensions['FunctionName']
                   zabbix_key =  aws_service + '.' + metric_name + '.' + statistics + '["' + account + '","' + aws_region + '","' + topic_name + '"]'
    

    make sure that Zabbix key reflects code above