Manual:The Dude v6/Charts: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
(Created page with "{{Versions|v6.34+}} == Adding new charts == File:Dude-charts-0.JPG The Charts pane allows you to set up visual area charts to represent any data that is available to Th...")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
== Adding new charts ==
== Adding new charts ==


[[File:Dude-charts-0.JPG]]
[[File:Dude-charts-0.JPG|800px]]


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 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.  
Line 9: Line 9:
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.
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.


[[File:Dude-charts-1.JPG]]
[[File:Dude-charts-1.JPG|800px]]


== Data sources ==  
== Data sources ==  
Line 17: Line 17:
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 [[Manual:The_Dude_v6/Functions|Functions]]. See examples in the Functions section.  
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 [[Manual:The_Dude_v6/Functions|Functions]]. See examples in the Functions section.  


[[File:Dude-charts-2.JPG]]
[[File:Dude-charts-2.JPG|800px]]
 
== 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:
 
<pre> ros_command(":put ((([/interface monitor-traffic wlan1 once as-value]->\"tx-bits-per-second\")/1000)/100);") </pre>
Code to check nummber of connected devices to wlan1 interface:
 
<pre> ros_command("/interface wireless registration-table print count-only where interface=wlan1") </pre>
 
It's possible to get any value you need, simply modify '''ros_command()''' code.
 
== SNMP example ==
 
To use SNMP as data source, create new data source, specify device, add OID:
 
<pre> oid("1.3.6.1.4.1.14988.1.1.3.10.0") </pre>
 
Or use snmpwalk, select OID you want to monitore -> right click -> create data source. The code should look like this:
 
<pre> oid_raw("1.3.6.1.4.1.14988.1.1.3.10.0", 5, 5, "172.16.4.21", "v2-public") </pre>


[[Category:Dude]]
[[Category:Dude]]

Latest revision as of 16:32, 8 February 2017

Version.png

Applies to RouterOS: v6.34+

Adding new charts

Dude-charts-0.JPG

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.

Dude-charts-1.JPG

Data sources

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.

Dude-charts-2.JPG

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.

SNMP example

To use SNMP as data source, create new data source, specify device, add OID:

 oid("1.3.6.1.4.1.14988.1.1.3.10.0") 

Or use snmpwalk, select OID you want to monitore -> right click -> create data source. The code should look like this:

 oid_raw("1.3.6.1.4.1.14988.1.1.3.10.0", 5, 5, "172.16.4.21", "v2-public")