Manual:The Dude v6/Functions: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{Versions|v6.34+}} The '''Functions''' pane lists all the functions that can be used in the Dude, for example in Charts. You can o..." |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Versions|v6.34+}} | {{Versions|v6.34+}} | ||
== Overview == | |||
The '''Functions''' pane lists all the functions that can be used in the Dude, for example in [[Manual:The_Dude_v6/Charts#Data_sources|Charts]]. You can open up predefined functions so see how they are written. The function language consists of expressions and formulas, similar to Excel spreadsheet formulas. You can use SNMP OIDs and other values when writing a new function. | The '''Functions''' pane lists all the functions that can be used in the Dude, for example in [[Manual:The_Dude_v6/Charts#Data_sources|Charts]]. You can open up predefined functions so see how they are written. The function language consists of expressions and formulas, similar to Excel spreadsheet formulas. You can use SNMP OIDs and other values when writing a new function. | ||
[[File:Dude-functions-0.JPG]] | [[File:Dude-functions-0.JPG|800px]] | ||
[[File:Dude-functions-1.JPG]] | [[File:Dude-functions-1.JPG]] | ||
== Adding new functions == | |||
=== Check interface status usign SNMP === | |||
Simple command to monitor link state. The last OID digit represents interface number. | |||
<code> | |||
if((oid_raw("1.3.6.1.2.1.2.2.1.8.1")=1),"Running", "Down") | |||
</code> | |||
[[Category:Dude]] | [[Category:Dude]] |
Latest revision as of 12:32, 10 June 2019
Applies to RouterOS: v6.34+
Overview
The Functions pane lists all the functions that can be used in the Dude, for example in Charts. You can open up predefined functions so see how they are written. The function language consists of expressions and formulas, similar to Excel spreadsheet formulas. You can use SNMP OIDs and other values when writing a new function.
Adding new functions
Check interface status usign SNMP
Simple command to monitor link state. The last OID digit represents interface number.
if((oid_raw("1.3.6.1.2.1.2.2.1.8.1")=1),"Running", "Down")