error when adding service to service group

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: error when adding service to service group

Post by dwhitfield »

Can you reproduce this issue without graphios? I don't want to blame graphios out of hand, but it's not something we support, and you've got some other weirdness in your kernel message queues.

Was this server anything before it was 5.4.11 (it seems like it probably was, since you are running postgres for the nagiosxi db)?

Lastly, I would highly suggest a ramdisk: https://assets.nagios.com/downloads/nag ... giosXI.pdf

I'm not sure the things I'm seeing are connected, but the ramdisk would help rule out some sort of performance issue.
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

Re: error when adding service to service group

Post by jh129666 »

I stopped graphios and the issue still occurs.

The server was 5.4.10 before it was upgraded to 5.4.11.

I'll look into the ramdisk.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: error when adding service to service group

Post by dwhitfield »

We stopped installing postgres in 2014, but if you've been iterating and have just now noticed this, it's unlikely the patch didn't get installed. Once thing you could do is re-run the 5.4.12 upgrade.

The problem with graphios is it means your filepaths are non-standard. I can't tell what's an error and what's just a remnant of a graphios install.

That said, it may be time now for you to open a ticket at https://support.nagios.com/tickets/

We can keep plugging away on the forum, but the ticket will get you a dedicate tech to take a closer look at the issue. If you go that route, please make sure you reference this ticket.
Last edited by dwhitfield on Tue Jan 30, 2018 3:27 pm, edited 1 time in total.
Reason: I think I was going to give a link to the 5.4.12. I has a random Th after the end of a sentence. I'm not sure.
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

Re: error when adding service to service group

Post by jh129666 »

I upgraded to 5.4.12 last week, and the issue started happening yesterday. I created a new service group and was able to add 988 services to it, and when I tried to add another one (989) I got the error.

Is it okay that postgres is still being used, or should we move away from that?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: error when adding service to service group

Post by dwhitfield »

jh129666 wrote: Error while inserting data into the database:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `id`=21' at line 3
Where do you see the error? If the UI, can you send a screenshot? It doesn't give a lot of info about the command being run. Another tech gave me the tbl, but after I've been digging into what I would assume are the relevant tables, I'm not seeing where you would actually increase this. It may be a full mysql setting. Can you send your /etc/my.cnf for review?

Also, we've noticed some strange things we think might be related to Spectre/Meltdown. Is there any chance you could reboot the server?
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

Re: error when adding service to service group

Post by jh129666 »

I see the error in the UI after I add the service to the service group and click the save button.

Here's the my.cnf file. I can reboot the server, but it will have to be later tonight as it's our production monitoring server.

[mysqld]
query_cache_size=16M
query_cache_limit=4M
tmp_table_size=64M
max_heap_table_size=64M
key_buffer_size=32M
table_open_cache=32

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: error when adding service to service group

Post by dwhitfield »

OK, I've found essentially the exact error at https://support.nagios.com/forum/viewto ... =6&t=45157

In /etc/php.ini, please change the following to the listed numbers (unless the numbers are higher than these):

max_execution_time = 60
max_input_time = 120
memory_limit = 256M

Also, please add the following line (this is the fix, but if you're in your php.ini you might as well up the others):
max_input_vars = 10000

After making these changes you'll need to restart the httpd service:

# service httpd restart
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

Re: error when adding service to service group

Post by jh129666 »

That resolved the issue. Thanks for all of your help!!!

You can close this.
Locked