Apr 29, 2022

Zabbix : Install Zabbix-Agent in CentOS

 1. sudo rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/zabbix-agent-6.0.3-1.el17.x86_64.rpm

* Check for latest version in https://repo.zabbix.com/zabbix.

2. sudo yum update

3. sudo yum install zabbix-agent -y

4. sudo nano /etc/zabbix/zabbix-agentd.conf

        --> Server = [Zabbix Server IP Address]

        --> Hostname = [CentOS hostname]

5. sudo iptables -A INPUT -p tcp -s [Zabbix server IP address] --dport 10050 -m state --state NEW,ESTABLISEHD -j ACCEPT

* If "firewalld" was install, add port 10050 into exception list.

6. sudo systemctl restart zabbix-agent

7. sudo systemctl enable zabbix-agent

8. sudo systemctl status zabbix-agent

9. Continue to add client host into Zabbix server via browser, select --> CentOS with Zabbix Agent


Zabbix : Install Zabbix-Agent in Ubuntu

 1. sudo wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb

* Visit https://repo.zabbix.com/zabbix for latest version.


2. sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb

3. sudo apt-get update

4. sudo apt-get install zabbix-agent -y

5. sudo nano /etc/zabbix/zabbix-agentd.conf

        --> Server = [Zabbix Server IP Address]

        --> ServerActive = [Zabbix Server IP Address]

        --> Hostname = [Ubuntu Client Hostname]


6. sudo systemctl restart zabbix-agent

7. sudo systemctl enable zabbix-agent

8. sudo systemctl status zabbix-agent

9. sudo ufw allow 10050/tcp          * check status --> sudo ufw status

OR --> sudo iptables -A INPUT -p tcp -s [Zabbix server IP address] --dport 10050 -m state --state NEW,ESTABLISEHD -j ACCEPT

* Some firewall may block or NAT the address, thus instead of using the Zabbix server IP address, use the firewall IP address.


10. Use another PC to browse the zabbix server (eg. http://[Zabbix Server IP Address]/zabbix) and login using your admin's credentials.

11. Continue to add the client into the monitoring --> Configuration --> Hosts --> Create Host

        --> Add --> Agent --> Linux with Zabbix Agent


Apr 27, 2022

Batch - IF Calculation

 Batch File Command "IF"

  • EQU = Equal to...
  • NEQ = Not Equal to...
  • LSS = Less than...
  • LEQ = Less than or Equal to...
  • GTR = Greater than...
  • GEQ = Greater than or Equal to...
Example :-

IF %INPUT% EQU 100 ECHO "EQUAL VALUE"
IF %INPUT% GEQ 100 ECHO "VALUE IS GREATER THAN OR EQUAL TO 100"