[ZBX-25953] UserParameter with curl causes Items timeout Created: 2025 Jan 29  Updated: 2025 Feb 03  Resolved: 2025 Feb 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 7.0.9
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Maksym Buz Assignee: Zabbix Development Team
Resolution: Won't fix Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File photo_2025-01-29_10-19-21.jpg    
Issue Links:
Causes
Duplicate
Sprint: Support backlog

 Description   

Steps to reproduce:

Create UserParameter. Additional parameters passed via frontend:

UserParameter=custom.url.status[*],/etc/zabbix/userparameters/scripts/linux_url_status.sh $1 $2

linux_url_status.sh is a simple script, which returns status 0 if url is available or 1, if not. 
 

expected_output=$1
current_status=$(curl -sLk --max-time 10 $2 | tr '><[]' ' ' | egrep -i "$expected_output")if [ -n "$current_status" ];then
        echo "0"
else
        echo "1"
fi

 
Add some non working URLs

Result:
See screenshot...
Some of the items are returning 1, as expected, some - failing with Timeout error. In case of having a lot of such checks - other agent items may falling too. 

Timeout set to 20 seconds. --max-time for curl set to 10 seconds. 



 Comments   
Comment by Alexander Vladishev [ 2025 Feb 03 ]

Items are failing due to a timeout because all processes on the agent side are busy processing other "long time" metrics.

To resolve this issue, you need to increase the number of "listener" processes using the configuration parameter "StartAgents". This will allow the agent to handle more parallel requests.

Comment by Alexander Vladishev [ 2025 Feb 03 ]

The issue described here is a configuration problem and cannot be considered a bug. Closing as "Won't Fix."

Generated at Mon Feb 24 09:08:39 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.