I need to display one or more messages to all users of the WebUI of PRTG. How can I do this?


Article Comments

This article applies to PRTG Network Monitor 13.2.3 through 17.3.33

Displaying Custom Messages to PRTG Users

Important note: The current customization approach is unsupported and deprecated as of versions 17.3.34/17.4.35. This customization no longer works. For more details, see How can I re-brand and customize the PRTG web interface using CSS and Javascript?

You can display alert boxes like the ones by PRTG itself (shown in the lower right corner of the browser) by using the following custom javascript code.

Edit the file scripts_custom.js in the folder: \PRTG Network Monitor\webroot\javascript

Add the following code to this file and customize the texts as desired, you also show only one or even more boxes:

$(document).ready(function()
{
            _Prtg.Growls.add({
            id: 'custommessage1', //id must be unique
            type: "error",
            time: _Prtg.Options.refreshInterval * 3,
            title: 'A Message from your PRTG Admin',
            message: 'This is an error message. You can go to your homepage by clicking <a href="/home">home</a>'
          });
            _Prtg.Growls.add({
            id: 'custommessage2',//id must be unique
            type: "info",
            time: _Prtg.Options.refreshInterval * 3,
            title: 'A Message from your PRTG Admin',
            message: 'This is an info message. You can go to your homepage by clicking <a href="/home">home</a>'
          });
  }
);

The result of this code are two boxes on the bottom right with the defined custom messages:

Custom Message


May, 2013 - Permalink