Zabbix Proxy: Difference between revisions

From DWIKI
Tony (talk | contribs)
Tag: wikieditor
Tony (talk | contribs)
mNo edit summary
Tag: wikieditor
 
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Documentation=
=Documentation=
*[https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_proxy Zabbix proxy configuration file]
*[https://www.zabbix.com/documentation/current/en/manual/distributed_monitoring/proxies Zabbix proxies]
*[https://www.zabbix.com/documentation/current/en/manual/distributed_monitoring/proxies Zabbix proxies]
*[https://www.zabbix.com/documentation/current/en/manual/encryption/using_pre_shared_keys Using pre-shared keyss]
*[https://www.zabbix.com/documentation/current/en/manual/encryption/using_pre_shared_keys Using pre-shared keyss]
=HOWTO=
==Monitoring the zabbix proxy==
See https://www.zabbix.com/forum/zabbix-help/506780-zabbix-proxy-monitoring
==Building zabbix proxy on Ubuntu==
===requirements===
apt-get install gcc make libsqlite3-dev zlib1g-dev libevent-dev libpcre3-dev libsnmp-dev libopenipmi-dev libgnutls28-dev libcurl4-gnutls-dev snmp-mibs-downloader libxml2-dev pkg-config fping
On Ubuntu-22.04 i did:
===Get the source===
===Configure===
./configure --enable-agent --enable-proxy --with-sqlite3 --with-openipmi --with-net-snmp --with-gnutls --with-libcurl --with-libxml2
===Error messages===
====Zabbix proxy was compiled without VMware support====
  apt install libxml2-dev
and
--with-libxml2
====configure: error: LIBXML2 library not found====
apt install pkg-config
====You might want a systemd service file====
So create /etc/systemd/system/zabbix-proxy.service
[Unit]
Description=Zabbix Proxy
# After=syslog.target
After=network.target
[Service]
Environment="CONFFILE=/usr/local/etc/zabbix_proxy.conf"
# EnvironmentFile=-/etc/sysconfig/zabbix-proxy
User=zabbix
Group=zabbix
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_proxy.pid
KillMode=control-group
ExecStart=/usr/local/sbin/zabbix_proxy -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
TimeoutSec=0
[Install]
WantedBy=multi-user.target
and run
systemctl daemon-reload
====zabbix-proxy.service: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: Operation not permitted====
make sure PIDFile in system config matches PidFile in zabbix_proxy.conf
===Zabbix proxy with PSK===
On the proxy host:
openssl rand -hex 32 > /etc/zabbix/proxy.psk
====Permissions on TLSPSKFile====
chown zabbix:zabbix /etc/zabbix/proxy.psk
chmod 0400 /etc/zabbix/proxy.psk
Config:
TLSConnect=psk
TLSPSKIdentity=proxy-nss
TLSPSKFile=/etc/zabbix/proxy.psk
# also, even though only applies to passive
TLSAccept=psk
===FAQ===
====systemctl start zabbix-proxy not returning====
No idea why, but rebooting might fix it
=FAQ=
=FAQ=
==zabbix proxy messages==
===cannot send proxy data to server===
====negative response "failed"====
Versions of proxy and server don't match
=== Zabbix proxy poller processes more than 75% busy===
A passive proxy went away?
=== Zabbix does not support SQLite3 database upgrade. ===
Stop the proxy and (re)move the .db file
==Cannot find module (IF-MIB): At line 1 in (none)==
Check /etc/snmp/snmp.conf for
mibs +ALL
and make sure to comment out
mibs:
And
apt-get install snmp-mibs-downloader
==cannot send list of active checks==
==cannot send list of active checks==
See [[Zabbix#cannot_send_list_of_active_checks]]
See [[Zabbix#cannot_send_list_of_active_checks]]
Line 12: Line 114:
Administration->Proxies->Your proxy->Proxy addresses
Administration->Proxies->Your proxy->Proxy addresses


=== Cannot parse heartbeat from active proxy ===
TBD, probably name issue
=== Troubleshoot high queue on proxy ===
*[https://blog.zabbix.com/how-to-troubleshoot-zabbix-proxy-high-queue/12244/ https://blog.zabbix.com/how-to-troubleshoot-zabbix-proxy-high-queue/12244/]
=== cannot send heartbeat message ===
Proxy wrong version?


==Nodata and proxy==
 
===Nodata and proxy===


[https://www.zabbix.com/documentation/5.0/en/manual/introduction/whatsnew500#no-data-triggers-sensitive-to-proxy-availability https://www.zabbix.com/documentation/5.0/en/manual/introduction/whatsnew500#no-data-triggers-sensitive-to-proxy-availability]
[https://www.zabbix.com/documentation/5.0/en/manual/introduction/whatsnew500#no-data-triggers-sensitive-to-proxy-availability https://www.zabbix.com/documentation/5.0/en/manual/introduction/whatsnew500#no-data-triggers-sensitive-to-proxy-availability]




== Zabbix proxy poller processes more than 75% busy==
A passive proxy went away?




==Zabbix poller processes more than 75% busy==


== Zabbix does not support SQLite3 database upgrade. ==
== Zabbix unreachable poller processes more than 75% busy ==
??
 


Stop the proxy and (re)move the .db file
==Zabbix poller processes more than 75% busy==
I've seen this happen when a proxy gets monitored via another proxy.


== [Z3002] cannot create database 'zabbix_proxy': [0] unable to open database file ==
== [Z3002] cannot create database 'zabbix_proxy': [0] unable to open database file ==
Line 36: Line 151:


Probably fresh install, in case of sqlite:
Probably fresh install, in case of sqlite:
mkdir -p /var/lib/zabbix/DB
chown zabbix:zabbix /var/lib/zabbix/DB
In proxy config:
In proxy config:
  DBName=/var/lib/zabbix/zabbix_proxy
  DBName=/var/lib/zabbix/DB/zabbix_proxy
and restart zabbix-proxy
and restart zabbix-proxy


==Zabbix proxy and PSK==


===TLS read fatal alert "unknown PSK identity"===
Could mean you forgot
TLSAccept=psk
in proxy config


== Cannot parse heartbeat from active proxy ==
===The SRP/PSK username is missing or not known===
 
TBD, probably name issue




== Troubleshoot high queue on proxy ==
===SSL alert number 115: TLS read fatal alert "unknown PSK identity"===


*[https://blog.zabbix.com/how-to-troubleshoot-zabbix-proxy-high-queue/12244/ https://blog.zabbix.com/how-to-troubleshoot-zabbix-proxy-high-queue/12244/]


 
===cannot find requested PSK identity===
==TLS read fatal alert "unknown PSK identity"==
On server double check under "Change PSK"
Could mean you forgot
TLSAccept=psk
in proxy config


== poller data processes ==
== poller data processes ==
Line 68: Line 184:


zabbix_proxy -R config_cache_reload
zabbix_proxy -R config_cache_reload
[[Category:Zabbix]]

Latest revision as of 12:00, 9 March 2026

Documentation

HOWTO

Monitoring the zabbix proxy

See https://www.zabbix.com/forum/zabbix-help/506780-zabbix-proxy-monitoring


Building zabbix proxy on Ubuntu

requirements

apt-get install gcc make libsqlite3-dev zlib1g-dev libevent-dev libpcre3-dev libsnmp-dev libopenipmi-dev libgnutls28-dev libcurl4-gnutls-dev snmp-mibs-downloader libxml2-dev pkg-config fping

On Ubuntu-22.04 i did:

Get the source

Configure

./configure --enable-agent --enable-proxy --with-sqlite3 --with-openipmi --with-net-snmp --with-gnutls --with-libcurl --with-libxml2


Error messages

Zabbix proxy was compiled without VMware support

 apt install libxml2-dev

and

--with-libxml2

configure: error: LIBXML2 library not found

apt install pkg-config

You might want a systemd service file

So create /etc/systemd/system/zabbix-proxy.service

[Unit]
Description=Zabbix Proxy
# After=syslog.target
After=network.target
[Service]
Environment="CONFFILE=/usr/local/etc/zabbix_proxy.conf"
# EnvironmentFile=-/etc/sysconfig/zabbix-proxy
User=zabbix
Group=zabbix
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_proxy.pid
KillMode=control-group
ExecStart=/usr/local/sbin/zabbix_proxy -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
TimeoutSec=0
[Install]
WantedBy=multi-user.target

and run

systemctl daemon-reload

zabbix-proxy.service: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: Operation not permitted

make sure PIDFile in system config matches PidFile in zabbix_proxy.conf


Zabbix proxy with PSK

On the proxy host:

openssl rand -hex 32 > /etc/zabbix/proxy.psk 

Permissions on TLSPSKFile

chown zabbix:zabbix /etc/zabbix/proxy.psk
chmod 0400 /etc/zabbix/proxy.psk

Config:

TLSConnect=psk
TLSPSKIdentity=proxy-nss
TLSPSKFile=/etc/zabbix/proxy.psk
  1. also, even though only applies to passive
TLSAccept=psk

FAQ

systemctl start zabbix-proxy not returning

No idea why, but rebooting might fix it

FAQ

zabbix proxy messages

cannot send proxy data to server

negative response "failed"

Versions of proxy and server don't match

Zabbix proxy poller processes more than 75% busy

A passive proxy went away?

Zabbix does not support SQLite3 database upgrade.

Stop the proxy and (re)move the .db file

Cannot find module (IF-MIB): At line 1 in (none)

Check /etc/snmp/snmp.conf for

mibs +ALL

and make sure to comment out

mibs: 

And

apt-get install snmp-mibs-downloader

cannot send list of active checks

See Zabbix#cannot_send_list_of_active_checks

cannot accept connection from proxy

If you see this in server log, check:

Administration->Proxies->Your proxy->Proxy addresses

Cannot parse heartbeat from active proxy

TBD, probably name issue


Troubleshoot high queue on proxy

cannot send heartbeat message

Proxy wrong version?


Nodata and proxy

https://www.zabbix.com/documentation/5.0/en/manual/introduction/whatsnew500#no-data-triggers-sensitive-to-proxy-availability



Zabbix unreachable poller processes more than 75% busy

??


Zabbix poller processes more than 75% busy

I've seen this happen when a proxy gets monitored via another proxy.

[Z3002] cannot create database 'zabbix_proxy': [0] unable to open database file

fix DBName


cannot initialize database: cannot open database

Probably fresh install, in case of sqlite:

mkdir -p /var/lib/zabbix/DB
chown zabbix:zabbix /var/lib/zabbix/DB

In proxy config:

DBName=/var/lib/zabbix/DB/zabbix_proxy

and restart zabbix-proxy

Zabbix proxy and PSK

TLS read fatal alert "unknown PSK identity"

Could mean you forgot

TLSAccept=psk

in proxy config

The SRP/PSK username is missing or not known

SSL alert number 115: TLS read fatal alert "unknown PSK identity"

cannot find requested PSK identity

On server double check under "Change PSK"

poller data processes

StartPollers

cannot obtain data from proxy "proxybox": ZBX_TCP_READ() failed: [104] Connection reset by peer

Could be a proxy configured passive, and it's unreachable

force "sending configuration data to proxy"

zabbix_proxy -R config_cache_reload