Open vitassecuriti opened 6 years ago
Yes, you are right @vitassecuriti. The current master code is not compatible with Zabbix 3.0, because https://github.com/monitoringartist/zabbix-docker-monitoring/pull/80.
Quick workaround: build tagged version before tag 0.6.8 I'll try to fix it later.
For the record, zbx_regexp_sub
functions:
Zabbix 3.4.6:
int zbx_regexp_sub(const char *string, const char *pattern, const char *output_template, char **out)
{
return regexp_sub(string, pattern, output_template, REG_EXTENDED | REG_NEWLINE, out);
}
Zabbix 3.0.8:
char *zbx_regexp_sub(const char *string, const char *pattern, const char *output_template)
{
return regexp_sub(string, pattern, output_template, REG_EXTENDED | REG_NEWLINE);
}
Thanks for the answer. I have tested for earlier versions. the mistake is present. FOR 0.6.7
`config.status:` executing depfiles commands
Configuration:
Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux
Compiler: gcc
Compiler flags: -g -O2
Library-specific flags:
Enable server: no
Enable proxy: no
Enable agent: yes
Agent details:
TLS: no
Linker flags: -rdynamic
Libraries: -lm -ldl -lresolv
Enable Java gateway: no
LDAP support: no
IPv6 support: no
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* <http://www.zabbix.com> *
***********************************************************
gcc -fPIC -shared -o zabbix_module_docker.so zabbix_module_docker.c -I../../../include -I../../../src/libs/zbxsysinfo
zabbix_module_docker.c: In function 'zbx_docker_dir_detect':
zabbix_module_docker.c:708:17: error: too many arguments to function 'zbx_regexp_sub'
if (SUCCEED != zbx_regexp_sub(path, mounts_regex, "\\1", &stat_dir) || NULL == stat_dir)
^
In file included from zabbix_module_docker.c:26:0:
../../../include/zbxregexp.h:37:7: note: declared here
char *zbx_regexp_sub(const char *string, const char *pattern, const char *output_template);
^
make: *** [zabbix_module_docker] Error 1
The command '/bin/sh -c yum -y -q install git subversion automake autoconf gcc make && git clone -q https://github.com/monitoringartist/zabbix-docker-monitoring && svn --quiet export svn://svn.zabbix.com/${ZABBIX_VERSION} ~/zabbix/ && cd ~/zabbix/ && ./bootstrap.sh 1>/dev/null && ./configure --enable-agent && cp -R ~/zabbix-docker-monitoring/src/modules/zabbix_module_docker/ ~/zabbix/src/modules/ && cd ~/zabbix/src/modules/zabbix_module_docker && make' returned a non-zero code: 2`
FOR 0.6.6
`config.status: executing depfiles commands
Configuration:
Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux
Compiler: gcc
Compiler flags: -g -O2
Library-specific flags:
Enable server: no
Enable proxy: no
Enable agent: yes
Agent details:
TLS: no
Linker flags: -rdynamic
Libraries: -lm -ldl -lresolv
Enable Java gateway: no
LDAP support: no
IPv6 support: no
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* <http://www.zabbix.com> *
***********************************************************
gcc -fPIC -shared -o zabbix_module_docker.so zabbix_module_docker.c -I../../../include -I../../../src/libs/zbxsysinfo
zabbix_module_docker.c: In function 'zbx_docker_dir_detect':
zabbix_module_docker.c:708:17: error: too many arguments to function 'zbx_regexp_sub'
if (SUCCEED != zbx_regexp_sub(path, mounts_regex, "\\1", &stat_dir) || NULL == stat_dir)
^
In file included from zabbix_module_docker.c:26:0:
../../../include/zbxregexp.h:37:7: note: declared here
char *zbx_regexp_sub(const char *string, const char *pattern, const char *output_template);
^
make: *** [zabbix_module_docker] Error 1
The command '/bin/sh -c yum -y -q install git subversion automake autoconf gcc make && git clone -q https://github.com/monitoringartist/zabbix-docker-monitoring && svn --quiet export svn://svn.zabbix.com/${ZABBIX_VERSION} ~/zabbix/ && cd ~/zabbix/ && ./bootstrap.sh 1>/dev/null && ./configure --enable-agent && cp -R ~/zabbix-docker-monitoring/src/modules/zabbix_module_docker/ ~/zabbix/src/modules/ && cd ~/zabbix/src/modules/zabbix_module_docker && make' returned a non-zero code: 2`
So, workaround hasn't helped. It is necessary to wait for correction of a bug.
You need to use tagged module source code version. For example v0.6.7: https://github.com/monitoringartist/zabbix-docker-monitoring/blob/v0.6.7/src/modules/zabbix_module_docker/zabbix_module_docker.c
It doesn't use zbx_regexp_sub
function, so you can't have error error: too many arguments to function 'zbx_regexp_sub'
there.
Sorry? I probably haven't so understood
Module has releases - https://github.com/monitoringartist/zabbix-docker-monitoring/releases Unfortunately, https://github.com/monitoringartist/zabbix-docker-monitoring#compilation and Dockerfiles use only master branch code, which is not compatible with your Zabbix 3.0, so pls modify them and instead of master branch use tag 0.6.7 in your compilation process.
Once again I apologize, Really, the decision works
I have changed a line in the dockerfile, having added parameter
git clone -q -b v0.6.7 https://github.com/monitoringartist/zabbix-docker-monitoring && \
so the image was constructed without error
Hi!
I try to build an image according to the instruction for branches/3.0 or tags/3.0.8 on an image of centos. I receive such mistake. In the Dockerfile file I set value of the ENV ZABBIX_VERSION=branches/3.0 variable or ENV ZABBIX_VERSION=tags/3.0.8. and every time I receive a error
I need to compile with the tag 3.0.8 since doesn't work with the zabbix_module_docker.so file which I have downloaded already compiled for version 3.0 zabbix-agent.