| Server IP : 77.68.64.21 / Your IP : 216.73.217.59 Web Server : Apache System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2516497 ( 2094697) PHP Version : 8.3.30 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/ruby/vendor_ruby/puppet/external/ |
Upload File : |
#--------------------
# 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 = "[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
parser.parse(text)
end
def Config.each
Nagios::Object.objects.each { |object|
yield object
}
end
end
end