wawastein / zabbix-cloudwatch

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

Import cloudwatch_template.xml failed #20

Closed melch700 closed 5 years ago

melch700 commented 5 years ago

zabbix 4.0 lts

when i import the cloudwatch_template.xml i get the following error

Invalid key "instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}][{#TARGET_GROUP_NAME}]" for item prototype "ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} target group {#TARGET_GROUP_NAME} total targets" on "Cloudwatch Template": incorrect syntax near "[{#TARGET_GROUP_NAME}]".

danimas commented 5 years ago

Same error here on zabbix 4.2

MrBal commented 5 years ago

@danimas and @melch700 try like this <"key>instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}{#TARGET_GROUP_NAME}]</"key> Note : remove the " in keys part

danimas commented 5 years ago

Thanks @MrBal. I modified the line that you suggest, but i got an another error.

The section is now like this:

\<item_prototype> \<name>ELBv2: {#TARGET_GROUP_LOAD_BALANCER_NAME} target group {#TARGET_GROUP_NAME} total targets\</name> \<type>15\</type> \<snmp_community/> \<snmp_oid/> \<key>instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}{#TARGET_GROUP_NAME}]\</key>

I got the following error:

Incorrect trigger expression. Check expression part starting from "{Cloudwatch Template:instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}][{#TARGET_GROUP_NAME}].last()}=-1".

MrBal commented 5 years ago

@danimas same error here in zabbix share , maybe solve your problem it's work for me

https://share.zabbix.com/cloud/zabbix-cloudwatch-integration

melch700 commented 5 years ago

@MrBal and @danimas , removed the square brackets at

instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}][{#TARGET_GROUP_NAME}] {Cloudwatch Template:instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}{#TARGET_GROUP_NAME}].last()}=-1 {Cloudwatch Template:instances[{#TARGET_GROUP_LOAD_BALANCER_NAME}{#TARGET_GROUP_NAME}].last()}=0

this worked for me thanks.