api reports success but host does not get added

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
warapp
Posts: 33
Joined: Thu Jan 25, 2018 3:22 pm

Re: api reports success but host does not get added

Post by warapp »

I removed this component and 2 others earlier this week, following instructions here, https://support.nagios.com/forum/viewto ... 16&t=61205

rm -rf /usr/local/nagiosxi/html/includes/components/nagiosim
rm -rf /usr/local/nagiosxi/html/includes/components/active_directory
rm -rf /usr/local/nagiosxi/html/includes/components/ldapauth

Removing these had no affect on the api issue.
warapp
Posts: 33
Joined: Thu Jan 25, 2018 3:22 pm

Re: api reports success but host does not get added

Post by warapp »

Changing mysql sql_mode to "" has corrected this issue.

I modified the systemd unit file and set sql mode here ...

ExecStart=/usr/libexec/mysqld --basedir=/usr --log-error --sql-mode=""

Mode now shows empty string ...
$ mysql -u root -p'nagiosxi' -e "SELECT @@GLOBAL.sql_mode;"
+-------------------+
| @@GLOBAL.sql_mode |
+-------------------+
| |
+-------------------+

---------------------------------

I am now able to add hosts via the api and they appear on disk, in xi and in core. This change appears to have corrected the api issue.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: api reports success but host does not get added

Post by gsmith »

Locked