Hello to everyone from community ZABBIX.
Zabbix 6.0 LTS
It is possible to create manual event action with bash script sending json body to api endpoint ?
My scenario:
I create in administration->scripts->manual evet script
path on svr : /usr/lib/zabbix/alertscripts/my_script.sh
I set on srcipt 755 permission
but I get response timeout
Cannot execute script.
Connection timeout of 60 seconds exceeded when connecting to Zabbix server "localhost".
Can I plese some sugesstion, advice what is wrong or is it possible to get this scenario in this steps.
In simillar task
WebScenario POST json data - ZABBIX Forums
probably everything works fine but I do not know anything more about place or detail his scenario [what he want to get], from where useer send file with json body and witch language he is using to create script if he create them.
Please for help.
Zabbix 6.0 LTS
It is possible to create manual event action with bash script sending json body to api endpoint ?
My scenario:
I create in administration->scripts->manual evet script
path on svr : /usr/lib/zabbix/alertscripts/my_script.sh
I set on srcipt 755 permission
Code:
#!/bin/bash
url="https:my_endpoint/api/my_example/Issues"
bearertoken="my_token"
json_data='{
"IssueTypeId":"exaple",
"AttributeValueList":[
{
"example":"3",
}
]
}'
response=$(curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $bearertoken" -d "$json_data" "$url")
echo "$response"
Cannot execute script.
Connection timeout of 60 seconds exceeded when connecting to Zabbix server "localhost".
Can I plese some sugesstion, advice what is wrong or is it possible to get this scenario in this steps.
In simillar task
WebScenario POST json data - ZABBIX Forums
probably everything works fine but I do not know anything more about place or detail his scenario [what he want to get], from where useer send file with json body and witch language he is using to create script if he create them.
Please for help.
Comment