Required Zabbix Server version - 3.4+ For zabbix 5.0+ please use official Zabbix ClickHouse integration used http_agent
How to set up server with Zabbix agent:
- Ensure
xmllint
is installed- for Debian\Ubuntu
apt-get install -y libxml2-utils
- for CentOS / Fedora
yum install -y libxml2
- for OpenSUSE
yum install -y libxml2-tools
- for Debian\Ubuntu
- Ensure
clickhouse-client
is installed and allow access to monitored ClickHouse server - Clone this repo.
- Edit
/etc/zabbix/zabbix_agentd.conf
. Add the following line:
UserParameter=ch_params[*],bash /PATH/TO/zbx_clickhouse_monitor.sh "$1" "HOST_WHERE_CH_IS_RUNNING" "ADDITIONAL CLICKHOUSE-CLIENT PARAMS"
where:
/PATH/TO/zbx_clickhouse_monitor.sh
depends on where you've cloned this repo.HOST_WHERE_CH_IS_RUNNING
is optional parameter, in case none specifiedlocalhost
would be usedADDITIONAL CLICKHOUSE-CLIENT PARAMS
is optional string appended to any clickhouse-client call. Useful if authorization or ssl required
And finally
- Import
zbx_clickhouse_template.xml
in zabbix (zabbix -> Configuration -> Templates -> Import).