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

Is there a way to average measures obtained from a custom sensor for a defined interval of time?

Votes:

0

I created a sensor that calculates the APDEX index of a web page. To refine the result, I would like to apply a formula to average the last 5 hours of data obtained. How could I get that done? Thanks a lot to anyone who can help me with that.

average calculation custom-sensor prtg time

Created on Mar 17, 2010 1:55:44 PM

Last change on Mar 18, 2010 10:08:26 AM by  Daniel Zobel [Product Manager]



Best Answer

Accepted Answer

Votes:

0

Store your data in a file on disk

Every time the sensor runs, a new instance of your app is launched so you cannot use local variables in your app to hold the data of previous runs.

You could however use a (xml) file on disk to hold the results of previous runs and have your sensor return the average value of these results.

The users temp folder would be a good place to write the xml file to.

Created on Mar 17, 2010 7:14:16 PM



2 Replies

Votes:

0

You could most likely do so using Sensor Factory sensors.

Please have a look at the respective chapter of the user manual.

Created on Mar 17, 2010 4:32:45 PM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Accepted Answer

Votes:

0

Store your data in a file on disk

Every time the sensor runs, a new instance of your app is launched so you cannot use local variables in your app to hold the data of previous runs.

You could however use a (xml) file on disk to hold the results of previous runs and have your sensor return the average value of these results.

The users temp folder would be a good place to write the xml file to.

Created on Mar 17, 2010 7:14:16 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.