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: Developers, Moderators

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

Data Input Method multiple output with time stamps

Post by kaf3773 »

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]
                      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
Help very much appreciated. Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data Input Method multiple output with time stamps

Post by gandalf »

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

Who is online

Users browsing this forum: No registered users and 2 guests