I am getting some insert errors for the nagios_configfilevariables table when I load NDOUtils I was wondering if any one knows how to fix this. Any help would be greatly appreciated.
Oct 3 08:12:05 cactor ndo2db-3x: Successfully connected to MySQL database
Oct 3 08:12:05 cactor ndo2db-3x: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘2’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/contacts.cfg’‘
Oct 3 08:12:05 cactor ndo2db-3x: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘2’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/timeperiods.cfg’‘
Oct 3 08:12:05 cactor ndo2db-3x: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘2’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/templates.cfg’‘
Oct 3 08:12:05 cactor ndo2db-3x: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘2’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/localhost.cfg’'
Oct 3 08:12:05 cactor nagios: ndomod: Successfully flushed 1308 queued items to data sink.
I have this issue as well, it’s only for the configfile entries and I think that this is a ‘legacy’ problem from where nagios moved to multiple config files from a single one they forgot to reconfigure the broker to account for that.
I can manually add records to the table as the nagios user, but I get these errors when I restart Nagios:
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/contacts.cfg’‘
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/timeperiods.cfg’‘
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/templates.cfg’‘
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/switch.cfg’‘
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/snmpservices.cfg’‘
Nov 21 10:49:25 localhost ndo2db: Error: mysql_query() failed for ‘INSERT INTO nagios_configfilevariables SET instance_id=‘1’, configfile_id=‘3’, varname=‘cfg_file’, varvalue=’/usr/local/nagios/etc/objects/servers.cfg’’
Anyone have any ideas? Maybe in the source of either Nagios or NDOUtils? If I know what to look for, I might be able to find it and correct it, if it is in the code.