Changeset 449 for trunk


Ignore:
Timestamp:
07/20/07 10:19:55 (15 years ago)
Author:
bastiaans
Message:

jobmond/jobmond.py,
jobmond/jobmond.conf:

  • added GMETRIC_BINARY option
Location:
trunk/jobmond
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jobmond/jobmond.conf

    r374 r449  
    3939#
    4040#GMOND_CONF             : /etc/gmond.conf
     41#
     42# Location of gmetric binary
     43#
     44# Default: /usr/bin/gmetric
     45#
     46# DEPRECATED!:          use GMETRIC_TARGET!
     47#
     48#GMETRIC_BINARY         : /usr/bin/gmetric
    4149
    4250# Target of Gmetric's: where should we report to
  • trunk/jobmond/jobmond.py

    r448 r449  
    118118        global GMOND_CONF, DETECT_TIME_DIFFS, BATCH_HOST_TRANSLATE
    119119        global BATCH_API, QUEUE, GMETRIC_TARGET, USE_SYSLOG
    120         global SYSLOG_LEVEL, SYSLOG_FACILITY
     120        global SYSLOG_LEVEL, SYSLOG_FACILITY, GMETRIC_BINARY
    121121
    122122        DEBUG_LEVEL     = cfg.getint( 'DEFAULT', 'DEBUG_LEVEL' )
     
    135135
    136136                debug_msg( 0, 'ERROR: no option USE_SYSLOG found: assuming yes' )
     137
    137138
    138139
     
    189190                GMOND_CONF              = None
    190191
     192        try:
     193
     194                GMETRIC_BINARY          = cfg.get( 'DEFAULT', 'GMETRIC_BINARY' )
     195
     196        except ConfigParser.NoOptionError:
     197
     198                GMETRIC_BINARY          = '/usr/bin/gmetric'
     199
    191200        DETECT_TIME_DIFFS       = cfg.getboolean( 'DEFAULT', 'DETECT_TIME_DIFFS' )
    192201
     
    238247        """Class for processing of data"""
    239248
    240         binary = '/usr/bin/gmetric'
     249        binary = None
    241250
    242251        def __init__( self, binary=None ):
    243252
    244253                """Remember alternate binary location if supplied"""
     254
     255                global GMETRIC_BINARY
    245256
    246257                if binary:
    247258                        self.binary = binary
     259
     260                if not self.binary:
     261                        self.binary = GMETRIC_BINARY
    248262
    249263                # Timeout for XML
Note: See TracChangeset for help on using the changeset viewer.