Setting Up Netmeter: Step-by-Step Installation and Configuration GuideNetmeter is a versatile network monitoring tool designed to measure bandwidth, latency, packet loss, and other performance metrics across devices and links. This guide walks you through installing Netmeter, configuring it for common environments, and using it to collect meaningful data for troubleshooting and capacity planning.
What you’ll learn
- System requirements and supported platforms
- Installation methods (package managers, Docker, from source)
- Initial configuration and security best practices
- Creating and scheduling tests (bandwidth, latency, packet loss)
- Visualizing results and integrating with external tools (Prometheus, Grafana)
- Troubleshooting common issues
1. System requirements and supported platforms
Netmeter is lightweight but benefits from a stable system when running continuous tests or collecting metrics from many agents.
- CPU: 1 core minimum; 2+ recommended for heavy workloads
- RAM: 512 MB minimum; 2 GB+ recommended
- Disk: 1 GB for binaries/logs; more for long-term data retention
- OS: Linux (Debian/Ubuntu, RHEL/CentOS/Fedora), macOS, Windows (via WSL or native build)
- Network: Static IP recommended for server/collector; open ports depend on your configuration (default: 8080 for UI/API; UDP/TCP ports for agent-to-server communication)
2. Installation methods
Choose the method that fits your environment.
A. Install via package manager (Debian/Ubuntu example)
- Update package lists and install prerequisites:
sudo apt update sudo apt install -y curl gnupg lsb-release
- Add Netmeter repository and install (example commands — adapt to actual repo if available):
curl -fsSL https://packages.netmeter.example/gpg | sudo gpg --dearmour -o /usr/share/keyrings/netmeter-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/netmeter-archive-keyring.gpg] https://packages.netmeter.example/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/netmeter.list sudo apt update sudo apt install -y netmeter
B. Install via Docker (recommended for quick setup and isolation)
- Pull the Netmeter image:
docker pull netmeter/netmeter:latest
- Run Netmeter server with persistent storage:
docker run -d --name netmeter -p 8080:8080 -v /opt/netmeter/data:/data netmeter/netmeter:latest
C. Build from source
- Install build tools (example for Linux):
sudo apt install -y git build-essential golang
- Clone and build:
git clone https://github.com/netmeter/netmeter.git cd netmeter make build sudo cp bin/netmeter /usr/local/bin/
3. Initial configuration
After installation, configure Netmeter’s core settings: server address, storage path, authentication, and agent registration.
- Config file location: /etc/netmeter/netmeter.yml (Docker: /data/netmeter.yml)
- Key settings to edit:
- server.listen: address and port (default: 0.0.0.0:8080)
- storage.path: where to persist results
- auth.enabled: true/false; configure API keys or OAuth if available
- agents.allowed_hosts: list or CIDR blocks allowed to connect
Example netmeter.yml snippet:
server: listen: "0.0.0.0:8080" storage: path: "/var/lib/netmeter" auth: enabled: true api_keys: - "REPLACE_WITH_YOUR_KEY" agents: allowed_hosts: - "10.0.0.0/8" - "192.168.1.0/24"
Restart the service after changes:
sudo systemctl restart netmeter
4. Securing Netmeter
- Use TLS for the UI/API. Generate or obtain a certificate and configure:
tls: enabled: true cert_file: "/etc/ssl/netmeter/fullchain.pem" key_file: "/etc/ssl/netmeter/privkey.pem"
- Restrict access with firewall rules (ufw/iptables). Example UFW:
sudo ufw allow from 192.168.1.0/24 to any port 8080 proto tcp sudo ufw deny 8080
- Rotate API keys regularly and use least-privilege scopes for integrations.
5. Deploying agents
Netmeter supports lightweight agents that run on endpoints to measure performance to the server and between agents.
- Install agent (Linux example):
sudo apt install -y netmeter-agent
- Configure agent (/etc/netmeter/agent.yml):
server_url: "https://netmeter.example:8080" api_key: "REPLACE_WITH_AGENT_KEY" agent_name: "office-router-1"
- Start and enable agent:
sudo systemctl enable --now netmeter-agent
Agents can be configured to run scheduled tests, continuous probing, or respond to on-demand tests.
6. Creating and scheduling tests
Netmeter supports several test types:
- Bandwidth (throughput) tests
- Latency (ping/ICMP or TCP)
- Packet loss and jitter
- Path traces (traceroute-like)
Example API payload to create a bandwidth test:
{ "name": "office-to-dc-bandwidth", "type": "bandwidth", "source_agent": "office-router-1", "target_agent": "datacenter-1", "duration_seconds": 30, "parallel_streams": 4 }
Use the UI or curl to schedule:
curl -X POST "https://netmeter.example:8080/api/tests" -H "Authorization: Bearer REPLACE_WITH_YOUR_KEY" -H "Content-Type: application/json" -d @bandwidth-test.json
For recurring tests, use the scheduler settings in the UI or include a cron-like schedule in the test definition.
7. Visualizing results and integrations
- Built-in UI: dashboards for recent tests, agent health, and historical trends.
- Prometheus exporter: enable to scrape metrics and store in Prometheus.
- Grafana: connect to Prometheus or Netmeter’s timeseries API for custom dashboards.
Example Prometheus scrape config:
scrape_configs: - job_name: 'netmeter' static_configs: - targets: ['netmeter.example:9090']
Common dashboards: bandwidth over time, 95th percentile latency, packet loss heatmaps.
8. Alerting and thresholding
Configure alert rules based on metrics (latency > X ms, packet loss > Y%) and integrate with:
- Slack/MS Teams (via webhooks)
- PagerDuty
Example alert rule (conceptual):
- If packet_loss > 1% for 5 minutes → create incident.
9. Troubleshooting
- Agent won’t connect: verify server_url, firewall, and API key. Check agent logs (/var/log/netmeter-agent.log).
- Tests failing intermittently: inspect network MTU, CPU saturation on agents, and concurrent stream limits.
- Incorrect metrics: ensure time sync (NTP) across hosts.
Useful commands:
sudo journalctl -u netmeter -f sudo journalctl -u netmeter-agent -f netstat -tulpen | grep 8080
10. Best practices
- Start with a small set of critical paths and expand.
- Use scheduled tests during low-impact windows; run on-demand tests for troubleshooting.
- Keep agents and server time-synced with NTP.
- Archive older data and use retention policies to manage disk usage.
- Use TLS and restrict API access by network and roles.
Appendix — Example deployment for small office
- Server: Ubuntu 24.04 VM, 2 vCPU, 4 GB RAM, 50 GB disk.
- Install with Docker, expose port 8080 only to office LAN.
- Deploy agents on edge router, two core switches, and main application server.
- Create hourly latency tests and daily 1-minute bandwidth tests between edge router and datacenter agent.
Leave a Reply