Page 2 of 2

Re: api reports success but host does not get added

Posted: Fri Aug 13, 2021 7:15 am
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.

Re: api reports success but host does not get added

Posted: Fri Aug 13, 2021 2:15 pm
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.

Re: api reports success but host does not get added

Posted: Fri Aug 13, 2021 2:33 pm
by gsmith