wawastein / zabbix-cloudwatch

Cloudwatch integration for Zabbix 3.x
GNU General Public License v3.0
33 stars 53 forks source link

Get -1 on elbv2 UnHealthyHostCount #38

Open ricain59 opened 2 years ago

ricain59 commented 2 years ago

Hi,

I'have read multiple topic on issue and i've search on cloudwatch but i haven't more idea. On zabbix i get "-1" on elbv2 UnHealthyHostcount but i've data on cloudwatch:

image

I've put 2 lines on script for print time:

/usr/lib/zabbix/scripts/cloudwatch.metric --interval 10800 --metric UnHealthyHostCount --namespace "AWS/ApplicationELB" --statistic Maximum --region region --dimension "LoadBalancer=net/xxxxxxxxxxx,TargetGroup=targetgroup/xxxxxxxxx" --account account-name --debug DEBUG

2022-04-04 16:29:40.965166

2022-04-04 13:29:40.965166

{u'Datapoints': [], 'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': 'xxxxxxxxxxxx', 'HTTPHeaders': {'x-amzn-requestid': 'xxxxxxxxxxxxxx', 'date': 'Mon, 04 Apr 2022 16:29:40 GMT', 'content-length': '341', 'content-type': 'text/xml'}}, u'Label': 'UnHealthyHostCount'}
-1

Any idea?

Thank you for your script.

leejm665a commented 1 year ago

Check out the "Source" tab in the picture above. If you enter metrics from here, you can get normal values.