How to Deploy Zabbix and SNMP Data Simulation via MQTT on RobustOS Pro

How to Deploy Zabbix and SNMP Data Simulation via MQTT on RobustOS Pro

Overview

When using Robustel's EG series gateways (such as the MG460) running RobustOS Pro, users may need to monitor end-device data using Zabbix via SNMP and MQTT protocols. This comprehensive deployment solution bridges end-devices to a Zabbix server, including a complete test environment with simulated SNMP data. The solution deploys Zabbix Agent 2 on the gateway to collect SNMP data from end-devices (or simulated devices) and forward it via MQTT. This configuration is ideal for maritime VSAT monitoring, industrial IoT applications, or testing environments where physical devices are not yet available.

What You'll Need

Hardware:

 1 × Robustel EG Series Gateway (e.g., MG460, EG5120) with ARM64 architecture.

 1 × End-device supporting SNMP (e.g., Thrane TT7590F) – optional for production.

 Power supply for the gateway.

 Ethernet cables for network connectivity.

Software/Firmware:

 RobustOS Pro firmware (Debian 11 based).

 Zabbix Docker Deployment Script.

 SNMP Simulation Script (for testing environments).

 An SSH client (e.g., PuTTY, Windows Terminal).

Prerequisites:

 You have already created a sudo user account through the RobustOS Pro web interface.

 The gateway has internet access to pull Docker images and Python packages.

 Basic knowledge of the Linux command line, Docker, and Python.

 

Step-by-Step Configuration Guide

Step 1: Access the Gateway via SSH with Sudo User

Before deploying the monitoring solution, you must access the gateway's terminal using a sudo user.

1.  Create a Sudo User:

 Log in to the gateway's WebUI (typically http://192.168.0.1).

 Navigate to System > User Management.

 Click the + button to add a new sudo user, providing a username and a strong password. Save and apply the changes.

 

 Establish SSH Connection:

 Open your SSH client and connect to the gateway's IP address (default 192.168.0.1).

 Use port 22 (default SSH port).

4.  Login:

 Enter the credentials of the sudo user you just created.

 Once logged in, verify you can execute commands with elevated privileges by running:

 sudo whoamiYou should see root as output.

 

Step 2: Prepare the Deployment Environment

The gateway's environment needs to be initialized to support Docker, Zabbix components, and the SNMP simulator.

1.  Check Architecture:

uname -mEnsure the output is aarch64 or arm64. The scripts only work on ARM64 architecture.

2.  Install Docker and System Dependencies:

sudo apt-get update sudo apt-get install -y docker.io docker-compose snmp snmp-mibs-downloader python3 python3-pip mosquitto-clients sudo pip3 install paho-mqtt sudo systemctl start docker sudo systemctl enable docker sudo usermod -aG docker $USER # Add current user to docker groupLog out and back in for group changes to take effect.

 The deployment script will handle this, but you can manually install if needed:

3.  Create Directory Structure:

sudo mkdir -p /zabbix-docker/mibs sudo mkdir -p /zabbix-docker/data/mysql sudo mkdir -p /zabbix-docker/alertscripts sudo mkdir -p /opt/snmp_mqtt sudo mkdir -p /var/log/snmp_simulator sudo chown -R $USER:$USER /zabbix-docker /opt/snmp_mqtt sudo chmod -R 755 /zabbix-docker /opt/snmp_mqtt

Step 3: Deploy Zabbix Stack with MQTT Plugin

Deploy the complete Zabbix monitoring stack including Server, Web Interface, Agent 2 (with MQTT plugin), and MySQL database.

1.  Download the Complete Deployment Script:

 Copy the provided install_zabbix_simulator.sh script to your gateway (e.g., in /home/).

 Make it executable:

2.  chmod +x install_zabbix_simulator.shReview Configuration (Optional):

 Open the script to verify or modify configuration parameters:

 nano install_zabbix_simulator.shKey parameters you might adjust:

 ZABBIX_WEB_PORT: Default 8800 – change if port is already in use

 MQTT_BROKER: Default broker.emqx.io – change to your MQTT server

 END_DEVICE_IP: Default 192.168.0.96 – your end device IP

 MG460_LAN_IP: Default 192.168.0.1 – your gateway IP

3.  Run the Deployment Script:

sudo ./install_zabbix_simulator.shThe script will:

 Verify ARM64 architecture

 Install Docker and dependencies (if not present)

 Configure MIB files for SNMP

 Create directory structure

 Create the SNMP simulator (Python script + helper scripts)

 Create a systemd service for the simulator

 Pull Docker images for Zabbix components

 Generate docker-compose.yml configuration

 Deploy and start all Zabbix containers

 Start the SNMP simulator service

 Verify the deployment

 Create management scripts

4.  Wait for Initialization:

 The script takes approximately 5-10 minutes to complete.

 After completion, wait an additional 1-2 minutes for all services to be fully operational.

 Check status:

cd /zabbix-docker docker-compose ps

Step 4: Understand the SNMP Simulation System

The deployment includes a complete SNMP simulation system that mimics a Thrane TT7590F Maritime VSAT terminal.

1.  Simulator Components:

 Python Script: /opt/snmp_mqtt/snmp_simulator.py – Generates realistic maritime VSAT data

 Systemd Service: snmp-simulator.service – Manages the simulator as a background service

 Monitoring Script: /opt/snmp_mqtt/monitor_mqtt.sh – Subscribes to MQTT topics to verify data flow

 Test Script: /opt/snmp_mqtt/test_simulation.sh – Comprehensive test of the simulation system

2.  Simulated Data Includes:

 System information (uptime, serial number, software version)

 Navigation data (latitude, longitude, altitude, speed)

 Antenna parameters (azimuth, elevation, polarization)

 Modem status (signal strength, lock status)

 Satellite tracking parameters

 Event logging with realistic failure simulations

3.  Data Flow:

4.  SNMP Simulator → MQTT Broker (broker.emqx.io:1883) → Zabbix Agent 2 → Zabbix Server → Zabbix Web InterfaceMQTT Topics Used:

 zabbix/snmp/thrane – Main data channel for simulated Thrane device

 zabbix/# – Wildcard topic that Zabbix Agent 2 subscribes to

 

Step 5: Verify and Test the Complete System

1.  Check Service Status:

2.  # Check Zabbix containers cd /zabbix-docker ./manage_zabbix.sh status # Check SNMP simulator service sudo systemctl status snmp-simulator.service # View simulator logs sudo journalctl -u snmp-simulator.service -fTest MQTT Data Flow:

# Monitor MQTT messages in real-time cd /opt/snmp_mqtt ./monitor_mqtt.shYou should see JSON-formatted SNMP data appearing every 30 seconds.

3.  Access Zabbix Web Interface:

 Open a browser and navigate to http://<gateway-ip>:8800

 Default login: Admin (case-sensitive) / zabbix

 Steps to verify data:

 Go to Configuration → Hosts

 Verify MG460-Gateway is present and showing green "Available" status

 Go to Monitoring → Latest data

 Search for MG460-Gateway to see collected metrics

4.  Run Comprehensive Test Suite:

cd /zabbix-docker ./manage_zabbix.sh test cd /opt/snmp_mqtt ./test_simulation.sh

 

Step 6: Configure for Production (Replace Simulator with Real Device)

Once testing is complete, replace the simulator with real SNMP devices.

1.  Stop the Simulator:

2.  sudo systemctl stop snmp-simulator.service sudo systemctl disable snmp-simulator.serviceConfigure Real SNMP Device:

 Ensure your real device (e.g., Thrane TT7590F) is connected to the network

 Verify SNMP is enabled on the device with correct community strings

 Test SNMP connectivity:

3.  snmpwalk -v 2c -c public 192.168.0.96 # Replace with your device IP and communityUpdate Zabbix Agent 2 Configuration:

 Edit the docker-compose file or create a new configuration for real SNMP monitoring

 Consider using Zabbix's SNMP monitoring capabilities directly through the server

4.  Import Custom MIB Files:

# Copy your device MIB files to cp your-device.mib /zabbix-docker/mibs/ # Restart Zabbix Server to load new MIBs cd /zabbix-docker docker-compose restart zabbix-server

 

Management and Maintenance

Built-in Management Scripts

The deployment creates several management scripts in /zabbix-docker/:

1.  Main Management Script:

2.  cd /zabbix-docker ./manage_zabbix.sh [command] # Available commands: # start - Start all services # stop - Stop all services # restart - Restart all services # status - View service status # logs [service] - View logs # update - Update Docker images # backup - Backup data # test - Run comprehensive test # mqtt-test - Test MQTT connection # help - Show helpSNMP Simulator Management:

3.  # Start/Stop simulator sudo systemctl start snmp-simulator.service sudo systemctl stop snmp-simulator.service # View logs sudo journalctl -u snmp-simulator.service -f # Monitor MQTT messages cd /opt/snmp_mqtt ./monitor_mqtt.shSystem Monitoring Report:

cd /zabbix-docker ./monitor_zabbix.sh # Generates comprehensive system health reportBackup and Restore

1.  Backup All Data:

cd /zabbix-docker ./manage_zabbix.sh backupThis creates a timestamped tar.gz file with all configurations and data.

2.  Manual Backup:

tar -czf zabbix_backup_$(date +%Y%m%d).tar.gz \ /zabbix-docker/data \ /zabbix-docker/mibs \ /zabbix-docker/alertscripts \ /zabbix-docker/docker-compose.yml \ /opt/snmp_mqttUpdates and Upgrades

1.  Update Docker Images:

2.  cd /zabbix-docker ./manage_zabbix.sh updateUpdate SNMP Simulator:

# Stop service sudo systemctl stop snmp-simulator.service # Replace Python script cp new_simulator.py /opt/snmp_mqtt/snmp_simulator.py # Restart service sudo systemctl start snmp-simulator.service

Troubleshooting / FAQ

Q: Docker fails to pull images.

A: Check your internet connection and DNS settings. You can try:

# Test connectivity to Docker registry ping docker.1ms.run # If blocked, change registry in script to official Docker HubQ: Permission denied when running scripts.

A: Ensure scripts are executable and you're using sudo:

sudo chmod +x install_zabbix_simulator.sh sudo ./install_zabbix_simulator.shQ: Zabbix Web is not accessible.

A:

1.  Check if port 8800 is open:

2.  netstat -tlnp | grep :8800Check container status:

3.  cd /zabbix-docker docker-compose psCheck firewall rules on RobustOS Pro WebUI.

Q: SNMP simulator is not sending data.

A:

1.  Check service status:

2.  sudo systemctl status snmp-simulator.serviceCheck logs:

3.  sudo journalctl -u snmp-simulator.service -fTest MQTT connection manually:

mosquitto_pub -h broker.emqx.io -p 1883 -u admin -P admin -t "zabbix/test" -m "test"Q: How to change MQTT broker settings?

A:

1.  Edit the deployment script before running, or

2.  Modify environment variables in /zabbix-docker/docker-compose.yml and restart:

cd /zabbix-docker docker-compose down docker-compose up -dQ: How to add more simulated devices?

A:

1.  Duplicate and modify the Python simulator script

2.  Change the MQTT topic and device parameters

3.  Create a new systemd service file

4.  Ensure Zabbix Agent 2 is subscribed to the appropriate topics

Q: High CPU or memory usage.

A:

 Reduce simulation frequency by increasing INTERVAL in the Python script

 Limit Zabbix polling by adjusting ZBX_STARTPOLLERS in docker-compose.yml

 Monitor resource usage:

docker stats top

Security Considerations

1.  Change Default Passwords:

 Zabbix: Change default Admin/zabbix credentials immediately

 MySQL: Change root and zabbix user passwords in docker-compose.yml

 MQTT: Use authentication or switch to a private broker

2.  Network Security:

 Restrict access to port 8800 (Zabbix Web) using firewall rules

 Consider using VPN for remote access

 Use secure MQTT (MQTTS) with TLS encryption for production

3.  Regular Updates:

 Keep Docker images updated

 Update Python packages regularly

 Apply OS security patches

4.  Backup Strategy:

 Schedule regular backups of Zabbix data

 Store backups off-device

 Test restoration procedures

 

Revision History

Revision

Date

Author

Notes

v1.0

2025‑10‑17

Anson Feng

Initial Release - Zabbix deployment only

v2.0

2025‑11‑05

Doc Team

Added complete SNMP simulation system

v2.1

2025‑11‑12

Doc Team

Enhanced troubleshooting and management

 

Support and Resources

 RobustOS Pro Documentation: Available on Robustel support portal

 Zabbix Documentation: Zabbix documentation

 MQTT Resources: MQTT - The Standard for IoT Messaging

 SNMP Tools: Net-SNMP documentation and community forums

For further assistance, contact:

 Robustel Technical Support: support@robustel.com

 Zabbix Community Forum: Forums - ZABBIX Forums

 

Note: This deployment is designed for testing and development environments. For production deployments, consult with your IT security team and consider additional hardening measures.

 

    • Related Articles

    • How to Deploy Zabbix for SNMP to MQTT Data Forwarding on EG/MG Series

      Overview This guide describes how to manually configure a Robustel EG/MG series gateway (running RobustOS Pro) to act as an SNMP collector and MQTT forwarder. By deploying Zabbix Server and Agent 2 via Docker, the gateway can poll data from local ...
    • How to Configure APN on RobustOS Pro Gateways (EV8100, EG5100 Series, R1520LG, LG5100, EG5200, MG460)

      Overview This guide provides step-by-step instructions for configuring a custom Access Point Name (APN) on Robustel gateways running the RobustOS Pro system, including models such as EV8100, EG51xx series, R1520LG, LG5100, EG5200, and MG460. It ...
    • How to Read S6000U Data via EG5120 and Send to Blynk Cloud by MQTT

      1. Overview This guide outlines the integration of the S6000U multi-sensor (Temperature, Humidity, Light, Noise, etc.) with the Blynk Cloud platform via the Robustel EG5120 Industrial Edge Gateway. Architecture: Field Layer: The S6000U sensor ...
    • RobustOS Pro SDK

      Robustel's router allows 3rd party to develop their applications. We provide a Software Development Kit (SDK), which offers a simple and fast way to implement customer-specific functions and applications. This SDK is compatible with EG5100, LG5100, ...
    • RobustOS Pro Third-Party Application Development Guide

      1. Quick Overview What is RobustOS Pro? RobustOS Pro is an embedded Linux distribution based on Debian 11 (bullseye), designed specifically to meet the demanding requirements of industrial IoT gateways, providing a high degree of customization and ...