Sha256: 6663f1c642f10fce2374174c7a6880f2072ca52c00d07dd0ed80b87d6d4b3b0c

Contents?: true

Size: 840 Bytes

Versions: 387

Compression:

Stored size: 840 Bytes

Contents

#--------------------
# 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

387 entries across 387 versions & 3 rubygems

Version Path
puppet-5.5.1-x64-mingw32 lib/puppet/external/nagios.rb
puppet-5.5.1-universal-darwin lib/puppet/external/nagios.rb
puppet-4.10.11 lib/puppet/external/nagios.rb
puppet-4.10.11-x86-mingw32 lib/puppet/external/nagios.rb
puppet-4.10.11-x64-mingw32 lib/puppet/external/nagios.rb
puppet-4.10.11-universal-darwin lib/puppet/external/nagios.rb
puppet-5.3.6 lib/puppet/external/nagios.rb
puppet-5.3.6-x86-mingw32 lib/puppet/external/nagios.rb
puppet-5.3.6-x64-mingw32 lib/puppet/external/nagios.rb
puppet-5.3.6-universal-darwin lib/puppet/external/nagios.rb
bolt-0.19.0 vendored/puppet/lib/puppet/external/nagios.rb
bolt-0.18.2 vendored/puppet/lib/puppet/external/nagios.rb
bolt-0.18.1 vendored/puppet/lib/puppet/external/nagios.rb
bolt-0.18.0 vendored/puppet/lib/puppet/external/nagios.rb
puppet-5.5.0 lib/puppet/external/nagios.rb
puppet-5.5.0-x86-mingw32 lib/puppet/external/nagios.rb
puppet-5.5.0-x64-mingw32 lib/puppet/external/nagios.rb
puppet-5.5.0-universal-darwin lib/puppet/external/nagios.rb
bolt-0.17.2 vendored/puppet/lib/puppet/external/nagios.rb
bolt-0.17.1 vendored/puppet/lib/puppet/external/nagios.rb