I have a python script that pulls data from a mysql database to
update rrd files externally. I am looking to use cacti data input methods
to run the script to update the rrd files. My understanding
is that i will not be able to use thold on externally updated rrd files in cacti.
The issue i have is my script outputs both the time(epoch) and the data point needed for
the rrd file. Is it possible to have a data input method where the script used outputs
multiple data points and their times(epoch) to update cacti?
Please correct me if i am wrong because my understanding is that when a script
is used with data input method the rrd file is updated with the time that the cacti
poller run the script.But in my case the time(epoch) to be used to update the rrd file
is also an output from the script along with its data point.
Below is a snippet of my script
Code: Select all
for i in range(numrowedrrd):
row = curred.fetchone()
time_stamp = row[0]
dura = row[1]
try:
ret = rrdtool.update(ds_file.rrd,'%s:%s' %(time_stamp,dura));
except rrdtool.error, e:
print e
print time_stamp
print dura
i = i + 1