nagios_parser icon indicating copy to clipboard operation
nagios_parser copied to clipboard

NagiosParser::Config::Parser.parse only handles last instance of cfg_file or cfg_dir

Open osterman opened this issue 12 years ago • 2 comments

Nagios supports multiple occurrences of the "cfg_file" and "cfg_dir" directives. The parser should probably use an array for values when 2 or more instances of a key are encountered.

osterman avatar Jul 06 '12 21:07 osterman

Thanks for the report. Please test with the latest commits.

Do you know of any other config directives that should handle multiple values?

bernd avatar Jul 08 '12 13:07 bernd

Thanks for the quick fix! I haven't had a chance to test it yet. It does look like there are others. The ones I noticed were also missing are "resource_file" and "broker_module".

Here's the doc for the main configuration file. Looking for "multiple", these were all I found.

http://nagios.sourceforge.net/docs/3_0/configmain.html

osterman avatar Jul 10 '12 17:07 osterman