Have you upgraded your opsview installation? It seems that the update script failed to upgrade the db schema.

Try to excute this on mysql console as root user and compare the output with mine:

mysql> use opsview;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show create table notificationprofile_hostgroups;
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| notificationprofile_hostgroups | CREATE TABLE `notificationprofile_hostgroups` (
  `notificationprofileid` int(11) NOT NULL,
  `hostgroupid` int(11) NOT NULL,
  PRIMARY KEY (`notificationprofileid`,`hostgroupid`),
  KEY `notificationprofileid` (`notificationprofileid`),
  KEY `hostgroupid` (`hostgroupid`),
CONSTRAINT `notificationprofile_hostgroups_hostgroupid_fk` FOREIGN KEY (`hostgroupid`) REFERENCES `hostgroups` (`id`) ON DELETE CASCADE, CONSTRAINT `notificationprofile_hostgroups_notificationprofileid_fk` FOREIGN KEY (`notificationprofileid`) REFERENCES `notificationprofiles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql>

Another check can be done enabling the mysql general log, and seeing what is written on that log. You must check also the mysql error log for errors.

Bye,
Emilio



Il 27/05/2010 10:09, Michael Stecker ha scritto:
Hi,

Today I discovered that i can't edit or create contacts in Opsview any more. Every time I try I get the following exception:

Errors encountered: Caught exception in Opsview::Web::Controller::Admin::Contact->save "DBIx::Class::ResultSet::delete(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'contactid' in 'where clause' [for Statement "DELETE FROM notificationprofile_hostgroups WHERE ( ( hostgroupid NOT IN ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) AND contactid = ? ) )" with ParamValues: 0='149', 1='96', 2='147', 3='127', 4='141', 5='122', 6='121', 7='156', 8='58', 9='157', 10='68', 11='90', 12='94', 13='19', 14='148', 15='98', 16='130', 17='159', 18='139', 19='67', 20='89', 21='124', 22='125', 23='108', 24='111', 25='91', 26='31', 27='71', 28='65', 29='95', 30='129', 31='20', 32='123', 33='103', 34='76', 35='126', 36='77', 37='33', 38='138', 39='99', 40='118', 41='112', 42='114', 43='155', 44='5', 45='116', 46='153', 47='158', 48='151', 49='78', 50='113', 51='154', 52='115', 53='22', 54='117', 55='56', 56='133', 57='100', 58='41', 59='120', 60='142', 61='64', 62='93', 63='8', 64='69', 65='29', 66='81', 67='131', 68='74', 69='79', 70='101', 71='36', 72='62', 73='24', 74='135', 75='92', 76='160', 77='140', 78='72', 79='995'] at /usr/local/nagios/lib/Opsview/ResultSet/Contacts.pm line 103"

I already figured out, that the Table "notificationprofile_hostgroups" is empty. Is this perhaps the problem?

I'm using Opsview 3.7.0 on Debian Lenny.

Any Ideas?

Thanks

Michael


_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to