Setup (all centos5 x64, manual install)
1 parent & 2 children using DNX.
When running in a distributed setup (DNX) we found that the check defaulted to a child host, which we should have seen coming.
We first tried putting the nagiosbpi component onto a shared folder, and then soft linking that to the normal install location. We were hoping that this would give us the ability to use the parent as the normal configuration manager for BPI, and the children would simple pick it up... this did not work, and in fact, broke the XI interface as it considered it a compilation error in the component, apparently it does not follow sym links.
We then tried forcing DNX to act like an active check, and ONLY run on the parent, but this does not have any effect, as the only things I can get to run on the parent are dependencies. (i may be missing a solution here)
I'm not sure checks running from the children will really ever work, as when using DNX they do not have any knowledge of the hosts or services, they just report back what the output of the check the parent asked to be run.
Any known way, or ideas on how this can work with no funky implementation?
Code: Select all
SOLUTION: Thanks to the nagios experts.
edit /usr/local/nagios/etc/dnxServer.cfg
find directive localCheckPattern = .*local.*
replace regular expression with the name of the script or parameter that is running.
restart nagios
NOTE:
I found that a regular expression for the name of the host or service was not a match, dnx debug shows that all that is passed through dnx is something similar to :
Posting New Job [1348]: /usr/local/nagios/libexec/check_bpi.php BPI_GROUP.
localCheckPattern = .*check_bpi.* is what worked for me.