Sha256: 5c1a0576182bcbbdaef97b1d2909f76bb20e9ee45c06bc456d60c1c13b1639f7
Contents?: true
Size: 911 Bytes
Versions: 3
Compression:
Stored size: 911 Bytes
Contents
#!/usr/local/bin/ruby -w #-------------------- # A script to retrieve hosts from ldap and create an importable # cfservd file from them # # $Id: nagios.rb,v 1.3 2004/06/09 20:32:46 luke Exp $ 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 = "[0;31m" GREEN = "[0;32m" YELLOW = "[0;33m" SLATE = "[0;34m" ORANGE = "[0;35m" BLUE = "[0;36m" NOCOLOR = "[0m" RESET = "[0m" 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 return parser.parse(text) end def Config.each Nagios::Object.objects.each { |object| yield object } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.24.3 | lib/puppet/external/nagios.rb |
puppet-0.24.2 | lib/puppet/external/nagios.rb |
puppet-0.24.4 | lib/puppet/external/nagios.rb |