PRTG does a nice job counting numeric values and dowing 2Tag/30ay/365Day graphs. It consolidated the numbers like MRTG/RRDTOOL by doing a "average". Is there a way to "ADD" the Counters ?

I wrote my custom EXEXML-Server to collect exchange message tracking counters every 5 Minutes using Powershell and outbot 4 Channel (sendMail/5min, ReceivedMail/5Mon, SendKB/5Min, receivesKB/5Mn). Thats fine. The weekly chart or monthly chart should not have the "average" of the consolidated values. Instead it should add the values.

Frank


Article Comments

For non-averaged values please use the Historic Data function.


Nov, 2012 - Permalink

Maybe i did not find the right option. I can select the start and end time but all results are "average" only. Not SUMs. Ok i can export the Data als CSV and do it my self but thats not a preferred way. I'll try to explain it better: The script collects the number of messages per time. so given the following samples (number of messages every 15 minutes) 00:00=5 00:15=6 00:30=10 00:45=8 so the default graph shows these four values. thats fine. But if we go to a graph with 1 hour per value the current logic does a (5+6+10+8)/4 = 7,25 (average) This is correct to show, that we have a average messagerate of 7,25 (per 15Min)

my preferred result would be to show a "29" as value for that hour.


Nov, 2012 - Permalink

Hmm no luck so far. I can see, that a "network Counter" is adding the used transfer volume in the various views. But my counters are always "averages". But i found one setting, which might be the reason.

My XML-results had a "<mode>Absolute</mode>" per Counter. I think i have to change that to "<mode>Difference</mode>". Hopefully PRTG will now "add" the differences together. Lets see.

Frank


Nov, 2012 - Permalink

hello,

when using the historic data only data for a timespan smaller than 40 days can use raw data values.

when using historic data you can select from a drop down to use raw values.


Nov, 2012 - Permalink

I verified that with the historic view and raw data. The content in the database is fine. I have values for nearly every 5 Minute (the interval my script runs). So thats ok and not the problem. It is more interesting to find out, when PRTG adds the values together and when PRTG builds averages. If i use the "historical" function, i can select the "Average Interval" to 60min. Now (like it is written in "average interval" the software will add the 12 counters (5min each) together and show them as average (not as a sum).

Compare it with out "buildIn" Counters for a network card. The availible channels here are: Downtime, Total Trafficin, Traffic out and Pakets. So we have 5 channels. But in the Chart view we have 9+1 rows. Total (volume), Total (Speed) Traffic in (Volume, Traffic in (Speed) Traffic (Volume), Traffic Out (Speed) Packets (Volume), Packets (Speed) Downtime and Coverage.

So there is some kind of logic/configuration here to tell PRTG that it should not calculate the Averages (as (Speed) only. PRTG also creates a "SUM"

And thats, the important (and interesting) thing in counting messages (items and Size) if a system sends 2 messages/Minute the script returns "10". And PRTG counts 10 per data point. A diagram with 60min per datapoint should show 120 and not the average of 10 A diagram with 1Day per datapoint should show 2880 and not the average of 10.

I have not seen a setting in the gui nor the XML-result to tell PRTG adding the individual counters instead of building averages.

Frank


Nov, 2012 - Permalink

This would seem to be an issue as regards absolute and difference sensors. You have added one sensor that returns absolute values for volume - this will not work with PRTG. As such, it would seem you have to change the counter type of your sensor to 'difference'. This should yield the desired results.


Nov, 2012 - Permalink

Yes i think this could work. I still have some problem to fill the data into the rows but i think i can solve that. Currently not all Values are filled all the time. So i have to look into my skript to find out, whats wrong (sometimes) So whats the exact meaning/difference between "Absolute" and "Difference". ?


Nov, 2012 - Permalink

Sensors using absolute values will show the individual value forwarded by the monitored device. Sensors using difference values will show the difference between two values, as forwarded by the monitored device.


Nov, 2012 - Permalink

Oh that might thell me, why i have problems using the results. Using "difference" as type works partially. the output now does not only have the values, it also has a summary and a /per second) calculation but the numers are not the same as i send them to PRTG. You wrote: "Sensors using difference values will show the difference between two values, as forwarded by the monitored device."

I have a XML File with four values. But what values are used to calculate the "difference". The current and the last result ? Big questionmarks :-)


Nov, 2012 - Permalink

The difference computed is always that to the previous value. The volume should thus directly contain the different. The speed is calculated based on the time (in order to keep the scaling).


Nov, 2012 - Permalink

Ok based on that information i have to say, that Difference is the wrong formatting for my sensor. I switched back to "Absolute". Because this looks like the best approach.

But i don't understand, why changing between the way a sensor sends the data (Difference vs. absolute) also changes the way how PRTG calculates additional values.

So i will stay with absolute to collect the absolute counters fpor MessageIN/5Min, MessageOUT/5min, KByteIn/5min and KByteOUt/5Min). That looks nice in the graph and i simpy have to do some math manually to have the added values (instead of the averages).

Maybe any future version woll have some enhancements of the historical output to do a "sum" instead of average and maby a additional line for "maximum" per Channel.

Frank


Nov, 2012 - Permalink

Ok. Version1 of the sensor and description is ready http://www.msxfaq.de/tools/prtgextracking.htm have fun.


Dec, 2012 - Permalink