(Zabbix Version 5.0.12)
Hi, In the code below I try to change the description of the trigger, if the description thats arriving is different from the one in Zabbix,
then check if the new description is in the trigger,
and then send an event via Zabbix_sender,
it works, but despite I check the change via api in the script and is correct, when the problem is shown in the GUI still has the old name, any clues on how to solve this?

Hi, In the code below I try to change the description of the trigger, if the description thats arriving is different from the one in Zabbix,
then check if the new description is in the trigger,
and then send an event via Zabbix_sender,
it works, but despite I check the change via api in the script and is correct, when the problem is shown in the GUI still has the old name, any clues on how to solve this?
Code:
trigger_description_from_event_trim=B
trigger_description_from_zabbix_trim=A
### if trigger descriptions are not the same, update trigger
'[' B '!=' A ']'
wget -O- https://my-zabbix.com/zabbix/api_jsonrpc.php -o /dev/null --no-check-certificate --header 'Content-Type: application/json-rpc' --post-data '{
"jsonrpc": "2.0",
"method": "trigger.update",
"params": {
"triggerid": "49957",
"description": "B"
},
"auth": "XXXXXXXXX",
"id": 1
}'
update_trigger='{"jsonrpc":"2.0","result":{"triggerids":["49957"]},"id":1}'
trigger_description_from_z_trim=
#### while trigger description is not the same
'[' B '!=' '' ']'
wget -O- https://my-zabbix.com/zabbix/api_jsonrpc.php -o /dev/null --no-check-certificate --header 'Content-Type: application/json-rpc' --post-data '{
"jsonrpc": "2.0",
"method": "trigger.get",
"params": {
"output": ["description"],
"triggerids": ["49957"]
},
"auth": "XXXXXXXXX",
"id": 1
}'
jq -r '.result[0].description'
trigger_description_from_zabbix=B
echo B
sed 's/ //g'
trigger_description_from_zabbix_trim=B
sleep 1
#### Off the while loop
'[' B '!=' B ']'
#### Send problem to zabbix with the new description
zabbix_sender -vv -z my-zabbix.com -s decal -k 127.0.0.1.SNMP_Carga_de_CPU_13826_down -o 1