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


Notifications on the last 1 hour average

Votes:

0

Your Vote:

Up

Down

Hi! Is there any way in prtg to configure notifications triggered by the last 1 hour averages? My goal is to configure a Ping sensor in such a way to alert me if the packet loss in the last 1 hour was higher then eg. 5%. Thanks!

average packet-loss ping sensor

Created on Dec 23, 2010 9:38:59 AM by  Karoly Laczi (152) 1 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

This can now be done with Custom Sensor PTF.SensorAverageXML

This sensor produces the average readings over the last xx hours of a given sensor. The sensor is of the XMLEXE type and dynamically produces multiple channels, depending on the selected sensor.

-u=username -p=password|passhash -s=sensorID [-h=hours]
 
-u=   The username of an account on your PRTG server.
-p=   The password of an account on your PRTG server.
-s=   The SensorID of the sensor to return the average values for.
-h=   Optional, number of hours to calculate the average on (default = 1).

Note: This sensor requires PRTG 8.2 and needs to be copied to the "\Custom Sensors\EXEXML" folder of your PRTG Network Monitor installation.

The sensor can be downloaded from this page.

Created on Jan 21, 2011 5:18:53 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,915) 3 4

Last change on Feb 3, 2011 5:57:18 PM by  Torsten Lindner [Paessler Support]



15 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

you can easily do this by creating a Threshold-Trigger for this ping-sensor. This trigger should be set on the packet-loss channel and have a latency of 3600 (seconds), and the condition should of course be above 5%.

Best Regards.

Created on Dec 23, 2010 12:22:30 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Ahh, thanks for the clarification! I thought the latency means only that if the channel is over the specified threshold level during the specified delay time, then it triggers the alert. (like with the state triggers) If I understand you right then the delay is more a "summary period" in this case. Am I right?

Best regards!

Created on Dec 23, 2010 2:00:01 PM by  Karoly Laczi (152) 1 1



Votes:

0

Your Vote:

Up

Down

The latency works similar with State and Threshold triggers. It always sets the time how long a condition (for example: DOWN; or ABOVE 5%) needs to be present before a notification will be triggered.

Created on Dec 23, 2010 2:18:05 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

With a ping sensor I'm sending eg. 10 ICMP Echo requests. If all those 10 packets are failed, then the sensor is DOWN. If the sensor is DOWN for 1 hour, it triggers a notification. That's clear.

But what if once I loose 2 packets, then I loose no packets, and then again I loose 3 packets? If my packet losses follow the same pattern in the next 1 hour (loss, no loss, loss, etc.), will it trigger a notification if I have set up my threshold trigger to 5% with a delay of 3600 sec?

So does it summarizes the last one hour?

Thanks!

Created on Dec 23, 2010 3:19:56 PM by  Karoly Laczi (152) 1 1



Votes:

0

Your Vote:

Up

Down

No, it would have to be a 5% packet loss for each scan. It does not work with averages.

Created on Dec 23, 2010 3:25:23 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Ok, so thanks for the reply. To be honest in real-life scenarios such threshold is not working well. I know from experience that if there's a packet loss, high latency, etc. to a remote device, then it will never be that clear to see.

If I set a notification to trigger with every occurrences, then it will definitely produce a tremendous amount of false alarm. If I set a threshold, then it's a possibility to miss a real issue just because there was 1 good result in the middle of a the successive bad results.

It would be nice to improve that part of PRTG.

Thanks, and happy new year!

Created on Jan 6, 2011 9:14:20 AM by  Karoly Laczi (152) 1 1



Votes:

0

Your Vote:

Up

Down

You can acomplish this with a Custom Sensor that would parse the results of your ping sensor from the last hour.

  • Gather your ping sensors data with the historicdata.csv api call.
  • Loop through the result and determine the total packet loss
  • Calculate the % packet loss and make this your sensors output.
  • In the channels tab of your sensor set the limit to 5 (%) to alert you when the packet loss of the ping sensor goes over 5%

Created on Jan 6, 2011 9:44:02 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,915) 3 4



Votes:

0

Your Vote:

Up

Down

Hi Gerard,

Thanks for your reply. That's the kind of constructive thinking I'd like to see. I'm not sure if you are referring to the XMLValue custom sensor from PTF?

If so, then my concern is that in the API call for the historical data you have to specify the start and the end time, and I'm not sure how could I specify it dynamically?

Or do you mean writing a custom sensor by myself?

Thanks!

Created on Jan 10, 2011 12:22:50 PM by  Karoly Laczi (152) 1 1



Votes:

0

Your Vote:

Up

Down

Hi Karoly,

The steps I mentioned were purely intended as "instructions" on how to achieve this with a custom sensor.

If you do not have the means of writing one yourself, I could probably have a look at it for you.

Created on Jan 10, 2011 1:02:30 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,915) 3 4



Votes:

0

Your Vote:

Up

Down

Gerard,

I have a very similar question or request. I am also looking to dynamically monitor average data for a few sensors over the past 1/2/4 hours etc. Do you have an example using the historicdata.csv api call that you could share and I could format for my needs? For example - have 1 sensor that monitors the past 1 hour averages for 4 other sensors and goes into a down state if any of them are over X% or amount.

Appreciate the help!

PS. The historical average or alert amount would be a great addition to a regular sensor!

Created on Jan 18, 2011 3:36:36 PM by  sschill (0) 2



Accepted Answer

Votes:

1

Your Vote:

Up

Down

This can now be done with Custom Sensor PTF.SensorAverageXML

This sensor produces the average readings over the last xx hours of a given sensor. The sensor is of the XMLEXE type and dynamically produces multiple channels, depending on the selected sensor.

-u=username -p=password|passhash -s=sensorID [-h=hours]
 
-u=   The username of an account on your PRTG server.
-p=   The password of an account on your PRTG server.
-s=   The SensorID of the sensor to return the average values for.
-h=   Optional, number of hours to calculate the average on (default = 1).

Note: This sensor requires PRTG 8.2 and needs to be copied to the "\Custom Sensors\EXEXML" folder of your PRTG Network Monitor installation.

The sensor can be downloaded from this page.

Created on Jan 21, 2011 5:18:53 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,915) 3 4

Last change on Feb 3, 2011 5:57:18 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Gerard you rock! Using a combination of this new custom sensor and using the sensor factory to get all values that I am looking to average this will be a cake walk to put into production with minimal setup on my end (always a plus). Thanks again!

Created on Jan 21, 2011 7:29:50 PM by  sschill (0) 2



Votes:

0

Your Vote:

Up

Down

Does someone know if the script PTF.SensorAverageXML still work with the current version of PRTG ? This is exactly what i need but I can't get it work : "Unable to connect to the remote server" Thanks!

Created on Jul 9, 2018 2:40:59 PM by  lpoirier (0)



Votes:

0

Your Vote:

Up

Down

Hi lporier,

Short answer, yes it does.

Please make sure that for the -ps= parameter you are using the exact same url when connecting to your PRTG server with your internet browser, including protocol and optional port number.

Like:

-ps=http(s)://myprtgserver(:8080)

A new version of this sensor, supporting TLS 1.1 and 1.2, is available at http://prtgtoolsfamily.com/downloads/sensorsxml

Created on Jul 10, 2018 6:56:46 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,915) 3 4



Votes:

0

Your Vote:

Up

Down

Thank you, it's working now, I'm able to get values.

Created on Jul 10, 2018 12:19:59 PM by  lpoirier (0)



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.