MariaDB Xpand Monitoring with Zabbix
This page is part of MariaDB's Documentation.
The parent of this page is: Monitoring for MariaDB Xpand
Topics on this page:
Install Zabbix
Configure repositories and install Zabbix Server and Front-end
$ sudo rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm $ sudo yum-config-manager --enable rhel-7-server-optional-rpms $ sudo yum install zabbix-server-mysql zabbix-web-mysql
Confirm that MariaDB Enterprise Server is installed correctly:
$ systemctl status mariadb
If MariaDB Enterprise Server is not installed, please refer to Deployment Guide.
Ensure that default character set is utf8 by the following to a MariaDB configuration file:
[mariadb] default_character_set = utf8
Configure Zabbix Server
Perform the following procedure on the MariaDB Enterprise Server node that will store the Zabbix database.
Create user account and grant privileges for Zabbix to use:
CREATE DATABASE zabbix; GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbixpwd';
Import the initial schema and data for Zabbix:
$ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Configure Zabbix to use the database in
/etc/zabbix/zabbix_server.conf
:DBHost = localhost DBName = zabbix DBUser = zabbix DBPassword = zabbixpwd
SELinux Configuration
If SELinux is enabled, allow communication between Zabbix front-end and the MariaDB Enterprise Server node that will store the Zabbix database:
$ sudo setsebool \
-P httpd_can_connect_zabbix=on \
httpd_can_network_connect_db=on
Start Zabbix Server and Front-end
Start services and set to start at boot:
$ sudo systemctl start zabbix-server
$ sudo systemctl enable zabbix-server
$ sudo systemctl start httpd
$ sudo systemctl enable httpd
Configure Zabbix Front-end
Configure Timezone (
/etc/httpd/conf.d/zabbix.conf
)php_value date.timezone America/Los_Angeles
Browse to: http://<zabbix-server-address>/zabbix
Click "Next Step"
Confirm that prerequisites are all correctly installed and click "Next Step"
Configure DB connection fields (use MySQL for Database type) and click "Next Step"
Configure Zabbix server details and click "Next Step"
Review Pre-installation summary and click "Next Step"
Click "Finish"
Configure Zabbix Agent
Perform the following procedure on each Xpand node to install the Zabbix agent.
Create user account for the Zabbix Agent:
GRANT USAGE ON *.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbixpwd';
Configure the Zabbix repository:
$ sudo rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
Install the Zabbix agent:
$ sudo yum install zabbix-agent
Configure the Zabbix agent to communicate with the Zabbix Server in
zabbix_agent.conf
:Server = <zabbix_server_ip> # Zabbix Server IP address ServerActive = <zabbix_server_ip> # Zabbix Server IP address Hostname = <zabbix_server_hostname> # Zabbix hostname
Install Xpand
userparameter_mysql.conf
$ wget <userparameter_mysql.conf> $ cp ~/userparameter_mysql.conf /etc/zabbix/zabbix_agentd.d/
Configure Zabbix login credentials
[client] user=zabbix password=zabbixpwd
Restart Zabbix Agent
$ sudo systemctl restart zabbix-agent