NAGIOSQL error when creating new service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nuggi
Posts: 2
Joined: Sat Jul 02, 2016 2:03 pm

NAGIOSQL error when creating new service

Post 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?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NAGIOSQL error when creating new service

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nuggi
Posts: 2
Joined: Sat Jul 02, 2016 2:03 pm

Re: NAGIOSQL error when creating new service

Post by nuggi »

Whats the easiest way to recreate the database?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NAGIOSQL error when creating new service

Post 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.
Former Nagios Employee
Locked