How to execute a command in (from) zabbix UserParameter=alb.co[*],aws elbv2 describe-listener-certificates --listener-arn *******
in sudores.d in file zabbix Defaults:zabbix !requiretty zabbix ALL=NOPASSWD: ALL
the command is not executed.
Added credential (macros) to Template
<zabbix_export>
<version>5.0</version>
<date>2020-07-24T10:52:10Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template alb-co</template>
<name>Template ssl-count</name>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>alb-co</name>
</application>
</applications>
<items>
<item>
<name>alb-co</name>
<key>alb.co[arn,{$HOST.DNS},--access-key{$AWS_ACCESS_KEY},--secret-key{$AWS_SECRET_KEY},--region{$REGION}]</key>
<delay>30s</delay>
<applications>
<application>
<name>alb-co</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}>=23</expression>
<name>{ITEM.LASTVALUE} alb-co {HOST.DNS}</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
</items>
<macros>
<macro>
<macro>{$AWS_ACCESS_KEY}</macro>
<type>SECRET_TEXT</type>
</macro>
<macro>
<macro>{$AWS_SECRET_KEY}</macro>
<type>SECRET_TEXT</type>
</macro>
<macro>
<macro>{$REGION}</macro>
<value>eu-central-1</value>
</macro>
</macros>
</template>
</templates>
</zabbix_export>
But still doesn't work. There are no item and trigger errors, it just returns the value 0, but should 26. Maybe someone started with this?
Closed issue, granted permission to read instance ELB