Graphing - Built-in Resource and Traffic Monitoring
Graphing - Built-in Resource and Traffic Monitoring
Section titled “Graphing - Built-in Resource and Traffic Monitoring”TL;DR (Quick Start)
Section titled “TL;DR (Quick Start)”Enable resource and interface graphing, then view in your browser.
# Enable resource graphing (CPU, memory, disk)/tool/graphing/resource add allow-address=0.0.0.0/0
# Enable interface graphing (traffic)/tool/graphing/interface add interface=all allow-address=0.0.0.0/0View graphs at: http://[Router_IP]/graphs/
Overview
Section titled “Overview”What this does: Graphing collects system data over time and displays it as visual graphs accessible via web browser or WinBox. It monitors:
- Resource graphs: CPU usage, memory usage, disk usage
- Interface graphs: Traffic throughput per interface (bytes in/out)
- Queue graphs: Simple queue bandwidth consumption
When to use this:
- Quick visual overview of router performance trends
- Identifying traffic patterns over time (daily, weekly, monthly, yearly)
- Troubleshooting intermittent performance issues
- Basic bandwidth monitoring without external tools
- Showing customers their bandwidth usage (queue graphs)
When NOT to use this:
- Extensive monitoring of hundreds of queues (use SNMP + external tools)
- Devices with very limited flash storage (causes wear)
- Need for data export, alerting, or historical archives
- Multi-device aggregated monitoring
Prerequisites:
- Web service enabled (
/ip/servicewww on port 80) - Network access to router’s web interface
- For queue graphs: simple queues must exist
Menu Reference
Section titled “Menu Reference”| Menu | Purpose |
|---|---|
/tool/graphing | Global settings (store interval, page refresh) |
/tool/graphing/resource | CPU, memory, disk monitoring |
/tool/graphing/interface | Interface traffic monitoring |
/tool/graphing/queue | Simple queue bandwidth monitoring |
Configuration Steps
Section titled “Configuration Steps”Step 1: Enable Resource Graphing
Section titled “Step 1: Enable Resource Graphing”Monitor CPU, memory, and disk usage.
/tool/graphing/resource add allow-address=192.168.88.0/24 store-on-disk=yesParameters:
allow-address=192.168.88.0/24- Only allow viewing from this networkstore-on-disk=yes- Persist data across reboots
Verify:
/tool/graphing/resource printStep 2: Enable Interface Graphing
Section titled “Step 2: Enable Interface Graphing”Monitor traffic on all interfaces or specific ones.
All interfaces:
/tool/graphing/interface add interface=all allow-address=192.168.88.0/24Specific interface only:
/tool/graphing/interface add interface=ether1 allow-address=192.168.88.0/24Verify:
/tool/graphing/interface printStep 3: Enable Queue Graphing (Optional)
Section titled “Step 3: Enable Queue Graphing (Optional)”Monitor simple queue bandwidth usage.
All simple queues:
/tool/graphing/queue add simple-queue=all allow-address=192.168.88.0/24 allow-target=yesSpecific queue:
/tool/graphing/queue add simple-queue=customer1 allow-address=192.168.88.0/24Verify:
/tool/graphing/queue printStep 4: Access Graphs
Section titled “Step 4: Access Graphs”Web Browser:
- Open
http://[Router_IP]/graphs/in your browser - Select the graph type (Resource, Interface, Queue)
- Click on the specific item to view
Direct URLs:
- Resource:
http://[Router_IP]/graphs/ - Specific interface:
http://[Router_IP]/graphs/iface/ether1 - Specific queue:
http://[Router_IP]/graphs/queue/QueueName
WebFig:
- Log into
http://[Router_IP]/webfig - Click menu icon (≡) in top-right
- Select “graphs”
WinBox:
- Navigate to Tools → Graphing
- Double-click an entry to view its graph
Configuration Examples
Section titled “Configuration Examples”Example 1: Basic Setup for Home/Office
Section titled “Example 1: Basic Setup for Home/Office”Enable all graphing with access from any IP:
# Resource monitoring/tool/graphing/resource add allow-address=0.0.0.0/0
# All interfaces/tool/graphing/interface add interface=all allow-address=0.0.0.0/0
# All queues (if using simple queues)/tool/graphing/queue add simple-queue=all allow-address=0.0.0.0/0Example 2: Restrict Access to Management Network
Section titled “Example 2: Restrict Access to Management Network”Only allow viewing from 10.0.0.0/24:
/tool/graphing/resource add allow-address=10.0.0.0/24/tool/graphing/interface add interface=all allow-address=10.0.0.0/24/tool/graphing/queue add simple-queue=all allow-address=10.0.0.0/24Example 3: Reduce Flash Wear on Low-End Devices
Section titled “Example 3: Reduce Flash Wear on Low-End Devices”For devices with limited flash, minimize writes:
# Store data once per day instead of every 5 minutes/tool/graphing set store-every=24hours
# Or disable disk storage entirely (data lost on reboot)/tool/graphing/resource set [find] store-on-disk=no/tool/graphing/interface set [find] store-on-disk=no/tool/graphing/queue set [find] store-on-disk=noExample 4: Monitor Only WAN Interface
Section titled “Example 4: Monitor Only WAN Interface”Only graph the internet-facing interface:
/tool/graphing/interface add interface=ether1-wan allow-address=192.168.88.0/24Example 5: Allow Customers to View Their Queue Graphs
Section titled “Example 5: Allow Customers to View Their Queue Graphs”Let customers see their own bandwidth usage:
# Create queue with customer's IP as target/queue/simple add name=customer1 target=192.168.88.100 max-limit=10M/10M
# Enable queue graphing with allow-target/tool/graphing/queue add simple-queue=customer1 allow-address=192.168.88.0/24 allow-target=yesCustomer at 192.168.88.100 can now view their queue graph at http://[Router_IP]/graphs/queue/customer1
Example 6: Configure Page Auto-Refresh
Section titled “Example 6: Configure Page Auto-Refresh”Set how often the graphs page refreshes:
# Refresh every 60 seconds/tool/graphing set page-refresh=60
# Disable auto-refresh/tool/graphing set page-refresh=neverGlobal Settings Reference
Section titled “Global Settings Reference”| Property | Type | Default | Description |
|---|---|---|---|
store-every | 5min / hour / 24hours | 5min | How often data is saved to disk |
page-refresh | integer / never | 300 | Web page auto-refresh interval (seconds) |
store-every Trade-offs
Section titled “store-every Trade-offs”| Value | Writes/Day | Max Data Loss on Reboot |
|---|---|---|
| 5min | 288 | 5 minutes |
| hour | 24 | 1 hour |
| 24hours | 1 | 24 hours |
Properties Reference
Section titled “Properties Reference”Interface Graphing
Section titled “Interface Graphing”| Property | Type | Default | Description |
|---|---|---|---|
interface | all / name | all | Interface(s) to monitor |
allow-address | IP/IPv6 prefix | 0.0.0.0/0 | IPs allowed to view graphs |
store-on-disk | yes / no | yes | Persist data across reboots |
disabled | yes / no | no | Disable this entry |
comment | string | - | Descriptive comment |
Resource Graphing
Section titled “Resource Graphing”| Property | Type | Default | Description |
|---|---|---|---|
allow-address | IP/IPv6 prefix | 0.0.0.0/0 | IPs allowed to view graphs |
store-on-disk | yes / no | yes | Persist data across reboots |
disabled | yes / no | no | Disable this entry |
comment | string | - | Descriptive comment |
Queue Graphing
Section titled “Queue Graphing”| Property | Type | Default | Description |
|---|---|---|---|
simple-queue | all / name | all | Queue(s) to monitor |
allow-address | IP/IPv6 prefix | 0.0.0.0/0 | IPs allowed to view graphs |
allow-target | yes / no | yes | Allow queue’s target-address to view |
store-on-disk | yes / no | yes | Persist data across reboots |
disabled | yes / no | no | Disable this entry |
comment | string | - | Descriptive comment |
Graph Time Periods
Section titled “Graph Time Periods”Graphs display data across multiple time scales:
| Period | Data Shown | Use Case |
|---|---|---|
| Daily | Last 24 hours (detailed) | Recent activity, troubleshooting |
| Weekly | Last 7 days | Weekly patterns |
| Monthly | Last 30 days | Monthly trends |
| Yearly | Last 365 days | Long-term capacity planning |
Verification
Section titled “Verification”Check 1: Verify Graphing is Configured
Section titled “Check 1: Verify Graphing is Configured”/tool/graphing printExpected: Shows store-every and page-refresh settings.
Check 2: Verify Interface Graphing
Section titled “Check 2: Verify Interface Graphing”/tool/graphing/interface printExpected: List of monitored interfaces with allow-address ranges.
Check 3: Verify Resource Graphing
Section titled “Check 3: Verify Resource Graphing”/tool/graphing/resource printExpected: Entry showing allow-address for resource monitoring.
Check 4: Verify Web Service is Enabled
Section titled “Check 4: Verify Web Service is Enabled”/ip/service print where name=wwwExpected: www service enabled (port 80).
Check 5: Test Web Access
Section titled “Check 5: Test Web Access”Open http://[Router_IP]/graphs/ in browser.
Expected: Graph selection page loads, graphs display data.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Solution |
|---|---|---|
| Graphs page shows title but no graphs | Client IP not in allow-address | Add your IP to allow-address or use 0.0.0.0/0 |
| ”Connection refused” accessing graphs | Web service disabled | Enable: /ip/service enable www |
| HTTPS works but graphs don’t load | RouterOS 7 HTTPS issue | Use HTTP instead of HTTPS for graphs |
| Graph data empty after reboot | store-on-disk=no or long store-every | Set store-on-disk=yes and reduce store-every |
| Only resource graphs visible | Interface/queue graphing not enabled | Add entries to /tool/graphing/interface and /queue |
| Queue graphs visible to wrong users | allow-target=yes with wide target-address | Set allow-target=no or restrict queue target |
| Cannot access graphs through proxy | Transparent proxy intercepts requests | Add router IP to proxy exceptions |
| Concerned about flash wear | Frequent writes with many graphs | Set store-every=24hours or store-on-disk=no |
Common Mistakes
- Forgetting to add graphing entries - By default, graphing is disabled; you must add entries to enable it
- Wrong allow-address - Your client IP must be within the allow-address range to view graphs
- Queue graphs security - If queue target-address is 0.0.0.0/0, anyone can view it regardless of allow-address
- Expecting SNMP-level features - Graphing is basic; no alerting, export, or multi-device aggregation
Limitations
Section titled “Limitations”| Limitation | Description | Workaround |
|---|---|---|
| No external storage | Cannot store on USB/SD card | Use SNMP + external monitoring |
| No data export | Cannot export to CSV/file | Use SNMP for data collection |
| Simple queues only | Queue trees not supported | Monitor parent queues or use SNMP |
| No alerting | Display only, no thresholds | Use scripts with scheduler for alerts |
| Fixed time scales | Cannot customize periods | Accept daily/weekly/monthly/yearly |
| Single router only | No multi-device aggregation | Use The Dude or other NMS |
Related Topics
Section titled “Related Topics”- SNMP Configuration - External monitoring with more features
- Traffic Flow - Detailed traffic analysis and NetFlow export
- Simple Queues - Create queues for queue graphing
- Health Monitoring - Monitor CPU temperature, voltage, fans
- Torch - Real-time traffic inspection (not historical)
- Traffic Monitor - Real-time bandwidth display
Reference
Section titled “Reference”Command Reference
Section titled “Command Reference”| Command | Description |
|---|---|
/tool/graphing print | Show global graphing settings |
/tool/graphing set | Configure store-every and page-refresh |
/tool/graphing/resource add | Enable resource monitoring |
/tool/graphing/resource print | List resource graphing entries |
/tool/graphing/interface add | Enable interface monitoring |
/tool/graphing/interface print | List interface graphing entries |
/tool/graphing/queue add | Enable queue monitoring |
/tool/graphing/queue print | List queue graphing entries |
Summary
Section titled “Summary”Graphing provides built-in visual monitoring for RouterOS:
- Enable monitoring with
/tool/graphing/resource,/interface,/queue - Configure access with
allow-addressparameter - View graphs at
http://[Router_IP]/graphs/ - Manage flash wear with
store-everyandstore-on-disksettings
Key points:
- Graphing is disabled by default - add entries to enable
- Restrict access with
allow-addressfor security - Use
store-every=24hoursorstore-on-disk=noon flash-limited devices - For extensive monitoring, use SNMP with external tools instead
- Queue graphing only works with simple queues, not queue trees