Changeset 13 for trunk/daemon/togad.py


Ignore:
Timestamp:
03/22/05 16:12:42 (18 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

Appareantly this stupid rrdtool module wants each parameter in a seperate variable

  • rrd creation working
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r12 r13  
    2929#
    3030ARCHIVE_SOURCES = [ "LISA Cluster" ]
     31
     32# Amount of hours to store in one single archived .rrd
     33#
     34ARCHIVE_HOURS_PER_RRD = 24
     35
    3136
    3237#
     
    268273                heartbeat = 8 * int(interval)
    269274
    270                 rrd_parameters.append( '--step' )
    271                 rrd_parameters.append( interval )
    272 
    273                 rrd_parameters.append( '--start' )
    274                 rrd_parameters.append( metric['time'] )
    275 
    276                 print rrd_parameters
     275                param_step1 = '--step'
     276                param_step2 = str( interval )
     277
     278                param_start1 = '--start'
     279                param_start2 = str( int( metric['time'] ) - 1 )
     280
     281                param_ds = 'DS:sum:GAUGE:%d:U:U' %heartbeat
     282                param_rra = 'RRA:AVERAGE:0.5:1:%s' %(ARCHIVE_HOURS_PER_RRD * 240)
     283
     284                rrdtool.create( str(rrd_file), param_step1, param_step2, param_start1, param_start2, param_ds, param_rra )
    277285
    278286        def update( self, metric, timestamp, val ):
Note: See TracChangeset for help on using the changeset viewer.