Skip to main content

The Dude

For being mostly free (at most $45), Mikrotik's The Dude monitoring system is on of the most useful network monitoring tools any IT group could possibly deploy.

Here's some customizations I regularly use.

Notifications

Templates

The are notification template customizations I use.

Email

Subject

[Service.Status] [Probe.Name] on [Device.Name] (Map: [Device.NetMaps])

Body

Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])
Map: [Device.NetMaps]
Address: [Device.AddressesCommaList] ([Device.FirstDnsName])
Custom Field 1: [Device.CustomField1]
Custom Field 2: [Device.CustomField2]
Custom Field 3: [Device.CustomField3]
Notes:
[Device.NotesCommaList]
log to events
[Service.Status] [Probe.Name] on [Device.Name] - [Device.FirstAddress] ([Device.FirstDnsName]) - ([Service.ProblemDescription]) - (Map: [Device.NetMaps])
log to events - csv
"[Device.NetMaps]","[Device.Name]","[Device.FirstAddress]","[Device.FirstDnsName]","[Probe.Name]","[Service.Status]","[Service.ProblemDescription]"
log to events - json
{"map":"[Device.NetMaps]", "device":"[Device.Name]", "firstAddress":"[Device.FirstAddress]", "firstDNSName":"[Device.FirstDnsName]", "probe":"[Probe.Name]", "status":"[Service.Status]", "problemDescription":"[Service.ProblemDescription]"}

Functions

snmp_link_info()
if (
string_size(oid(concatenate("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.", link_index() ), 300, 600)),
concatenate(
concatenate("if:", link_index(), " - "),
oid(concatenate("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.",link_index()), 60),
"
Admin ",
oid(concatenate("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.",link_index()), 60),
", Oper ",
oid(concatenate("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.",link_index()), 60),
"
Last change: ",
oid(concatenate("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.",link_index()), 60),
"",
"
"
)
,
""
)

apc_ats_output_current

oid("1.3.6.1.4.1.318.1.1.8.5.4.3.1.4.1.1.1") * 0.1

apc_ats_output_voltage

oid_raw("1.3.6.1.4.1.318.1.1.8.5.4.3.1.3")

apc_ats_redundancy_status

Description: 1 = Not Redundant, 2 = Redundant
Code:
oid("1.3.6.1.4.1.318.1.1.8.5.1.3")

apc_ats_redundancy_status_text

Description: 1 = Not Redundant, 2 = Redundant
Code:
if(apc_ats_redundancy_status() = 2,"Not Redundant","Redundant")

apc_ats_selected_source

Description: 1 = Source A, 2 = Source B
Code:
oid("1.3.6.1.4.1.318.1.1.8.5.1.2")

apc_ats_selected_source_text

Description: 1 = Source A, 2 = Source B
Code:
if(apc_ats_selected_source() = 2,"Source B","Source A")

displayCustomField1

if(string_size(device_property("CustomField1")) > 0,concatenate(device_property("CustomField1"),"
"),"")

displayCustomField2

if(string_size(device_property("CustomField1")) > 0,concatenate(device_property("CustomField1"),"
"),"")

displayCustomField3

if(string_size(device_property("CustomField3")) > 0,concatenate(device_property("CustomField3"),"
"),"")

displayCustomFields12

concatenate(
if(string_size(device_property("CustomField1")) > 0,concatenate(device_property("CustomField1"),"
"),""),
if(string_size(device_property("CustomField2")) > 0,concatenate(device_property("CustomField2"),"
"),"")
)

displayCustomFields123

concatenate(
if(string_size(device_property("CustomField1")) > 0,concatenate(device_property("CustomField1"),"
"),""),
if(string_size(device_property("CustomField2")) > 0,concatenate(device_property("CustomField2"),"
"),""),
if(string_size(device_property("CustomField3")) > 0,concatenate(device_property("CustomField3"),"
"),"")
)

procurve_uptime

oid_column("1.0.8802.1.1.2.1.2.1.0")

ups_alarm_status

oid_raw("iso.org.dod.internet.mgmt.mib-2.upsMIB.upsObjects.upsAlarm.upsAlarmPresent")

ups_battery_estimatedChargeRemaining_raw

if(ups_status_available(), oid_raw("1.3.6.1.2.1.33.1.2.4.0"), 0)

ups_battery_estimatedMinutesRemaining_raw

if(ups_status_available(), oid_raw("1.3.6.1.2.1.33.1.2.3.0"), 0)

ups_battery_status

if(ups_status_available(), oid("1.3.6.1.2.1.33.1.2.1.0"), "None")

ups_battery_status_raw

if(ups_status_available(), oid_raw("1.3.6.1.2.1.33.1.2.1.0"), 0)

ups_output_load_percentage_raw

if(ups_status_available(), oid_raw("1.3.6.1.2.1.33.1.4.4.1.5.1"), 0)

ups_status

oid("iso.org.dod.internet.mgmt.mib-2.upsMIB.upsObjects.upsAlarm.upsAlarmPresent")

ups_status_available

array_size(oid_column("iso.org.dod.internet.mgmt.mib-2.upsMIB.upsObjects.upsAlarm"))

ups_status_show

concatenate(
if(ups_status_available(), concatenate("UPS: ",
  oid("1.3.6.1.2.1.33.1.2.1.0"),
  " (",
  oid("1.3.6.1.2.1.33.1.2.4.0"),
  "% / ",
  oid("1.3.6.1.2.1.33.1.2.3.0"),
  " minutes)
"), ""),
"")

 

Probes

ups_output_load

Name: ups_output_load
Type: Function
Agent: default
Available: ups_status_available()
Error: if(ups_battery_status_raw() <> 2, ups_battery_status(), "")
Value: ups_output_load_percentage_raw()
Unit: status

ups_status

Name: ups_status
Type: Function
Agent: default
Available: ups_status_available()
Error: if(ups_battery_status_raw() <> 2, ups_battery_status(), "")
Value: ups_battery_status_raw()
Unit: status

 

 

 

 

#end