Manual:The Dude v6/Charts
Adding new charts
The Charts pane allows you to set up visual area charts to represent any data that is available to The Dude. Click on the Add button to make a new chart.
The Dude will automatically offer existing data sources that are known from the Devices you have created. Simply choose one or more data sources for your new chart, and click OK to finalize the setup. All created charts will be listed in the Charts pane. You can open any chart for viewing from the lefthand menu or from the list in the Charts pane.
In the Data sources tab you can add new sources of Data that have not been previously known from the added device polling mechanisms. You can also specify the amount of time that specific data ranges will be kept in the Dude database. The Dude will show approximate amount of space they will take up.
When adding a new Data Source, you will be asked for Code, which is a scripting language of the same kind that is used in the Dude Functions. See examples in the Functions section.
Function code example
Use ros_command function, to execute command in RouterOS, get output value, and create a chart from these values.
First click Charts -> Data Sources -> [+] to create a new one
Add name, choose device from where data will be collected, and enter code.
Code to check wireless transmit speed:
ros_command(":put ((([/interface monitor-traffic wlan1 once as-value]->\"tx-bits-per-second\")/1000)/100);")
Code to check nummber of connected devices to wlan1 interface:
ros_command("/interface wireless registration-table print count-only where interface=wlan1")
It's possible to get any value you need, simply modify ros_command() code.