How to add additional information under the device icon in the Mikrotik Dude?

The Mikrotik Dude is a powerful framework for the network monitoring process. You can use it out-of-the box or you can customize it. Customization is very easy and it will improve your experience.

I already explained to you how to add your own testing probe in this post. Today I want to show you a simple trick that will boost the user experience. I will explain to you how to add more lines of the text below the device icon on the network map.

Whenever you add new device on the map, you will mostly have 2 lines of an information under the icon of the device type. The icon of the device type is a simplified drawing that should represent the main function of the device, like a router or an e-mail server.

Before I continue, a word to the wise. Always add devices manually on the map. The auto-discovery can make a mess. Bear this in mind.

First line of the text below this image will contain a device name. This information is a free text that you typing as its name when you adding device. It looks like “FTP server”, “AP10 on 3. Floor” or “HP Printer in Marketing”.

Second line will appear only if the Dude can check a device with the SNMP protocol. That second line will then contains an information about the CPU load, free disk space and the memory utilization. Depending on the device type, there can be up to four parameters.

If the device has any problems, that will be displayed in the third line. In that case the background color will change from green to orange (for partial functionality) or red (complete malfunction of the device).

In many cases we will be satisfied with this information. We will easily identify device type by image and then distinguish it with its name. Furthermore, we can see at a glance the main parameters for the server. Even if it’s the Microsoft Windows Server. You just need the SNMP service installed and running on that server.

 

Highlighting additional parameters of the device

Although those few lines of information are enough in most cases, we will face a need for additional information on the map. A typical example can be a printer and the remaining level of the toner.

Before we continue with this, I need to mention that the Dude can’t check directly the toner level. However, it’s relatively easy to add your own probes in the Dude to fetch that information. I will explain that in another post.

Here is example of one printer added on the map.

clip_image001

 

We want to add more information to this icon. It’s very convenient to have the toner level visible. That means that we should edit the appearance of the icon. We will right-click on the icon and from the context menu we should choose the option named Appearance.

clip_image002

 

A new dialog will appear. We have two tabs on in. We should stay on the first and we should locate field named Label. It has a black triangle pointing down (actually that’s the drop down arrow).

clip_image003

 

When we click on this arrow, we will open this field for editing. We can see the default text with variable names. It will looks like this:

[Device.Name]
[device_performance()][Device.ServicesDown]

All the text in the angle parenthesis are variable that will be expanded to some text on the screen. We can call functions here. A function must have parenthesis () on the end. An output (the result) of a function will be displayed on that position. We can mix a plain text and those variables in the same line.

This means that our labels can be dynamic in their nature. Moreover, we will have an updated state every 30 seconds. This is the default behavior of the Dude. It’s not recommended to shorten this time, as we can increase network traffic significantly. That can lead to lost packets during peak hours and consequently to the loss of the accuracy.

 

Adding new line of an information

In our example we will add a line of the text with information about remaining toner level. Furthermore, we will add the description of the toner, as a printer reporting it.

We should add an empty line between those two lines. This field is standard Windows multiline edit field and we can use the [ ENTER ] key to add empty lines. Now we should type our line of the text.

clip_image004

As you can see on the screenshot, we added new line with following text:

Toner [fPrnGetToner1Name()] ima [fPrnGetToner1Remain()]%

The word ima means has in Serbian. As you can see, we typed the text and then inserted variables inside. We can identify variables with the angle parenthesis around them. Furthermore, both variables actually are the functions, as they are finished with elliptic parenthesis. And a percent sign is just a character in the text line.

If you have a color printer then you will need 4 lines, one for every toner. That means that we also need functions for reading the name and a toner level for every single toner.

 

New look of our map

When we add all necessary information and a text for the label, we will click on the button OK and close the dialog. The Dude will redraw the device icon on the map to reflect those new changes.

clip_image005

As you can see, we now have all printers and their toners in single view and under control. If the toner level is below some percentage (like 10%), the printer icon will be painted in orange and device will be in alarm state.

We will see in the lowest line all probes that are in error state. In that case toner is below 10%. Now we can prepare replacement toner and supply our users on time.

Depending on the toner capacity, this 10% margin can be anything from 200 up to 1,000 pages. This will save for us precious time to organize our IT Help desk team or even to obtain new toners from the supplier.

The final result will be a timely and efficient service to our users. That’s the most important thing to them.

Advertisements

One thought on “How to add additional information under the device icon in the Mikrotik Dude?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s