We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
These lines are parsing the zabbix config file by hand:
File.open(zabbix_conf_file).each do |line| ## skip comments next if line =~ /^(\s+)?#/ ## strip tail comments line.gsub!(/#.*/, '') ## zabbix splits on equals key, value = line.split("=", 2) key.chomp! value.chomp! ## zabbix keys look like strings next unless key =~ /[A-Za-z0-9]+/ ## cool zabbix_conf[key] = value end
Use a Ruby INI parser instead.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
These lines are parsing the zabbix config file by hand:
Use a Ruby INI parser instead.
The text was updated successfully, but these errors were encountered: