Data Input Method multiple output with time stamps

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

Moderators: Moderators, Developers

Post Reply
Posts: 21
Joined: Sun Sep 09, 2012 8:48 pm

Data Input Method multiple output with time stamps

#1 Post by kaf3773 » Wed Apr 03, 2013 6:44 pm

I will appreciate it if you can help me out

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]
                          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
Help very much appreciated. Thanks

User avatar
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany

Re: Data Input Method multiple output with time stamps

#2 Post by gandalf » Sat Apr 27, 2013 1:01 pm

Currently, we do not support to provide update time by scripts. We always use current time.
patches to enhance this are welcomed

Post Reply