Skip to contentSkip to conversation

Install zabbix-proxy

DISCUSSION Nitesh D 2 participants 5 messages Mar 18, 2025 – Mar 22, 2025

lore
Share & tools
lore

Nitesh D

author
#0 lore raw

Hello,

I’m working on an embedded hardware project using Yocto Project. I need to set up a “zabbix-proxy” to monitor remote devices ( https://www.zabbix.com/documentation...toring/proxies ( https://www.zabbix.com/documentation/6.0/en/manual/distributed_monitoring/proxies ) ). Unfortunately, OpenEmbedded “meta-oe” has a recipe for zabbix and zabbix-agent is available, but it doesn’t include zabbix-proxy.

Has anyone successfully implemented “zabbix-proxy” over OE Linux?

I’d really appreciate any help or guidance you can provide to get zabbix-proxy.

Cheers,
Nitesh

#1 lore raw

Is it more than a matter of appending "--enable-proxy" to EXTRA_OECONF (and maybe adding a systemd unit file, if it needs any)?

Did you try something similar by any chance, and got some error/misbehavior? If so, could you share it?

Quoted 25 lines · Nitesh D via lists.yoctoproject.org

Hello,

I’m working on an embedded hardware project using Yocto Project. I need to set up a “zabbix-proxy” to monitor remote devices
(https://www.zabbix.com/documentation...toring/proxies
<https://www.zabbix.com/documentation/6.0/en/manual/distributed_monitoring/proxies>).
Unfortunately, OpenEmbedded “meta-oe” has a recipe for zabbix and zabbix-agent is available, but it doesn’t include zabbix-proxy.
Has anyone successfully implemented “zabbix-proxy” over OE Linux?
I’d really appreciate any help or guidance you can provide to get zabbix-proxy.

Cheers,
Nitesh

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64977): https://lists.yoctoproject.org/g/yocto/message/64977
Mute This Topic: https://lists.yoctoproject.org/mt/111777651/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw

Hi there,

I haven’t tried anything yet because I was busy researching how to install Zabbix-proxy and if there’s a recipe for Zabbix-proxy.

But it seems like the best way to install Zabbix-proxy is to append “—enable-proxy” to EXTRA_OECONF and choose the right database.

I’ll give it a shot and let you know if I run into any issues.

Thanks again!

Cheers,

author
#3 lore raw
In reply to Gyorgy Sarvari

Hello there,

So I have started my implementation but already running into an issue. My distro is based on kirkstone branch which has Zabbix version 5.4.12 and I need Zabbix-proxy version 6 and above. Next stable branch for me is Scarthgap and has the right version 6.2.7. I did override by copying https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb?h=scarthgap and I was able to compile as-is without any issues.

But I only need "zabbix-proxy" with sqlite3, so I created "zabbix_%.bbappend" file with following:

Quoted 141 lines

# Add required dependencies

DEPENDS += "sqlite3"

# Add proxy to the list of packages

PACKAGES += "${PN}-proxy"

# Define the files for the proxy package

FILES:${PN}-proxy = "\

${sbindir}/zabbix_proxy \

${sysconfdir}/zabbix/zabbix_proxy.conf \

${systemd_system_unitdir}/zabbix-proxy.service \

"

# Add sqlite3 as a runtime dependency for the proxy

RDEPENDS:${PN}-proxy += "sqlite3"

# Configure systemd for the proxy

SYSTEMD_PACKAGES += "${PN}-proxy"

SYSTEMD_SERVICE:${PN}-proxy = "zabbix-proxy.service"

SYSTEMD_AUTO_ENABLE:${PN}-proxy = "enable"

# Add proxy configuration options

EXTRA_OECONF += " \

--enable-proxy \

--with-sqlite3 \

"

# Create proxy configuration file and systemd service

SRC_URI += "file://zabbix-proxy.service"

do_install:append() {

# Install zabbix proxy configuration file

install -d ${D}${sysconfdir}/zabbix

install -m 0644 ${S}/conf/zabbix_proxy.conf ${D}${sysconfdir}/zabbix/

# Install systemd service file for proxy

if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then

install -d ${D}${systemd_unitdir}/system

install -m 0644 ${WORKDIR}/zabbix-proxy.service
${D}${systemd_unitdir}/system/

sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-proxy.service

Quoted 12 lines

fi

}

But started to get errors:

Quoted 35 lines

| checking for SSH2 support... no

| configure: error: SSH2 library not found

| NOTE: The following config.log files may provide further information.

| checking for odbc_config... no

| checking for SQLAllocHandle in -lodbc... no

| configure: error: unixODBC library not found

| NOTE: The following config.log files may provide further information.

| checking for process shared libpthread support... no

Quoted 8 lines

| checking for libevent support... configure: error: Unable to use libevent (libevent check failed)

| NOTE: The following config.log files may provide further information.

I started adding following to EXTRA_OECONF:

Quoted 19 lines

EXTRA_OECONF += " \

--enable-proxy \

--with-sqlite3 \

--without-unixodbc \

Quoted 7 lines

--without-ssh2 \

"

But now I'm in dead water... Any thoughts or suggestion?

Cheers,

#4 lore raw

I followed your description: I grabbed a clean Kirkstone env, copied zabbix recipe from Scarthgap, and added your bbappend (without your extra-extra-conf). I compiled it successfully after some modifications - but the recipe seems to be configure zabbix in a way that it looks for headers on the build machine, rather than the recipe sysroot.

1. I needed to add the following packages to DEPENDS: unixodbc, net-snmp, libssh2 and libevent (this last one is mentioned in your logs also)

2. In the bbappend I removed the "--with-sqlite3" part from EXTRA_OECONF (it's also present in the main recipe)

3. In the main zabbix_6.2.7.bb recipe the EXTRA_OECONF[1] needs some changes - this seems to be causing it to look for headers at the wrong place. Change it to this (it's the same as the original, but appended "=${STAGING_EXECPREFIXDIR}" to some of them, to specify the search location):

EXTRA_OECONF = " \
   --enable-dependency-tracking \
   --enable-agent \
   --enable-ipv6 \
   --with-net-snmp \
   --with-ldap=${STAGING_EXECPREFIXDIR} \
   --with-unixodbc \
   --with-ssh2=${STAGING_EXECPREFIXDIR} \
   --with-sqlite3=${STAGING_EXECPREFIXDIR} \
   --with-zlib=${STAGING_EXECPREFIXDIR} \
   --with-libpthread=${STAGING_EXECPREFIXDIR} \
   --with-libevent=${STAGING_EXECPREFIXDIR} \
   --with-libpcre=${STAGING_EXECPREFIXDIR} \
   --with-iconv=${STAGING_EXECPREFIXDIR} \
"

After these, I could compile it successfully. One last note: it's possible that this STAGING_EXECPREFIX needs to be added to all the "--with" arguments, in case they are also present on your machine. I didn't look further once it succeeded to compile. (If you need your extra-extra-conf with disabling ssh2, etc, of course you are free to add them. This is mostly a demo-solution, rather than a canonical one.)

Hope this helps. If not, ping back.

[1]:
https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb?h=scarthgap#n47

Quoted 134 lines · Nitesh D via Lists.Yoctoproject.Org

Hello there,

So I have started my implementation but already running into an issue. My distro is based on kirkstone branch which has Zabbix version 5.4.12 and I need Zabbix-proxy version 6 and above. Next stable branch for me is Scarthgap and has the right version 6.2.7. I did override by copying
https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-connectivity/zabbix/zabbix_6.2.7.bb?h=scarthgap
and I was able to compile as-is without any issues.

But I only need "zabbix-proxy" with sqlite3, so I created "zabbix_%.bbappend" file with following:

    # Add required dependencies

    DEPENDS += "sqlite3"

    # Add proxy to the list of packages

    PACKAGES += "${PN}-proxy"

    # Define the files for the proxy package

    FILES:${PN}-proxy = "\

        ${sbindir}/zabbix_proxy \

        ${sysconfdir}/zabbix/zabbix_proxy.conf \

        ${systemd_system_unitdir}/zabbix-proxy.service \

    "

    # Add sqlite3 as a runtime dependency for the proxy

    RDEPENDS:${PN}-proxy += "sqlite3"

    # Configure systemd for the proxy

    SYSTEMD_PACKAGES += "${PN}-proxy"

    SYSTEMD_SERVICE:${PN}-proxy = "zabbix-proxy.service"

    SYSTEMD_AUTO_ENABLE:${PN}-proxy = "enable"

    # Add proxy configuration options

    EXTRA_OECONF += " \

        --enable-proxy \

        --with-sqlite3 \

    "

    # Create proxy configuration file and systemd service

    SRC_URI += "file://zabbix-proxy.service"

    do_install:append() {

        # Install zabbix proxy configuration file

        install -d ${D}${sysconfdir}/zabbix

        install -m 0644 ${S}/conf/zabbix_proxy.conf
    ${D}${sysconfdir}/zabbix/

     

        # Install systemd service file for proxy

        if
    ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};
    then

            install -d ${D}${systemd_unitdir}/system

            install -m 0644 ${WORKDIR}/zabbix-proxy.service
    ${D}${systemd_unitdir}/system/

            sed -i -e 's#@SBINDIR@#${sbindir}#g'
    ${D}${systemd_unitdir}/system/zabbix-proxy.service

        fi

    }

     

But started to get errors:

| checking for SSH2 support... no

| configure: error: SSH2 library not found

| NOTE: The following config.log files may provide further information.

| checking for odbc_config... no

| checking for SQLAllocHandle in -lodbc... no

| configure: error: unixODBC library not found

| NOTE: The following config.log files may provide further information.

|checking for process shared libpthread support... no

| checking for libevent support... configure: error: Unable to use libevent (libevent check failed)

| NOTE: The following config.log files may provide further information.

I started adding following to EXTRA_OECONF:

    EXTRA_OECONF += " \

        --enable-proxy \

        --with-sqlite3 \

        --without-unixodbc \

        --without-ssh2 \

    "

But now I'm in dead water... Any thoughts or suggestion?
Cheers,