Changeset 43 for trunk/daemon/togad.py


Ignore:
Timestamp:
04/05/05 16:24:32 (19 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

  • Problem was caused by gmetad! Bug!!
  • Reported to developers.
  • togad seems to be working

To do: check in memory rrd values to which file they belong before writing

  • Now all values are written to the latest cycled rrd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r42 r43  
    2323# 7  = daemon threading
    2424#
    25 DEBUG_LEVEL = 9
     25DEBUG_LEVEL = 7
    2626
    2727# Where is the gmetad.conf located
     
    3939# Amount of hours to store in one single archived .rrd
    4040#
    41 ARCHIVE_HOURS_PER_RRD = 1
     41ARCHIVE_HOURS_PER_RRD = 12
    4242
    4343# Wether or not to run as a daemon in background
     
    348348                # Store metrics somewhere between every 60 and 180 seconds
    349349                #
    350                 #STORE_INTERVAL = random.randint( 60, 180 )
    351                 STORE_INTERVAL = 180
     350                STORE_INTERVAL = random.randint( 60, 180 )
     351                #STORE_INTERVAL = 30
    352352
    353353                storethread = threading.Thread( None, self.storeThread, 'storemetricthread' )
     
    393393
    394394                        debug_msg( 7, self.printTime() + ' - xmlthread(): parsethread() still running, waiting to finish..' )
    395                         parsethread.join( 60 ) # Maximum time for XML thread to finish
     395                        parsethread.join( 180 ) # Maximum time for XML thread to finish
    396396                        debug_msg( 7, self.printTime() + ' - xmlthread(): Done waiting.' )
    397397
     
    592592                                if self.checkStoreMetric( host, metricname, metric ):
    593593                                        update_list.append( '%s:%s' %( metric['time'], metric['val'] ) )
    594                                 else:
    595                                         print 'allready wrote metric %s with timestamp %s' %( metric['name'], metric['time'] )
     594                                #else:
     595                                        #print 'allready wrote metric %s with timestamp %s' %( metric['name'], metric['time'] )
    596596
    597597                return update_list
     
    603603                        if self.lastStored[ host ].has_key( metricname ):
    604604
    605                                 if self.lastStored[ host ][ metricname ] <= metric['time']:
     605                                if metric['time'] <= self.lastStored[ host ][ metricname ]:
    606606
    607607                                        # Allready wrote a value with this timestamp, skip tnx
     
    631631                                else:
    632632                                        debug_msg( 9, 'metric update failed' )
     633
     634                                #sys.exit(1)
    633635
    634636        def makeTimeSerial( self ):
Note: See TracChangeset for help on using the changeset viewer.