-
New Feature Request
-
Resolution: Duplicate
-
Minor
-
None
-
2.0.7
-
linux
In the UserParameter specify an apparent pathname which is in fact
a dynamic link library and the name of a symbol contained in that library.
UserParameter=mytestvar,/home/gjc/Documents/zbx-test.so,zbx_test_1
The api/contract expected of zbx_test_1 is the same as for zbx_execute
and can be implemented in less than 100 lines of code inside the file
zabbix-2.0.7/src/libs/zbxexec/execute.c
This avoids the overhead of fork (or clone) and execve()
on /bin/sh, and whatever fork()execve() activity the sh command may need to do,
including reading/writing a state file if the implemenation of the variable
needs to preserve state across evaluations.
A patch file will be attached. It contains a diff for
zabbix-2.0.7/src/libs/zbxexec/execute.c
and then some new files which are only needed to test and demonstrate
how the dynamic api could be used.
The big issue with this is that any serious bug in the user created
library, or in libraries called by that library, can cause the
zabbix_agentd to fail, possibly leading to false bug reports on the
zabbix_agentd itself.
A related feature ZBXNEXT-701 which asks for there to be a persistent sub-agent
mechanism.
- duplicates
-
ZBXNEXT-1550 Loadable module(s) to extend the functionality of Zabbix agent (daemon and standalone), server and proxy
- Closed