nconf stopped working after update to nagios 4

I recently updated our nagios monitoring system from Nagios 3 to Nagios 4 and nconf started giving below error when I generate the new configuration files.

Error: Service has no hosts and/or service_description (config file 'nconf/temp/Default_collector/advanced_services.cfg', starting on line 195)

It was no surprise because the last release of nconf was on Dec 2011 which is around 6 years back. So no wonder it was not working with nagios 4.

Solution:

I searched a lot with no solutions and was thinking of switching to NagiosQL when I came across this post http://forum.nconf.org/viewtopic.php?f=17&t=872#p3050 I gave it a try and it worked like charm.

[root@nagios nconf]# unzip nconf-1.3.0-0_not_used_advanced_services_wont_be_written.patch.zip
 Archive:  nconf-1.3.0-0_not_used_advanced_services_wont_be_written.patch.zip
 inflating: nconf-1.3.0-0_not_used_advanced_services_wont_be_written.patch

[root@nagios nconf]#  patch -p0 --verbose < nconf-1.3.0-0_not_used_advanced_services_wont_be_written.patch
 Hmm...  Looks like a unified diff to me...
 The text leading up to this was:
 --------------------------
 |--- bin/lib/NConf/ExportNagios.pm.orig 2011-12-24 13:57:38.620626845 +0100
 |+++ bin/lib/NConf/ExportNagios.pm      2011-12-24 14:02:16.870751718 +0100
 --------------------------
 Patching file bin/lib/NConf/ExportNagios.pm using Plan A...
 Hunk #1 succeeded at 1014.
 Hunk #2 succeeded at 1078.
 Hunk #3 succeeded at 1111.
 done

You will also have to add below line in config/nconf.php

define('CHECK_STATIC_SYNTAX', 0);
Show 1 Comment

1 Comment

Comments are closed