Posts

Showing posts from May, 2025

Zabbix API calls

To check API version  Option 1: As per Zabbix doc curl --request POST \          --url 'http://34.42.61.202/zabbix/api_jsonrpc.php' \          --header 'Content-Type: application/json-rpc' \          --data '{"jsonrpc":"2.0","method":"apiinfo.version","params":{},"id":1}' Option 2:  curl -X POST \   -H "Content-Type: application/json" \   -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":{},"id":1}' \   http://34.42.61.202/zabbix/api_jsonrpc.php ----------------------------------------------------------------------------------------------------------------------------- To authenticate the user Option 1: As per Zabbix doc curl --request POST \   --url 'http://34.42.61.202/zabbix/api_jsonrpc.php' \   --header 'Content-Type: application/json-rpc' \   --data '{"jsonrpc":"2.0","me...

Zabbix built-in HA Vs Pacemaker/corosync

 Built-in HA in Zabbix Since Zabbix 7.0, Zabbix Server has built-in high availability (HA) support. This means: You can run multiple Zabbix server nodes. Only one is active at a time. The others are standby and can take over if the active one fails. Failover is handled internally by Zabbix, using database coordination (it stores node status in the DB). So why Pacemaker and Corosync then? You don’t need Pacemaker + Corosync for the Zabbix Server itself anymore if you’re using built-in HA. However, there are still scenarios where Pacemaker/Corosync may be useful: When to Use Pacemaker/Corosync Database Failover: Zabbix’s built-in HA does not handle database HA. Pacemaker/Corosync can manage MySQL/MariaDB/PostgreSQL clusters with automatic failover.        2. Frontend High Availability: Zabbix frontend (Apache/Nginx + PHP) does not have built-in HA. You can use Pacemaker/Corosync (or HAProxy/Keepalived) to manage failover of frontend nodes and virtual IPs.   ...

Zabbix in built HA Setup: 2 core, frontend, DB

 On Frontend Server Step1: Add the Zabbix repo rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rhel/8/x86_64/zabbix-release-latest-7.0.el8.noarch.rpm dnf clean all Step2:    Switch DNF module version for PHP dnf module switch-to php:8.2 Step3:   Install frontend, agent dnf install zabbix-web-mysql zabbix-apache-conf zabbix-selinux-policy zabbix-agent Step4: Go to the pat /etc/zabbix/web/zabbix.conf.php,  if it is not there then copy from where it is cp /usr/share/zabbix/conf/zabbix.conf.php.example /etc/zabbix/web/zabbix.conf.php If /etc/zabbix/web/ doesn’t exist, create it first: mkdir -p /etc/zabbix/web/ cp /usr/share/zabbix/conf/zabbix.conf.php.example /etc/zabbix/web/zabbix.conf.php Step5: Open it now  vi /etc/zabbix/web/zabbix.conf.php Add the following lines DB['TYPE']                             = 'MYSQL'; $DB['SERVER']                ...