XI MySQL Syntax issue - Adding Host with Host Template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

XI MySQL Syntax issue - Adding Host with Host Template

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

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

Post 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.
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

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

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post by lmiltchev »

Can you post the template definition?
Be sure to check out our Knowledgebase for helpful articles and solutions!
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

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

Post 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
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

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

Post by cmerchant »

Ok. We'll go ahead and close the thread. Thanks.
Locked