View Full Version : PATCH: Zabbix 1.1 beta1. LDAP issue
This patch fix make zabbix server with LDAP support
Lovespider
21-09-2005, 08:53
Hello Sauron,
very stupid question: how I should apply the patch? I mean, what are the commands I must type to apply?
Before compile?
Thanks for your patience,
Lovespider
For example:
cd zabbix-sources
patch -p1 < ldap.patch
misterdan
22-09-2005, 15:14
Hi Sauron
Sorry if this sounds naive but what does the LDAP support actually give to Zabbix? I run SLES9 as OS and have authentication via LDAP, but what does Zabbix actually do with it's LDAP support?
Dan
James Wells
22-09-2005, 17:33
Hi Sauron
Sorry if this sounds naive but what does the LDAP support actually give to Zabbix? I run SLES9 as OS and have authentication via LDAP, but what does Zabbix actually do with it's LDAP support?
Dan
Greetings,
One of Zabbix's features allows it to perform various LDAP search to test performance and availability. Unfortunately, there is a bug in the 1.1beta1 release where it is not enabling the compilation of these features, even when you specify --with-ldap. Sauron's patch fixes this issue.
On a similar subject, if you are using LDAP authentication, you might want to check out Jon Arney's LDAP Authentication (https://sourceforge.net/tracker/index.php?func=detail&aid=1274327&group_id=23494&atid=378685) patch. Was written for 1.1alpha12, but should be easily ported to 1.1beta1
PS. Thanx Sauron, ran into that issue yesterday afternoon, but hadn't had a chance to look into it yet. ;)
os: uname -a FreeBSD carbon 4.9-STABLE
zabbix: 1.1beta1
ldap: openldap-client-2.1.30 Open source LDAP client implementation
i used the first patch to enable build option. but ldap.h wasnt found on maketime.
after adding INCLUDES=-I@top_srcdir@/include @MYSQL_INCLUDE@ @SNMP_INCLUDE@ @LDAP_INCLUDE@ in src/libs/zbxsysinfo/Makefile.am and src/libs/zbxconf/Makefile.am it build a bit but then breaks:
Making all in zbxpid
Making all in zbxnet
Making all in zbxconf
Making all in zbxdbhigh
cd ../../.. && /bin/ksh ./config.status src/libs/zbxdbhigh/Makefile depfiles
config.status: creating src/libs/zbxdbhigh/Makefile
config.status: executing depfiles commands
Making all in zbxemail
cd ../../.. && /bin/ksh ./config.status src/libs/zbxemail/Makefile depfiles
config.status: creating src/libs/zbxemail/Makefile
config.status: executing depfiles commands
Making all in zbxsysinfo
Making all in zbxcommon
cd ../.. && /bin/ksh ./config.status src/libs/Makefile
config.status: creating src/libs/Makefile
Making all in zabbix_agent
cd ../.. && /bin/ksh ./config.status src/zabbix_agent/Makefile depfiles
config.status: creating src/zabbix_agent/Makefile
config.status: executing depfiles commands
gcc -g -O2 -o zabbix_agent zabbix_agent.o ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxlog/libzbxlog.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a
../libs/zbxsysinfo/libzbxsysinfo.a(sysinfo.o): In function `check_ldap':
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1528: undefined reference to `ldap_init'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1535: undefined reference to `ldap_search_s'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1542: undefined reference to `ldap_first_entry'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1549: undefined reference to `ldap_first_attribute'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1550: undefined reference to `ldap_get_values'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1552: undefined reference to `ldap_value_free'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1553: undefined reference to `ldap_memfree'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1557: undefined reference to `ldap_msgfree'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1558: undefined reference to `ldap_unbind'
/home/marc/zabbix-1.1beta1/src/libs/zbxsysinfo/sysinfo.c:1555: undefined reference to `ber_free'
*** Error code 1
Stop in /home/marc/zabbix-1.1beta1/src/zabbix_agent.
*** Error code 1
Stop in /home/marc/zabbix-1.1beta1/src/zabbix_agent.
*** Error code 1
Stop in /home/marc/zabbix-1.1beta1/src.
*** Error code 1
Stop in /home/marc/zabbix-1.1beta1.
i have no idea for the moment. i would like to have ldap auth in cvs code. please go for it alex, it would offers great opportunitys.
marc
James Wells
23-09-2005, 02:53
Here is a slightly updated patch for this issue. Just compiled everything correctly using --with-snmp and --with-ldap.
Thanks for the patch! Fixed.
alexei, did you checked in the fix only or ldap auth from James first post although?
regards,
marc
Marc, what patch you're referring to? Please, give me an URL.
hi alexei,
https://sourceforge.net/tracker/index.php?func=detail&aid=1274327&group_id=23494&atid=378685
this one. it would be a great help to implement in a productive enviroment.
regards,
marc
any idea? this is on FreeBSD 4.9
on 5.2.1 its building.. port will be ready if this is solved.
i guess we need some more *.h files for backward compatibility..
source='uptime.c' object='uptime.o' libtool=no DEPDIR=.deps depmode=gcc /bin/sh ../../../depcomp cc -DHAVE_CONFIG_H -I. -I. -I../../../include -I/usr/local/include -O -pipe -march=pentiumpro -c uptime.c
source='sysinfo.c' object='sysinfo.o' libtool=no DEPDIR=.deps depmode=gcc /bin/sh ../../../depcomp cc -DHAVE_CONFIG_H -I. -I. -I../../../include -I/usr/local/include -O -pipe -march=pentiumpro -c sysinfo.c
sysinfo.c: In function `check_ldap':
sysinfo.c:1539: syntax error before `*'
sysinfo.c:1564: `attr' undeclared (first use in this function)
sysinfo.c:1564: (Each undeclared identifier is reported only once
sysinfo.c:1564: for each function it appears in.)
sysinfo.c:1564: `ber' undeclared (first use in this function)
sysinfo.c:1565: `valRes' undeclared (first use in this function)
*** Error code 1
i mixed 2 threads by mistake.. the last ~4-5 posts are although discussed in http://www.zabbix.com/forum/showthread.php?t=1246
some issues are solved but it still aint build on FreeBSD4.9 (--with-ldap)
rest is fine, and a real improvement. thanks a lot. i cannot make any template/macros even not on a fresh install or after checking out latest frontend/php, but i will look for this issue after getting ldap running.
i really suggest a codefreeze and debugging of compilation and usability errors.
you made a great work, but it has to be userfriendly (even in beta).
src/libs/zbxsysinfo/sysinfo.c:/* This messy function must be rewritten!
i dont know much c, but i had to fix 3 problems in sysinfo.c to get all things sorted (clean) and usable to build as a FreeBSD port. [ldap isnt running yet...] all this patches are nice, but they are often applied against warning notices and not the real source of the problem.
i love zabbix but a codefreeze and cleanout of well known errors is needed for next stable. i cannot work in productive enviroment if i always need a day or two to get it building like it should be. pls excuse this words but i offered a shell for BSD4/5) [at least 2 testing sweats] at least 2-3 times, but its never building on BSD. use our offers to help and this project will rock you to sillicon valley soon(at least the boobs are nice there ;) ). zabbix is brilliant, is great but its always a pain to compile and it depends lots of testing on different installations (iam with zabbix still 1.0beta6 . the documentation is another worry. a codefreeze (just usability and error fixes) would give you time to get it up to date. my problem is (and james had a similar event), i cannot leave someone alone with zabbix or deligate the work, because the risk of a problem in the meantime is too high and my love to the project wont count if things go wrong :/ [e.g. trigger behavior {UNKNOWN?!?}}
best regards,
marc
Hi Marc,
I understand your worries. ZABBIX 1.1beta2 will feature quite significant changes, i.e. modularization of agent's system-dependent code. This will be the last massive change of code in beta series of ZABBIX releases.
Having said this, I'd like to inform you that starting from ZABBIX 1.1beta2, agent build will be tested on the following platforms prior to official release:
AIX 4.x, 5.x
FreeBSD 4.x
HP-UX 10.x, 11.x
Linux 2.4, 2.6
Solaris
Starting from 1.1beta3, build of both agent and server side will be tested on mentioned platforms.
Codefreeze will be announced in one of pre 1.1 releases.
ZABBIX 1.1 will be released pre-compiled for selected number of platforms.
It is still BETA software, please be patient.
Hi Alexei,
The release can be used in production environments (with care).
thats the only thing iam still not confirming. i am not sure if the (with care) was there from beginning, but for future alphas/betas i think you should leave this note away and we are all fine.
best regards and thanks for your answer,
marc
P.S. (pls test on FreeBSD5.x) 6.x will be announced soon and the architecture is much more like 5.X. the 4.X series will die in some month because of mayor improvements.