Page 1 of 1

NAGIOSQL error when creating new service

Posted: Mon Jul 04, 2016 1:42 am
by nuggi
This problem occured after i deleted every single service inside NAGIOSQL Supervision. I was testing something and decided to start from scratch when i discovered that deleting all services apparently broke something. Now when i'm trying to create a new service inside NagiosQL i get the following error: "Error while inserting the data into the database
:Field 'import_hash' doesn't have a default value" I know this has something to do with the SQL query, but i have no idea what to do with this error, and sadly hours of google searching provided no answers for my case. Do i have to start over again, or is there any easy way to fix this error?

Re: NAGIOSQL error when creating new service

Posted: Mon Jul 04, 2016 10:52 pm
by Box293
It's probably easier to re-install Nagios QL, or at least re-create the database.

Perhaps run up another server and install NagiosQL on it and then backup the database and restore it on your original server.

Re: NAGIOSQL error when creating new service

Posted: Wed Jul 06, 2016 12:40 am
by nuggi
Whats the easiest way to recreate the database?

Re: NAGIOSQL error when creating new service

Posted: Wed Jul 06, 2016 9:40 am
by rkennedy
nuggi wrote:Whats the easiest way to recreate the database?
It's what @Box293 mentioned -
Perhaps run up another server and install NagiosQL on it and then backup the database and restore it on your original server.
This would preserve the structure of QL, and allow you to then dump it on the new server and import the SQL dump to your old server.