New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Is it possible to restrict a users ability to pause sensors/devices?

Votes:

0

Your Vote:

Up

Down

I have a couple of users that, due to their job position, need relatively broad access to the devices and sensors in our PRTG installation. The catch is that they are very liberal with their use of the "Pause Indefinitely..." function much to the distress of the rest of us who rely on these sensors to tell us when there is a problem. I realize the that best solution is to deal with the problem outside of PRTG, but in my case that is not an option as the offenders are usually higher in the chain-of-command than me. Basically it would be nice if there was a way I could disable the use of the "Pause Indefinitely..." function for all but the PRTG system admins.

pause sensors user-error

Created on Feb 7, 2011 5:09:46 PM by  T. N. Wheeler (0) 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

PLEASE NOTE: THIS SOLUTION ONLY APPLIES TO PRTG VERSIONS 13.1.x and older!

Here is another solution that completely disables the "pause indefinitely" function for all users (menu items and buttons are still visible, though):

Open the file objecttools.js from the \website\javascript folder

Find these functions:

function multiPause(formid,action) function pauseObject(objid,action)

and enter a

return;

at the beginning of both functions.

Find this function:

function pauseWithComment(objectid,pausefor)

and enter this code at the beginning of the function:

if (pausefor<1) {return};

You could also use this IF statement to filter for a specific user:

if (userLoginName=="the name of the users who should not pause") ...

Note: Every time you update your PRTG installations these edits must be reapplied because the PRTG installer overwrites your changes.

Created on Feb 7, 2011 6:35:26 PM by  Dirk Paessler [Founder Paessler AG] (10,880) 3 4

Last change on Jun 25, 2013 1:02:54 PM by  Torsten Lindner [Paessler Support]



8 Replies

Votes:

0

Your Vote:

Up

Down

PLEASE NOTE: THIS SOLUTION ONLY APPLIES TO PRTG VERSIONS 13.1.x and older!
Maybe the following "hack" helps you:

Step 1: Remove the context menu entry

Open the file

prtg.contextmenus.js

from the \website\javascript folders in a text editor.

Find this line of code:

{ cls:'sensor rootgroup device group probe hideforreadonlyuser', id:'pausenowcomment', ui:'pause', caption:'<#lang key="js.contextmenus.Pause.PauseIndefinitely" default="Pause Indefinitely">&hellip;'},

Comment it out by adding \\ at the beginning of the line.

This will effectively remove the "pause indefinitely" function from the context menu (for all users).

Step 2: Remove the Pause button from sensors.htm

Open the file sensor.htm from the \website folder in a text editor.

Remove this line of code

<#object type="pause" addclass="hideforreadonlyuser">

This will hide the "pause" button at the top right.

Step 3: Remove Pause function from the multi edit menu

Open the file deviceoverview.htm in the \website\controls folder in a text editor.

Find this line of code <#table tableid="devicesensortable" content="sensors" columns="position=textshort,sensor,status,message,minigraph,priority,checkbox" tools="edit,acknowledge,pause,fave,prio,scan,delete,position" sortby="position" sortable="true" links="true" count="100" refreshable="true">

Delete this part of the line

,pause

This will remove the pause option for sensors.

Do the same for the file sensors.htm and alarms.htm

Notes

  • There are still some other possibilities to pause a sensor throughout the software, but they are hard to find!
  • Every time you update your PRTG installations these edits must be reapplied because the PRTG installer overwrites your changes.

Created on Feb 7, 2011 6:23:12 PM by  Dirk Paessler [Founder Paessler AG] (10,880) 3 4

Last change on Jun 7, 2016 10:28:10 AM by  Torsten Lindner [Paessler Support]



Accepted Answer

Votes:

0

Your Vote:

Up

Down

PLEASE NOTE: THIS SOLUTION ONLY APPLIES TO PRTG VERSIONS 13.1.x and older!

Here is another solution that completely disables the "pause indefinitely" function for all users (menu items and buttons are still visible, though):

Open the file objecttools.js from the \website\javascript folder

Find these functions:

function multiPause(formid,action) function pauseObject(objid,action)

and enter a

return;

at the beginning of both functions.

Find this function:

function pauseWithComment(objectid,pausefor)

and enter this code at the beginning of the function:

if (pausefor<1) {return};

You could also use this IF statement to filter for a specific user:

if (userLoginName=="the name of the users who should not pause") ...

Note: Every time you update your PRTG installations these edits must be reapplied because the PRTG installer overwrites your changes.

Created on Feb 7, 2011 6:35:26 PM by  Dirk Paessler [Founder Paessler AG] (10,880) 3 4

Last change on Jun 25, 2013 1:02:54 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks, I was able to use the second option and block all but myself and the other system admin from using the "Pause Indefinitely" option. If I could have one more thing it would be to give the users some feedback that the option they picked was "not available" but for the mean time it works great.

Created on Feb 8, 2011 9:49:02 PM by  T. N. Wheeler (0) 1



Votes:

0

Your Vote:

Up

Down

I am using PRTG 13.2.3.2220+ and these instructions appear to be for previous versions of PRTG. I have found the newer prtg.objecttools.js file and have made changes according to the 'Best Answer' variant above but have not been able to stop the indefinite pauses. Granted, I don't know a ton about JavaScript so I could be doing something wrong.

I have tried adding the following to each of the identified sections of the prtg.objecttools.js file as follows:

<p><code>function multiPause(formid,action,cb) {
	return;
	if (action === 1) {
		doMultiStuff(formid,"pause.htm","action="+action).always(function(){!!cb && cb();});
	} else {
...
</code></p>
<p><code>
function pauseObject(objid,action) {
	return;
	$.ajax({
		url: "/api/pause.htm",
		data: {
...
</code></p>
<p><code>
function pauseWithComment(objectid,pausefor,cb) {
//	if (userLoginName=="testuser" && pausefor<1) {
//		return}
//	;
	var dialogurl = "/controls/pausewithcomment.htm",
</code></p>

I am not sure whether or not I am required to restart the core server's service or not but I would assume that this content is loaded fresh for each user login. I only hesitate to perform this restart due to the fact that we monitor extremely critical systems and are required to schedule downtime. Please assist me if possible as I have a select subset of users who should not be allowed to pause indefinitely and this is causing us a significant amount of grief.

Created on Jun 24, 2013 6:22:52 PM by  Blake Webb (20) 1 1

Last change on Jun 25, 2013 1:03:16 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I would love for "remove indefinite pause" to be an option/feature in a future release.

Created on Jun 6, 2016 1:58:50 PM by  coderoman (0) 1



Votes:

0

Your Vote:

Up

Down

It appears the 3 step answer applies to an older version (<16.2) of PRTG as well. It would be useful if that was noted in that answer.

I can confirm that after following the steps (except for step 2, as sensor.html file does not have the indicated line) pause indefinitely buttons and commands still show up in device and sensor views.

Created on Jun 6, 2016 3:19:01 PM by  coderoman (0) 1



Votes:

0

Your Vote:

Up

Down

I want to reactivate this topic, is there a possibility now to deactivate "pause indefinitely". We always got paused sensors and nobody continue them when the problem is solved.

Would be great if there would be a setting in PRTG to deactivate this.

Created on Dec 10, 2019 12:02:38 PM by  kaiholzer (0) 1



Votes:

0

Your Vote:

Up

Down

Hi,

The only opportunity that you'll have, is to reset the entered values which are described above.

Kind regards

Created on Dec 11, 2019 7:04:04 AM by  Marijan Horsky [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.