1. Ben Hartshorne
  2. ganglia-logtailer
  3. Issues
Issue #4 new

make sure state_dir exists, create it if necessary

Ben Hartshorne
repo owner created an issue

Nothing says that /var/lib/ganglia (the default in logtail_statedir) exists. Things break if it doesn't.

{{{

!python

41 logtail_statedir = '/var/lib/ganglia-logtailer/'

161 cmdline.add_option('--state_dir', '-s', action='store', default=logtail_statedir, 162 help='The state dir is used in cron mode, and is where to store the logtail state file. Default location %s' % logtai l_statedir)

170 state_dir = options.state_dir 171 dirsafe_logfile = log_file.replace('/','-') 172 logtail_state_file = '%s/logtail-%s%s.state' % (state_dir, class_name, dirsafe_logfile) 173 logtail_lock_file = '%s/logtail-%s%s.lock' % (state_dir, class_name, dirsafe_logfile) }}}

Comments (0)

  1. Log in to comment