Manual:The Dude v6/Probes: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Versions|v6.34+}}
== Overview ==
The Probes pane shows the available methods of checking for device services. Probes are used when discovering new devices and when polling existing devices.  
The Probes pane shows the available methods of checking for device services. Probes are used when discovering new devices and when polling existing devices.  
{{Versions|v6.34+}}


There is a wide choice of predefined Probes, and you can also add new ones. Double-click an existing Probe to see how it was set up, or to adjust it's settings.  
There is a wide choice of predefined Probes, and you can also add new ones. Double-click an existing Probe to see how it was set up, or to adjust it's settings.  
Line 20: Line 21:
* '''UDP''' - Generic UDP probe, can be used for various protocols. Can send and wait for specific responses
* '''UDP''' - Generic UDP probe, can be used for various protocols. Can send and wait for specific responses


[[File:Dude-probes-add-0.JPG]]
[[File:New_Probe_Dude.png]]
[[File:Dude-probes-add-2.JPG]]
[[File:Dude-probes-add-1.JPG]]


=== Custom probe using a function ===
 
=== Custom function probe ===




Line 50: Line 50:
[[File:Funct3.JPG]]
[[File:Funct3.JPG]]


If you want to use a value from the probe to draw charts, just replace value field code with:
<code>
oid("1.3.6.1.4.1.14988.1.1.3.8.0")
</code>
=== HTTP GET request probe ===
Dude server can be used to monitor the content of host HTTP responses, to determine if the specified server is responding required content:
[[File:GET_Probe.png]]
In this example, the probe will be sent to <MONITORED DEVICE>, using port 9000, and sending GET request on route "/compare". The probe will be considered successful only if response content will contain specified HTTP code, e.g.:
<pre><strong>Response</strong></pre>
If The Dude will not receive this content, the probe will be marked as down.
=== HTTP HEAD request probe ===
To reduce the load on the server, HEAD request can be used to probe HTML server, and compare response status code:
[[File:HEAD_Probe.png]]


In this example, the probe will be sent to <MONITORED DEVICE>, using port 9000, and sending HEAD request on route "/compare".
The probe will be considered successful only when response header will contain specified status code: 200, if The Dude will receive any other code or timeout, the probe will be marked as down


== Recommended resources ==
== Recommended resources ==

Latest revision as of 14:14, 23 April 2019

Applies to RouterOS: v6.34+

Overview

The Probes pane shows the available methods of checking for device services. Probes are used when discovering new devices and when polling existing devices.

There is a wide choice of predefined Probes, and you can also add new ones. Double-click an existing Probe to see how it was set up, or to adjust it's settings.

Adding new probes

There are several probe types, they are:

  • DNS - Sends DNS resolve request with specified name to resolve, and optionally checks if response matches the specified IP addresses (at least one of them)
  • Function - Performs custom functions to decide if service is up. If the device is up, can graph data of another function
  • ICMP - Sends ICMP echo requests (pings) of specified packet size and TTL. Can try a number of times, and specify retry interval.
  • Logic - Logic probe invokes other probes and performs logic operations based on results
  • Random - Randomly decides if service is up, or not. Can specify up chance. Useful for testing.
  • SNMP - Will query specified OID and service will be up, if a response is received and result of comparison is a logical true
  • TCP - Generic TCP probe, can be used for various protocols. Can send and wait for specific responses
  • UDP - Generic UDP probe, can be used for various protocols. Can send and wait for specific responses


Custom function probe

This probe will check the voltage level of monitored device using an SNMP protocol, and trigger alert if voltage level drops below 20 V. To achieve this, follow these 2 steps:

1. Create a new function, which will check the current voltage level, and return 0 if the value drops below 20 V. Custom_Voltage_Function code example:

if((oid("1.3.6.1.4.1.14988.1.1.3.8.0")>19),"1", "0")

2. Create a new probe using this function, where the service will be considered up if the returned value is true (1):

Available: Custom_Voltage_Function()

The error will be trigered if the value is not empty:

Error: if(Custom_Voltage_Function(), "", "down")

The probe is ready, and can be used for device monitoring:

If you want to use a value from the probe to draw charts, just replace value field code with: oid("1.3.6.1.4.1.14988.1.1.3.8.0")

HTTP GET request probe

Dude server can be used to monitor the content of host HTTP responses, to determine if the specified server is responding required content:

In this example, the probe will be sent to <MONITORED DEVICE>, using port 9000, and sending GET request on route "/compare". The probe will be considered successful only if response content will contain specified HTTP code, e.g.:

<strong>Response</strong>

If The Dude will not receive this content, the probe will be marked as down.

HTTP HEAD request probe

To reduce the load on the server, HEAD request can be used to probe HTML server, and compare response status code:

In this example, the probe will be sent to <MONITORED DEVICE>, using port 9000, and sending HEAD request on route "/compare". The probe will be considered successful only when response header will contain specified status code: 200, if The Dude will receive any other code or timeout, the probe will be marked as down

Recommended resources