[ZBX-22530] monitoring with userparameters doesn't works Created: 2023 Mar 16  Updated: 2023 Mar 17  Resolved: 2023 Mar 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: 6.0.13
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Geraldine Pasarin Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 18.04.6 LTS



 Description   

Steps to reproduce:

  1. create conf file
  2. start zabbix_agent2
  3. reload userparameters
  4. create in dashboard the item and set the key
  5. see logs

Result:

logs:

2023/03/16 18:15:59.001669 [UserParameter] executing command:'/usr/bin/curl -s localhost:7331/stats | grep -oP '(?<=badResponses: ).\d*? ' || echo "0"'
2023/03/16 18:15:59.002129 failed to execute exporter task for itemid:53249 key 'fupd.badResponses' error: 'Cannot execute command: fork/exec /bin/sh: no such file or directory'
2023/03/16 18:15:59.002156 check 'fupd.badResponses' is not supported: Cannot execute command: fork/exec /bin/sh: no such file or directory
2023/03/16 18:15:59.002196 failed to obtain PID of dead child process: no child processes
2023/03/16 18:15:59.002265 Calling C function "zbx_get_agent_item_nextcheck()"
2023/03/16 18:15:59.002338 Calling C function "free()"

file conf with userparameters

UserParameter=fupd.badResponses,/usr/bin/curl -s localhost:7331/stats | grep -oP '(?<=badResponses: ).\d*? ' || echo "0"

 

zabbix agent2 conf file
**

 

### Option: UserParameterDir
#       Directory to execute UserParameter commands from. Only one entry is allowed.
#       When executing UserParameter commands the agent will change the working directory to the one
#       specified in the UserParameterDir option.
#       This way UserParameter commands can be specified using the relative ./ prefix.
#
# Mandatory: no
#Default:
UserParameterDir=./zabbix_agent2.d/plugins.d/
### Option: ControlSocket
#       The control socket, used to send runtime commands with '-R' option.
#
# Mandatory: no
# Default:
# ControlSocket=
ControlSocket=/tmp/agent.plugin.sock

 

cmd test

[/etc/zabbix]> zabbix_agent2 -t fupd.badResponses
2023/03/16 18:19:01.572929 cannot register plugins: failed to drop plugin socket, with path /tmp/agent.plugin.sock, unlinkat /tmp/agent.plugin.sock: operation not permitted
zabbix_agent2 [9094]: ERROR: cannot register plugins: failed to drop plugin socket, with path /tmp/agent.plugin.sock, unlinkat /tmp/agent.plugin.sock: operation not permitted

dashboard zabbix

Not received data in the last 5 minutes on server

Expected:
monitoring with user parameter in dashboard



 Comments   
Comment by Dmitrijs Lamberts [ 2023 Mar 17 ]

Please be advised that this section of the tracker is for bug reports only. The case you have submitted can not be qualified as one, so please reach out to [email protected] for commercial support (https://zabbix.com/support) or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance. With that said, we are closing this ticket. Thank you for understanding.

Generated at Thu Jun 05 22:00:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.