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-2.7.17 lib/puppet/external/nagios.rb
puppet-2.7.16 lib/puppet/external/nagios.rb
puppet-2.7.14 lib/puppet/external/nagios.rb
puppet-2.6.16 lib/puppet/external/nagios.rb
puppet-2.7.13 lib/puppet/external/nagios.rb
puppet-2.6.15 lib/puppet/external/nagios.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
puppet-2.7.12 lib/puppet/external/nagios.rb
puppet-2.7.11 lib/puppet/external/nagios.rb
puppet-2.6.14 lib/puppet/external/nagios.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/external/nagios.rb
puppet-2.6.13 lib/puppet/external/nagios.rb
puppet-2.7.9 lib/puppet/external/nagios.rb
puppet-2.7.8 lib/puppet/external/nagios.rb
puppet-2.7.6 lib/puppet/external/nagios.rb
puppet-2.6.12 lib/puppet/external/nagios.rb