What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Notifications on the last 1 hour average

Votes:

0

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



Best Answer

Accepted Answer

Votes:

1

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

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



16 Replies

Votes:

0

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

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



Votes:

0

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

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



Votes:

0

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

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



Votes:

0

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



Votes:

0

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



Votes:

0

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



Votes:

0

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



Accepted Answer

Votes:

1

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

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



Votes:

0

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



Votes:

0

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



Votes:

1

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



Votes:

0

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

Created on Jul 10, 2018 12:19:59 PM



Votes:

0

@Torsten Lindner | PRTG Tools Family: this sensor is wonderful, thank you very very much!

Created on Feb 27, 2021 11:18:49 PM




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.