docker.recipes

Network Monitoring Stack

intermediate

Complete network monitoring with LibreNMS, Oxidized config backup, and Smokeping

Overview

LibreNMS is a comprehensive open-source network monitoring platform that auto-discovers devices via SNMP and provides detailed performance metrics, alerting, and network visualization. Originally forked from Observium in 2013, LibreNMS has evolved into a community-driven solution supporting thousands of device types from major vendors like Cisco, Juniper, HP, and Dell. The platform excels at monitoring network infrastructure through SNMP polling, providing bandwidth utilization graphs, port status monitoring, and device health tracking. This monitoring stack combines LibreNMS's network discovery capabilities with Oxidized for automated configuration backup and Smokeping for latency monitoring. Oxidized connects to network devices via SSH/Telnet to regularly backup configurations and track changes over time, while Smokeping measures network latency and packet loss through continuous ping monitoring. MariaDB serves as LibreNMS's primary database for storing device information, performance metrics, and historical data, while Redis handles caching and job queuing for the LibreNMS dispatcher service. Network administrators managing enterprise infrastructure, MSPs monitoring client networks, and homelab enthusiasts tracking personal networks will find this stack invaluable. The combination provides complete visibility into network performance, automated change tracking for compliance, and proactive latency monitoring to identify connectivity issues before they impact users. Unlike standalone monitoring tools, this integrated approach correlates device performance with configuration changes and network latency patterns.

Key Features

  • Auto-discovery of network devices via SNMP with support for 3000+ device types including Cisco, Juniper, HP, and Mikrotik
  • Real-time bandwidth monitoring with customizable alerting thresholds for interface utilization and error rates
  • Automated configuration backup through Oxidized with Git-based version control and change detection
  • Continuous latency monitoring via Smokeping with multi-target ping graphs and packet loss tracking
  • LibreNMS dispatcher service for distributed polling across multiple nodes to handle large network infrastructures
  • Integration between LibreNMS and Oxidized for centralized device management and configuration correlation
  • Weathermap plugin support for creating visual network topology diagrams with real-time link utilization
  • Custom OID monitoring for proprietary SNMP metrics and vendor-specific device parameters

Common Use Cases

  • 1Enterprise network monitoring for tracking switch port utilization, router performance, and firewall throughput across multiple sites
  • 2MSP client network management with automated configuration backups for compliance and change tracking
  • 3Data center infrastructure monitoring including server hardware, UPS systems, and environmental sensors
  • 4ISP network operations for monitoring core routers, edge devices, and customer connection quality
  • 5Campus network administration tracking wireless access points, distribution switches, and core infrastructure
  • 6Homelab network monitoring for enthusiasts running complex home networks with VLANs and multiple subnets
  • 7DevOps network visibility for monitoring cloud infrastructure, VPN concentrators, and hybrid connectivity

Prerequisites

  • Docker host with minimum 4GB RAM (LibreNMS requires 2GB+, MariaDB needs 1GB+, additional overhead for other services)
  • Network devices with SNMP v1/v2c/v3 enabled and proper community strings or authentication credentials configured
  • TCP ports 8000, 8081, and 8888 available for LibreNMS, Smokeping, and Oxidized web interfaces respectively
  • SSH/Telnet access credentials for network devices if using Oxidized configuration backup functionality
  • Understanding of SNMP concepts, OIDs, and network device management for proper monitoring configuration
  • Firewall rules allowing SNMP (UDP 161) and ICMP traffic from Docker host to monitored network devices

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 librenms:
3 image: librenms/librenms:latest
4 container_name: librenms
5 restart: unless-stopped
6 ports:
7 - "${LIBRENMS_PORT:-8000}:8000"
8 environment:
9 - TZ=${TZ:-UTC}
10 - PUID=${PUID:-1000}
11 - PGID=${PGID:-1000}
12 - DB_HOST=librenms-db
13 - DB_NAME=librenms
14 - DB_USER=librenms
15 - DB_PASSWORD=${DB_PASSWORD}
16 - REDIS_HOST=librenms-redis
17 volumes:
18 - librenms_data:/data
19 depends_on:
20 - librenms-db
21 - librenms-redis
22
23 librenms-dispatcher:
24 image: librenms/librenms:latest
25 container_name: librenms-dispatcher
26 restart: unless-stopped
27 environment:
28 - TZ=${TZ:-UTC}
29 - PUID=${PUID:-1000}
30 - PGID=${PGID:-1000}
31 - DB_HOST=librenms-db
32 - DB_NAME=librenms
33 - DB_USER=librenms
34 - DB_PASSWORD=${DB_PASSWORD}
35 - REDIS_HOST=librenms-redis
36 - SIDECAR_DISPATCHER=1
37 volumes:
38 - librenms_data:/data
39 depends_on:
40 - librenms
41
42 librenms-db:
43 image: mariadb:10.11
44 container_name: librenms-db
45 restart: unless-stopped
46 environment:
47 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
48 - MYSQL_DATABASE=librenms
49 - MYSQL_USER=librenms
50 - MYSQL_PASSWORD=${DB_PASSWORD}
51 volumes:
52 - librenms_db_data:/var/lib/mysql
53
54 librenms-redis:
55 image: redis:7-alpine
56 container_name: librenms-redis
57 restart: unless-stopped
58
59 oxidized:
60 image: oxidized/oxidized:latest
61 container_name: oxidized
62 restart: unless-stopped
63 ports:
64 - "${OXIDIZED_PORT:-8888}:8888"
65 volumes:
66 - ./oxidized:/home/oxidized/.config/oxidized
67 depends_on:
68 - librenms
69
70 smokeping:
71 image: lscr.io/linuxserver/smokeping:latest
72 container_name: smokeping
73 restart: unless-stopped
74 ports:
75 - "${SMOKEPING_PORT:-8081}:80"
76 environment:
77 - PUID=${PUID:-1000}
78 - PGID=${PGID:-1000}
79 - TZ=${TZ:-UTC}
80 volumes:
81 - ./smokeping/config:/config
82 - smokeping_data:/data
83
84volumes:
85 librenms_data:
86 librenms_db_data:
87 smokeping_data:

.env Template

.env
1# Network Monitoring Stack
2LIBRENMS_PORT=8000
3OXIDIZED_PORT=8888
4SMOKEPING_PORT=8081
5
6# Database
7DB_PASSWORD=librenms_password
8DB_ROOT_PASSWORD=root_password
9
10# User/Group
11PUID=1000
12PGID=1000
13TZ=UTC

Usage Notes

  1. 1LibreNMS at http://localhost:8000
  2. 2Smokeping (latency graphs) at http://localhost:8081
  3. 3Oxidized (config backup) at http://localhost:8888
  4. 4Add network devices in LibreNMS via SNMP
  5. 5Configure Oxidized to backup device configs
  6. 6LibreNMS auto-discovers devices on the network

Individual Services(6 services)

Copy individual services to mix and match with your existing compose files.

librenms
librenms:
  image: librenms/librenms:latest
  container_name: librenms
  restart: unless-stopped
  ports:
    - ${LIBRENMS_PORT:-8000}:8000
  environment:
    - TZ=${TZ:-UTC}
    - PUID=${PUID:-1000}
    - PGID=${PGID:-1000}
    - DB_HOST=librenms-db
    - DB_NAME=librenms
    - DB_USER=librenms
    - DB_PASSWORD=${DB_PASSWORD}
    - REDIS_HOST=librenms-redis
  volumes:
    - librenms_data:/data
  depends_on:
    - librenms-db
    - librenms-redis
librenms-dispatcher
librenms-dispatcher:
  image: librenms/librenms:latest
  container_name: librenms-dispatcher
  restart: unless-stopped
  environment:
    - TZ=${TZ:-UTC}
    - PUID=${PUID:-1000}
    - PGID=${PGID:-1000}
    - DB_HOST=librenms-db
    - DB_NAME=librenms
    - DB_USER=librenms
    - DB_PASSWORD=${DB_PASSWORD}
    - REDIS_HOST=librenms-redis
    - SIDECAR_DISPATCHER=1
  volumes:
    - librenms_data:/data
  depends_on:
    - librenms
librenms-db
librenms-db:
  image: mariadb:10.11
  container_name: librenms-db
  restart: unless-stopped
  environment:
    - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
    - MYSQL_DATABASE=librenms
    - MYSQL_USER=librenms
    - MYSQL_PASSWORD=${DB_PASSWORD}
  volumes:
    - librenms_db_data:/var/lib/mysql
librenms-redis
librenms-redis:
  image: redis:7-alpine
  container_name: librenms-redis
  restart: unless-stopped
oxidized
oxidized:
  image: oxidized/oxidized:latest
  container_name: oxidized
  restart: unless-stopped
  ports:
    - ${OXIDIZED_PORT:-8888}:8888
  volumes:
    - ./oxidized:/home/oxidized/.config/oxidized
  depends_on:
    - librenms
smokeping
smokeping:
  image: lscr.io/linuxserver/smokeping:latest
  container_name: smokeping
  restart: unless-stopped
  ports:
    - ${SMOKEPING_PORT:-8081}:80
  environment:
    - PUID=${PUID:-1000}
    - PGID=${PGID:-1000}
    - TZ=${TZ:-UTC}
  volumes:
    - ./smokeping/config:/config
    - smokeping_data:/data

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 librenms:
5 image: librenms/librenms:latest
6 container_name: librenms
7 restart: unless-stopped
8 ports:
9 - "${LIBRENMS_PORT:-8000}:8000"
10 environment:
11 - TZ=${TZ:-UTC}
12 - PUID=${PUID:-1000}
13 - PGID=${PGID:-1000}
14 - DB_HOST=librenms-db
15 - DB_NAME=librenms
16 - DB_USER=librenms
17 - DB_PASSWORD=${DB_PASSWORD}
18 - REDIS_HOST=librenms-redis
19 volumes:
20 - librenms_data:/data
21 depends_on:
22 - librenms-db
23 - librenms-redis
24
25 librenms-dispatcher:
26 image: librenms/librenms:latest
27 container_name: librenms-dispatcher
28 restart: unless-stopped
29 environment:
30 - TZ=${TZ:-UTC}
31 - PUID=${PUID:-1000}
32 - PGID=${PGID:-1000}
33 - DB_HOST=librenms-db
34 - DB_NAME=librenms
35 - DB_USER=librenms
36 - DB_PASSWORD=${DB_PASSWORD}
37 - REDIS_HOST=librenms-redis
38 - SIDECAR_DISPATCHER=1
39 volumes:
40 - librenms_data:/data
41 depends_on:
42 - librenms
43
44 librenms-db:
45 image: mariadb:10.11
46 container_name: librenms-db
47 restart: unless-stopped
48 environment:
49 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
50 - MYSQL_DATABASE=librenms
51 - MYSQL_USER=librenms
52 - MYSQL_PASSWORD=${DB_PASSWORD}
53 volumes:
54 - librenms_db_data:/var/lib/mysql
55
56 librenms-redis:
57 image: redis:7-alpine
58 container_name: librenms-redis
59 restart: unless-stopped
60
61 oxidized:
62 image: oxidized/oxidized:latest
63 container_name: oxidized
64 restart: unless-stopped
65 ports:
66 - "${OXIDIZED_PORT:-8888}:8888"
67 volumes:
68 - ./oxidized:/home/oxidized/.config/oxidized
69 depends_on:
70 - librenms
71
72 smokeping:
73 image: lscr.io/linuxserver/smokeping:latest
74 container_name: smokeping
75 restart: unless-stopped
76 ports:
77 - "${SMOKEPING_PORT:-8081}:80"
78 environment:
79 - PUID=${PUID:-1000}
80 - PGID=${PGID:-1000}
81 - TZ=${TZ:-UTC}
82 volumes:
83 - ./smokeping/config:/config
84 - smokeping_data:/data
85
86volumes:
87 librenms_data:
88 librenms_db_data:
89 smokeping_data:
90EOF
91
92# 2. Create the .env file
93cat > .env << 'EOF'
94# Network Monitoring Stack
95LIBRENMS_PORT=8000
96OXIDIZED_PORT=8888
97SMOKEPING_PORT=8081
98
99# Database
100DB_PASSWORD=librenms_password
101DB_ROOT_PASSWORD=root_password
102
103# User/Group
104PUID=1000
105PGID=1000
106TZ=UTC
107EOF
108
109# 3. Start the services
110docker compose up -d
111
112# 4. View logs
113docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/network-monitoring-stack/run | bash

Troubleshooting

  • SNMP timeout errors during device discovery: Verify SNMP community strings, check firewall rules allowing UDP 161, and ensure devices have SNMP enabled
  • LibreNMS shows 'DB connection failed': Wait for MariaDB container to fully initialize (can take 2-3 minutes on first run), check DB_PASSWORD environment variable matches
  • Oxidized failing to backup configurations: Verify SSH/Telnet credentials in oxidized config, ensure devices allow management connections from Docker host IP
  • Smokeping graphs not generating data: Check ICMP is not blocked by host firewall, verify target hosts in smokeping config are reachable via ping
  • LibreNMS dispatcher not processing jobs: Restart librenms-dispatcher container, check Redis connectivity, verify proper file permissions on librenms_data volume
  • Web interface loading slowly or timing out: Increase PHP memory limits in LibreNMS container, check if polling intervals are too aggressive for network size

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space