Page 1 of 1

XI MySQL Syntax issue - Adding Host with Host Template

Posted: Tue Jan 20, 2015 3:31 pm
by brdr
Hi

We have Nagios XI 2014R2.0.

I've added dozens of network devices via CCM Switch / Network wizard with no issue. However, now when I finish running through the Wizard steps, I then go into Host Management and assign a template via the Common Settings tab, then I blank out the Check interval, Retry Interval, Max attempts, and Check Period in in the Check Settings tab, then go into Alert Settings tabl i blank out Notification period and Notification interval because all these settings are set in the Template. Again, have done these steps for dozens of devices but now after using the wizard, then going into these tabs and the save I get a syntax error in RED, and can't save the host screen with my edits.

Error is:

Error while inserting data into database:
You have an eror in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to user near '` check_interval`=,
`retry_interval`=, `active_checks_enabled`=2', at line 8

Thx

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Tue Jan 20, 2015 5:00 pm
by abrist
There were some bugs in 2.0. Upgrading to 2.3 may solve this issue.
Also, check you mysql logs for crashed tables, etc:

Code: Select all

tail -25 /var/log/mysqld.log

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Wed Jan 21, 2015 9:40 am
by brdr
Hi, one of the first places I looked was the /var/log/mysqld.log file and nothing out of the ordinary stuck out.

I did perform an upgrade from 2.0 to 2.3 just now. I'm still unable to associate a host template to a new device added via the network switch/router wizard.

I am however able to add new linux host directly, associate a linux host template to it, and save without having to enter the settings for Check and Alert and without this syntax error.

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Wed Jan 21, 2015 10:10 am
by brdr
I also get this error when I try to add our service template for the bandwidth and status services checks that are created while adding a new device through the network switch and router swizard and get the same error.

In addition, when I edit an existing bandwidth service check to use our normal service template we get this same error.

So far this issue with updating hosts and services via CCM, in trying to use a template, is limited to network devices used within the wizard.

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Wed Jan 21, 2015 11:52 am
by lmiltchev
Can you post the template definition?

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Thu Jan 22, 2015 9:34 am
by brdr
Hi,

You can close this one. After further attempts to come up with the reason for this I determined the issue.

The issue that raises the MySQL syntax error is when I clear fields Check, Retry Interval, and Max Attempts and assign a template, is the way I'm clearing these fields. When i highlight these numberic fields and hit space it clears the number but is leaving a blank. Then save, the errror is raised. When I got back in a just deleted the numbers in the fields and save - it works as designed.

brdr

Re: XI MySQL Syntax issue - Adding Host with Host Template

Posted: Thu Jan 22, 2015 12:41 pm
by cmerchant
Ok. We'll go ahead and close the thread. Thanks.