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
xmllintis 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-clientis 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.shdepends on where you've cloned this repo.HOST_WHERE_CH_IS_RUNNINGis optional parameter, in case none specifiedlocalhostwould be usedADDITIONAL CLICKHOUSE-CLIENT PARAMSis optional string appended to any clickhouse-client call. Useful if authorization or ssl required
And finally
- Import
zbx_clickhouse_template.xmlin zabbix (zabbix -> Configuration -> Templates -> Import).