Sha256: a4b745eba1b14dfedc6e0ecf76d149640df930cd8d1b7f555c6aece44141e81c

Contents?: true

Size: 864 Bytes

Versions: 89

Compression:

Stored size: 864 Bytes

Contents

#!/usr/bin/env ruby -w

#--------------------
# A script to retrieve hosts from ldap and create an importable
# cfservd file from them

require 'digest/md5'
#require 'ldap'
require 'puppet/external/nagios/parser.rb'
require 'puppet/external/nagios/base.rb'

module Nagios
  NAGIOSVERSION = '1.1'
  # yay colors
  PINK = ""
  GREEN = ""
  YELLOW = ""
  SLATE = ""
  ORANGE = ""
  BLUE = ""
  NOCOLOR = ""
  RESET = ""

  def self.version
    NAGIOSVERSION
  end

  class Config
    def Config.import(config)

      text = String.new

      File.open(config) { |file|
        file.each { |line|
          text += line
        }
      }
      parser = Nagios::Parser.new
      parser.parse(text)
    end

    def Config.each
      Nagios::Object.objects.each { |object|
        yield object
      }
    end
  end
end

Version data entries

89 entries across 89 versions & 4 rubygems

Version Path
puppet-3.0.2.rc1 lib/puppet/external/nagios.rb
puppet-parse-0.0.2 lib/vendor/puppet/external/nagios.rb
puppet-2.7.20 lib/puppet/external/nagios.rb
puppet-2.7.20.rc1 lib/puppet/external/nagios.rb
puppet-3.0.1 lib/puppet/external/nagios.rb
puppet-3.0.1.rc1 lib/puppet/external/nagios.rb
puppet-3.0.0 lib/puppet/external/nagios.rb
puppet-3.0.0.rc8 lib/puppet/external/nagios.rb
puppet-3.0.0.rc7 lib/puppet/external/nagios.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/external/nagios.rb
puppet-3.0.0.rc5 lib/puppet/external/nagios.rb
puppet-3.0.0.rc4 lib/puppet/external/nagios.rb
puppet-2.7.19 lib/puppet/external/nagios.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/lib/puppet/external/nagios.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
puppet-2.7.18 lib/puppet/external/nagios.rb
puppet-2.6.17 lib/puppet/external/nagios.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb