zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.35k stars 1.37k forks source link

zabbix-proxy-sqlite:alpine:6.4.8 missing required pthreads? #1107

Closed BrutalBirdie closed 10 months ago

BrutalBirdie commented 10 months ago

Had a problem with my Kubernetes zabbix-proxy-sqlite:alpine-6.4.8

The preprocess workers would cap at ~100% utilization no matter what. After a lot of debugging and reading up, came across the changelog of 6.4 https://www.zabbix.com/documentation/current/en/manual/introduction/whatsnew640

In particular the following statement:

Thread-based preprocessing workers

The item value preprocessing has been rewritten to use thread-based preprocessing workers for enhanced parallelism and reduced overhead. This development should help avoid situations when the prolonged preprocessing of one item holds up others.

This change adds a new [required library](https://www.zabbix.com/documentation/current/en/manual/installation/requirements#serverproxy) for Zabbix server/proxy - libevent_pthreads.

See also: [Preprocessing details](https://www.zabbix.com/documentation/current/en/manual/config/items/preprocessing/preprocessing_details#item-value-preprocessing)

🤔

docker run --rm -ti zabbix/zabbix-proxy-sqlite3:alpine-6.4.8 bash
apk info
alpine-baselayout-data
musl
busybox
busybox-binsh
alpine-baselayout
alpine-keys
ca-certificates-bundle
libcrypto3
libssl3
ssl_client
zlib
apk-tools
scanelf
musl-utils
libc-utils
ncurses-terminfo-base
ncurses-libs
readline
bash
fping
libcap2
iputils
ca-certificates
brotli-libs
nghttp2-libs
libcurl
libevent
gdbm
libsasl
libldap
libssh
xz-libs
libxml2
net-snmp-libs
net-snmp-agent-libs
libgcc
lua5.3-libs
libpcap
pcre
libssh2
libstdc++
nmap
libffi
libintl
libblkid
libmount
pcre2
glib
openipmi-libs
sqlite-libs
sudo
tini
traceroute
unixodb

Changed the zabbix-proxy deployment to use the ubuntu-6.4.8 image instead. No more problem. Not 100% sure if I am correct or some strange voodoo here but wanted to report this non the less.

Here the Graph of the Zabbix proxy: Utilization of preprocessing worker internal processes, in %:

image
  1. adad

  2. Adding the Kubernetes Cluster State Template

  3. kubectl -n monitoring rollout restart deployment zabbix-proxy

  4. kubectl -n monitoring rollout restart deployment zabbix-proxy

  5. Delete Host with template Cluster State

  6. Add template again after some tinkering

  7. Delete template again

  8. Add template again after more debugging

  9. kubectl -n monitoring rollout restart deployment zabbix-proxy and later delete host with template again

  10. More debugging add host with template again

  11. Switch to ubuntu-6.4.8 image

zabbix-proxy-sqlite:alpine-6.4.8 Dockerfile - no pthreads: https://github.com/zabbix/zabbix-docker/blob/9eae850a3fe555d531de065f5ec4cf8d0af6b8f9/Dockerfiles/proxy-sqlite3/alpine/Dockerfile#L35-L52

zabbix-proxy-sqlite:ubuntu-6.4.8 Dockerfile:

https://github.com/zabbix/zabbix-docker/blob/9eae850a3fe555d531de065f5ec4cf8d0af6b8f9/Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile#L46

dotneft commented 10 months ago

It is better to register Zabbix bug issue with more technical information what you have and debug data. Actually alpine already has pthreads.

BrutalBirdie commented 10 months ago

Okay thanks for the info, will do that.