Also found when I was debugging that read_main_config_file() has only limited set of nagios directives that it understands.<div><br></div><div>However it so happens its perfectly legal to have service and host directives directly in nagios.cfg instead of being included as part of another file included in there. Granted this configuration is shall we say unusual, but its not illegal according to current nagios.</div>
<div><br></div><div>To deal with this I've decided to just comment out reporting of error for UNKNOWN variable (last else) in that function. xdata will report an error for config directives not recognized.</div><br><div class="gmail_quote">
On Fri, Sep 21, 2012 at 10:35 PM, William Leibzon <span dir="ltr"><<a href="mailto:william@leibzon.org" target="_blank">william@leibzon.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="https://github.com/willixix/nagios/commit/e08c89830e96fce1361fb15527a2a6503a9f1b7e#L0L3474" target="_blank">https://github.com/willixix/nagios/commit/e08c89830e96fce1361fb15527a2a6503a9f1b7e#L0L3474</a> was the cause of issues I see with latest code, so I'm reverting it in my branch. And as far as I can tell opts2str function does not actually add new lines, at least not in master branch, and in my opinion it shouldn't to keep things consistent with new lines added in fcache_host & fcache_service just like on other fprintf lines there<div>
<br></div><div>Plus to that it did indeed ignore specified path of objects_cache_file, but that one was specific to my branch (as a result of another change made that was not in sync with my previous changes)<div><div class="h5">
<br><div><br>
<div class="gmail_quote">On Thu, Sep 20, 2012 at 10:53 PM, William Leibzon <span dir="ltr"><<a href="mailto:william@leibzon.org" target="_blank">william@leibzon.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
mm. something else is wrong, I see that it did the file before getting to xodtemplate. will debug more<div><div><br><div class="gmail_quote">On Thu, Sep 20, 2012 at 10:23 PM, William Leibzon <span dir="ltr"><<a href="mailto:william@leibzon.org" target="_blank">william@leibzon.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div>This did not fix CGIs, those would bypass trying to read main config file and try to go directly for default cached objects file. This is in xodtemplate_read_config_data and in addition to that issue macros are wrong there with #ifdef NSCORE inside #ifdef NSCORE.<div>
<div><div>
<br><div class="gmail_quote">On Sun, Sep 16, 2012 at 2:32 PM, Andreas Ericsson <span dir="ltr"><<a href="mailto:ae@op5.se" target="_blank">ae@op5.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 09/16/2012 05:13 PM, Joerg Linge wrote:<br>
><br>
</div><div>> Am 16.09.2012 um 16:27 schrieb Andreas Ericsson <<a href="mailto:ae@op5.se" target="_blank">ae@op5.se</a>>:<br>
>><br>
</div><div>>> Well, that's by design. The objects.cache should only be written to once.<br>
>> Or do you mean that it gets created but is empty?<br>
><br>
> Correct.<br>
> object_cache_file was created using the wrong path (/usr/local/nagios/var/objects.cache as defined in includes/locations.h instead of /omd/sites/ng4/var/nagios/objects.cache defined in nagios.cfg )<br>
><br>
> But the file contains just the header.<br>
><br>
<br>
</div>Righto. I figured it out and a fix is pushed to both github and to<br>
svn. Thanks for helping out.<br>
<div><br>
--<br>
Andreas Ericsson <a href="mailto:andreas.ericsson@op5.se" target="_blank">andreas.ericsson@op5.se</a><br>
OP5 AB <a href="http://www.op5.se" target="_blank">www.op5.se</a><br>
Tel: <a href="tel:%2B46%208-230225" value="+468230225" target="_blank">+46 8-230225</a> Fax: <a href="tel:%2B46%208-230231" value="+468230231" target="_blank">+46 8-230231</a><br>
<br>
Considering the successes of the wars on alcohol, poverty, drugs and<br>
terror, I think we should give some serious thought to declaring war<br>
on peace.<br>
<br>
</div><div><div>------------------------------------------------------------------------------<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href="http://ad.doubleclick.net/clk;258768047;13503038;j" target="_blank">http://ad.doubleclick.net/clk;258768047;13503038;j</a>?<br>
<a href="http://info.appdynamics.com/FreeJavaPerformanceDownload.html" target="_blank">http://info.appdynamics.com/FreeJavaPerformanceDownload.html</a><br>
_______________________________________________<br>
Nagios-devel mailing list<br>
<a href="mailto:Nagios-devel@lists.sourceforge.net" target="_blank">Nagios-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br>