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


Alert on value change

Votes:

0

Your Vote:

Up

Down

I have a MYSQL sensor and I want to generate an alert if the return value changed from it's previous value.

Say the interval is 5 minutes and the value is 3. If the value changes to 2 or 4, I want the sensor to go into alarm. It would stay in alarm until it scans again and there is not change from the previous value.

Thanks

alert change notifications prtg value wishlist

Created on Mar 11, 2010 5:59:50 PM by  Benjamin Auch (50) 1

Last change on Mar 15, 2010 11:31:15 AM by  Daniel Zobel [Paessler Support]



Best Answer

Accepted Answer

Votes:

2

Your Vote:

Up

Down

Use a dummy table

Create a dummy table in your database to hold the last value from your original query. If the last value differs from the stored value return 1, else return 0.

Your sensor could then generate an alarm if the return value = 1

If your original query was:

SELECT count(*) FROM tblNAW

You could change this into:

DECLARE @result     INT
DECLARE @LASTresult INT

SET @result = (SELECT count(*) FROM tblNAW)
SET @LASTresult = (SELECT TOP 1 LASTresult FROM tblDUMMY)

UPDATE tblDUMMY SET LASTresult = @result

IF @result = @LASTresult
  SELECT 0
ELSE
  SELECT 1

Created on Mar 12, 2010 2:49:11 PM by  PRTG Tools Family [prtgtoolsfamily.com] (13,065) 3 4



5 Replies

Votes:

0

Your Vote:

Up

Down

In the sensor's Channels tab you can enable limits and set an upper error and lower error limit, but those are not dynamic.

Created on Mar 12, 2010 8:51:22 AM by  Aurelio Lombardi [Paessler Support]

Last change on Mar 12, 2010 9:21:51 AM by  Daniel Zobel [Paessler Support]



Votes:

0

Your Vote:

Up

Down

So there is no way, sensor factory, etc to setup a sensor to alarm if the value is different that what it last was?

Could you setup two sensors with different scanning intervals and use sensor factory to compare?

Created on Mar 12, 2010 1:32:15 PM by  Benjamin Auch (50) 1



Votes:

0

Your Vote:

Up

Down

no, sorry.

Created on Mar 12, 2010 2:07:03 PM by  Aurelio Lombardi [Paessler Support]



Accepted Answer

Votes:

2

Your Vote:

Up

Down

Use a dummy table

Create a dummy table in your database to hold the last value from your original query. If the last value differs from the stored value return 1, else return 0.

Your sensor could then generate an alarm if the return value = 1

If your original query was:

SELECT count(*) FROM tblNAW

You could change this into:

DECLARE @result     INT
DECLARE @LASTresult INT

SET @result = (SELECT count(*) FROM tblNAW)
SET @LASTresult = (SELECT TOP 1 LASTresult FROM tblDUMMY)

UPDATE tblDUMMY SET LASTresult = @result

IF @result = @LASTresult
  SELECT 0
ELSE
  SELECT 1

Created on Mar 12, 2010 2:49:11 PM by  PRTG Tools Family [prtgtoolsfamily.com] (13,065) 3 4



Votes:

0

Your Vote:

Up

Down

Can I request that this type of trigger be added to the next version?

Thanks

Created on Mar 12, 2010 3:07:15 PM by  Benjamin Auch (50) 1



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.