Services DevOps DevSecOps Cloud Consulting Infrastructure Automation Managed Services AIOps MLOps DataOps Microservices 🔐 Private AINEW Solutions DevOps Transformation CI/CD Automation Platform Engineering Security Automation Zero Trust Security Compliance Automation Cloud Migration Kubernetes Migration Cloud Cost Optimisation AI-Powered Operations Data Platform Modernisation SRE & Observability Legacy Modernisation Managed IT Services 🔐 Private AI DeploymentNEW Products ✨ ZippyOPS AINEW 🛡️ ArmorPlane 🔒 DevSecOpsAsService 🖥️ LabAsService 🤝 Collab 🧪 SandboxAsService 🎬 DemoAsService Bootcamp 🔄 DevOps Bootcamp ☁️ Cloud Engineering 🔒 DevSecOps 🛡️ Cloud Security ⚙️ Infrastructure Automation 📡 SRE & Observability 🤖 AIOps & MLOps 🧠 AI Engineering 🎓 ZOLS — Free Learning Company About Us Projects Careers Get in Touch

Installing & Configuring Zabbix Agent for Remote Monitoring

Installing and Configuring Zabbix Agent for Remote Monitoring

Zabbix is a powerful open-source monitoring tool that enables businesses to track their IT infrastructure’s health, performance, and availability. Installing the Zabbix agent is a key step in monitoring remote systems. In this guide, we will walk you through the process of installing and configuring the Zabbix agent on both Linux and Windows servers. Additionally, we’ll discuss how to secure your connection with pre-shared keys and integrate it smoothly into your monitoring setup.

Installing and configuring Zabbix agent on Linux and Windows servers for remote monitoring

Steps to Install Zabbix Agent on Linux

  1. Install the Zabbix Repository
    Begin by logging into the remote machine you want to monitor. Download the repository configuration file with this command: wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
  2. Install the Zabbix Repository File
    After downloading the file, install it with the following command: sudo dpkg -i zabbix*all.deb
  3. Install the Zabbix Agent
    Update your package list and install the Zabbix agent with these commands: sudo apt-get update sudo apt-get install zabbix-agent

Configuring the Zabbix Agent

  1. Generate Pre-shared Key
    For secure communication between the Zabbix agent and server, generate a pre-shared key using OpenSSL: sudo sh -c "openssl rand -hex 32 > /etc/zabbix/zabbix_agentd.psk" cat /etc/zabbix/zabbix_agentd.psk
  2. Edit the Zabbix Agent Configuration
    Open the Zabbix agent configuration file with the following command: sudo vi /etc/zabbix/zabbix_agentd.conf
    • Change the Server parameter to the IP address of your Zabbix server (e.g., Server=ZABBIX_MONITOR).
    • Scroll to the TLSConnect section and update it to psk for secure communication.
    • In the TLSPSKIdentity section, enter a unique identifier like PSK 001.
    • Point the TLSPSKFile to the generated pre-shared key file:
    TLSConnect=psk TLSPSKIdentity=PSK 001 TLSPSKFile=/etc/zabbix/zabbix_agentd.psk
  3. Restart the Zabbix Agent
    After making the necessary changes, restart and enable the Zabbix agent: systemctl start zabbix-agent systemctl enable zabbix-agent

Adding Hosts to the Zabbix Monitor

To add a remote server as a monitored host in Zabbix, follow these steps:

  1. Log in to your Zabbix server and go to Configuration > Hosts.
  2. Click the Create Host button and provide the relevant hostname and IP address for your remote server.
  3. Add the host to a group (e.g., Linux Servers).
  4. Under the Templates tab, search for Template OS Linux and add it.
  5. In the Encryption tab, select PSK for both the Connections to Host and Connections from Host sections. Then, enter the pre-shared key (PSK 001).
  6. Click Add or Update to finalize the host setup.

Once everything is correctly configured, the remote host should appear with a green status, indicating that the connection is secure and the agent is sending data to the server.


Installing Zabbix Agent on Windows

To monitor Windows servers with Zabbix, follow these steps:

  1. Download the Zabbix Agent for Windows
    Visit the official Zabbix website to download the Zabbix agent for Windows. Save it to your Downloads folder.
  2. Configure the Zabbix Agent
    Open the zabbix_agentd.conf file and modify the following parameters: Server= ServerActive= Hostname=
  3. Install and Start the Zabbix Agent
    Run the following commands from the Windows command prompt (with administrator privileges): C:\Users\windows\Downloads\bin\zabbix_agentd.exe --config C:\Users\windows\Downloads\bin\zabbix_agentd.exe --start
  4. Verify the Agent is Running
    Go to Windows Services and ensure the Zabbix agent is running.

Configuring Windows Firewall for Zabbix Agent

By default, the Windows firewall may block incoming and outgoing connections required for Zabbix. To allow communication:

  1. Allow ICMP protocol for network communication: netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol="icmpv4:8,any" dir=in action=allow
  2. Open the default Zabbix port (10050) on the firewall: netsh advfirewall firewall add rule name="Open Port 10050" dir=in action=allow protocol=TCP localport=10050

Adding a Windows Host to the Zabbix Server

  1. On your Zabbix server, navigate to Configuration > Hosts and click Create Host.
  2. Provide the necessary details for your Windows host, such as hostname, visible name, and IP address.
  3. Under the Templates tab, search for Template OS Windows by Zabbix agent and select it.
  4. The Windows host should now be listed with a green ZBX icon, indicating that it’s properly monitored.

To graph system metrics like CPU, memory, disk usage, and network statistics, go to Monitoring > Hosts, select the Windows host, and click Graphs.


ZippyOPS: Enhancing Your Infrastructure Monitoring

While setting up Zabbix provides robust monitoring capabilities, consider optimizing your DevOps and IT operations with ZippyOPS. ZippyOPS offers consulting, implementation, and managed services to streamline infrastructure management and security. Whether you’re implementing DevOps, DevSecOps, DataOps, or AIOps, ZippyOPS has the expertise to ensure seamless performance.

Explore ZippyOPS solutions for automating workflows, enhancing security, and deploying microservices at scale. You can also leverage cloud solutions and MLOps to further enhance your monitoring and operational efficiency. Learn more about our services on the ZippyOPS website or discover our products.

For a personalized consultation, reach out to us at sales@zippyops.com.


Conclusion

By following these steps, you can successfully install, configure, and secure the agent on both Linux and Windows servers. With Zabbix in place, you’ll be able to monitor critical system metrics effectively. For businesses looking to take their infrastructure management to the next level, integrating solutions like those offered by ZippyOPS can provide additional support in optimizing your DevOps, cloud, and security strategies.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top