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