Page 1 of 1

SQL Errors importing services into service group

Posted: Mon Aug 14, 2017 5:12 pm
by jon2jay
Hello,

Testing a nagios xi install with the hopes of purchase, however running into issue. I have a service group named Techs. I imported 983 services to the group, however anything beyond this I am presented with the following error:

Error while inserting data into the database:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `id`=' at line 3

Odd thing is, if I add one of the services that fails in the above service group, to another service group, it takes without issue. I have 11000 more services I need to add under this service group, however I am unable to do so. I need these configured so I can separate service alerts accordingly.

Thank you in advance.

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 11:19 am
by dwhitfield
jon2jay wrote: I imported 983 services to the group.
How exactly did you do this import? Were you using https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 12:38 pm
by jon2jay
PMING You info now. Thank you.

Regarding import. I simply added my already imported services to service group (this is what I am trying to do)

Monitoring -> Service Groups -> (Select service group techs) -> Manage Services -> Selecting required services for this group. After 983 services being added, I now get presented w/ the SQL Syntax error. However, as mentioned previously, if I add the next server in the list to a different service group, it adds w/o issue.

sys info -



cat /etc/system-release
CentOS release 6.9 (Final)

PHP 5.4.45 (cli) (built: Feb 18 2017 15:55:26)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Mysql Version: '5.1.73'

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 12:40 pm
by jon2jay
It won't let me PM you

Nagios XI - System Info
System:
Nagios XI Version : 5.4.8
overwatch 2.6.32-696.6.3.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.4.45
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Server Name: ---
Server Address: 10.0.201.15
Server Port: 80
Date/Time
PHP Timezone: US/Eastern
PHP Time: Tue, 15 Aug 2017 13:33:47 -0400
System Time: Tue, 15 Aug 2017 13:33:47 -0400
Nagios XI Data
License ends in:

Days left in Trial: 48

nagios (pid 18986) is running...
NPCD running (pid 2384).
ndo2db (pid 2414) is running...
CPU Load 15: 1.80
Total Hosts: 1441
Total Services: 11406
Function 'get_base_uri' returns: http://---/nagiosxi/
Function 'get_base_url' returns: http://---/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://---/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost
Running:

/bin/ping -c 3 localhost 2>&1

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.023 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.014 ms

--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.014/0.023/0.034/0.009 ms
Test wget To localhost
WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:

/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/

--2017-08-15 13:33:49-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosxi/login.php?red ... f&noauth=1 [following]
--2017-08-15 13:33:49-- http://localhost/nagiosxi/login.php?red ... f&noauth=1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: "/usr/local/nagiosxi/tmp/ccm_index.tmp"

0K .......... .......... ..... 2.52M=0.01s

2017-08-15 13:33:49 (2.52 MB/s) - "/usr/local/nagiosxi/tmp/ccm_index.tmp" saved [26361]

Network Settings

1: lo: mtu 65536 qdisc noqueue state UNKNOWN

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

inet6 ::1/128 scope host

valid_lft forever preferred_lft forever

2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000

link/ether 00:50:56:b9:28:04 brd ff:ff:ff:ff:ff:ff

inet 10.0.201.15/24 brd 10.0.201.255 scope global eth0

inet6 fe80::250:56ff:feb9:2804/64 scope link

valid_lft forever preferred_lft forever


10.0.201.0/24 dev eth0 proto kernel scope link src 10.0.201.15

169.254.0.0/16 dev eth0 scope link metric 1002

default via 10.0.201.1 dev eth0

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 1:20 pm
by dwhitfield
PM didn't come, but I suspect a PHP error limit. Please try to PM the profile again. Also, either attach here or PM your /etc/my.cnf and /etc/php.ini

also, you might just try increasing max_input_vars to 10000 in /etc/php.ini.

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 1:52 pm
by jon2jay
Couldn't PM due to limits on my user account. HOWEVER,

Seems that was the issue (I increased a few timeouts as well) However, likely max_input_vars was the culprit. RESOLVED.

Is there any major downfalls of 10,000 services within one group?

Re: SQL Errors importing services into service group

Posted: Tue Aug 15, 2017 2:06 pm
by dwhitfield
jon2jay wrote: I have 11000 more services I need to add under this service group
I suppose I should have suggested 12000 instead of 10000 for max_input_vars, although if you were doing them in chunks I guess that wouldn't be an issue.

As to the question at hand, you might run into some MySQL limitations, which is why I wanted to take a look at the /etc/my.cnf, but there are no intrinsic issues.

I am curious if there is any more planned growth on this system. 20k is a soft limit, so you aren't particularly close to that, but it's large enough that I'm curious.