-
Incident report
-
Resolution: Won't fix
-
Trivial
-
None
-
6.0.13
-
None
-
Ubuntu 18.04.6 LTS
Steps to reproduce:
- create conf file
- start zabbix_agent2
- reload userparameters
- create in dashboard the item and set the key
- 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