Home Blog About Me Resume

Zabbix SNMP Project

Introduction

This paper will explain SNMP, its importance in network management, how it works, and discuss SNMP features in several monitoring products, both commercial and open-source. It also covers the installation of an open-source monitoring tool and security considerations.

SNMP (Simple Network Management Protocol) is a protocol for monitoring and managing network devices. It’s essential for network information gathering and management.

Understanding SNMP

SNMP operates by placing software agents on devices to monitor them. These agents communicate with the Network Management System (NMS), providing device information and status. The NMS, also known as the SNMP manager, is an interface for privileged users to send commands and receive alerts.

SNMP uses the Management Information Base (MIB) to organize device information with Object Identifiers (OIDs). Key SNMP commands include:

Each SNMP command requires a community string, serving as a password for different permissions. The latest SNMP version (v3) includes security algorithms like MD5, SHA, and DES.

Comparison

Commercial Monitoring Products

Product Price SNMP Versions GUI Rating Alert Capabilities Support
SolarWinds $27 - $50/month Any 9/10 Yes Yes
ManageEngine OP Manager $245 - $11,545/year Any 5/10 Yes Yes
Data Dog Free - $34/month Any 10/10 Yes Paid support
Logic Monitor $22/month Any 8/10 Yes Yes
What's Up Gold $2,740 for 25 devices Any 8/10 Yes Yes

Open-Source Monitoring Projects

Product Price SNMP Versions GUI Rating Alert Capabilities Support
LibreNMS Free 1 & 3 6/10 Yes Community support
Zabbix Free Any 10/10 Yes Paid support
Prometheus Free Any 9/10 Yes Paid support
Observium Free - $1,400/year Any 6/10 Yes Paid support
Nagios $3,000 - $24,000 Any 4/10 Yes Yes

Installing an Open-Source Monitoring Tool

After research, I selected Zabbix for my home network. I chose SNMP v3 for secure network monitoring.

Installation Steps

  1. Create a Ubuntu Server VM on Proxmox and update it.
  2. Creating Ubuntu Server VM
    Creating Ubuntu Server VM
  3. Choose Ubuntu platform, select MySQL as the database, and Apache as the web server.
  4. Zabbix Setup Selection
    Zabbix Setup Selection
  5. Install Zabbix repository:
  6. # wget https://repo.zabbix.com/zabbix/6.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.5-1+ubuntu22.04_all.deb
    # dpkg -i zabbix-release_6.5-1+ubuntu22.04_all.deb
    # apt update
            
  7. Install Zabbix server, frontend, and agent:
  8. apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
  9. Install MySQL server:
  10. sudo apt-get install mysql-server
    sudo systemctl start mysql
  11. Create the initial database:
  12. mysql -uroot -p
    mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
    mysql> create user zabbix@localhost identified by 'password';
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    mysql> quit;
  • Import Zabbix's initial schema and data:
  • 
    sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz 
              | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
            
  • Disable log_bin_trust_function_creators:
  • 
    sudo mysql
    mysql> set global log_bin_trust_function_creators = 0;
    mysql> quit;
            
  • Configure the Zabbix server configuration file:
  • sudo nano /etc/zabbix/zabbix_server.conf

    Set the password:

    DBPassword=password

    Starting Zabbix and Accessing the UI

    1. Start and enable Zabbix services:
    2. # systemctl restart zabbix-server zabbix-agent apache2
      # systemctl enable zabbix-server zabbix-agent apache2
    3. Open Zabbix UI at http://host/zabbix.
    4. Follow the prompts to set up your Zabbix front-end:
      • Enter your database password.
      • Select your timezone, server name, and theme.
      • Complete the installation and log in using the default credentials: Admin / zabbix.
      Zabbix Front-End Complete
      Completed Zabbix Front-End Installation

    Adding Hosts

    1. Download the Zabbix agent for Windows:
    2. Visit https://www.zabbix.com/download_agents to download the appropriate agent.

    3. Configure the agent with the correct server IP and hostname.
    4. Add the host to Zabbix under "Data Collection" > "Hosts."
    5. Adding Host in Zabbix
      Adding a Host in Zabbix

    Security Considerations

    When using SNMP, ensure devices use SNMP v3 for secure data transmission. Additionally, change the default Zabbix credentials from Admin/zabbix to a unique username and password.

    Setting Up Alerts

    1. Navigate to the Alerts tab > Actions > Trigger Actions.
    2. Select "Report problems to Zabbix admins" and configure conditions:
      • Add condition: Host Groups > Windows Server
      • Set severity: greater than or equal to "Average"
      • Add tag: Env = production
    3. Under Operations, configure notifications:
      • Send alert to Admin
      • Set up recovery operation to notify Admin on recovery
      Configuring Alerts in Zabbix
      Configuring Alerts in Zabbix

    Conclusion

    Zabbix offers robust SNMP monitoring with a high level of customization and flexibility. Through my setup experience, I found that Zabbix's extensive monitoring capabilities and customization options make it an excellent choice for SNMP monitoring in a home network environment.

    Work Cited