csv from cacti graph and raw data output is not the same?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
swezphyoe
Posts: 1
Joined: Wed Feb 21, 2018 2:26 am

csv from cacti graph and raw data output is not the same?

Post by swezphyoe »

Hey. currently, I am writing a python script about fetching data(1 week) from cacti rrd files and calculate Max and avg (which is like from cacti GUI) and finally exporting them into the csv file.
What is my problem now is I face the csv file that i exported from the GUI is not the same as I fetch(rrdtool fetch) behind. What should i do? :roll: :roll: :roll:
The script implementation is almost finished but I found that the calculated result of avg and max from which the data i got from rrdtool fetch is not the same as which appeared in the cacti GUI.

This is a part of how I implemented to calculate average of traffic usage in my script! :-? :-?

Code: Select all

def _calculate_avg_out(row):
    length=len(row)
    sums=sum(r[1] for r in row)
    ans1=sums%length
    return ans1
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: csv from cacti graph and raw data output is not the same

Post by browniebraun »

Don't worry. You should trust in your script. The CSV export function in Cacti is not using RRDtool fetch, it is using xport which will be limited to a number of samples. So, what you are doing is correct and the same what ReportIt provided all the years. Shame on me that I'm struggling with its new version for 1.x
:(
Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests