This isn't an ODW issue - looks like at some point the database upgrade processes skipped a step for some reason and 'date_format' is missing fro the ospview.systempreferences table.  This was added in ospview db schema version 3.11.9

Run this on your system in MySQL for the opsview db and see if it helps

==
use opsview;
ALTER TABLE systempreferences ADD COLUMN date_format ENUM ("us", "euro", "iso8601", "strict-iso8601") DEFAULT "euro" NOT NULL;
==

  Duncs


On 20 Nov 2011, at 22:42, Dennison Williams wrote:

On 11/20/2011 12:45 PM, Duncan Ferguson wrote:

On 19 Nov 2011, at 19:04, Dennison Williams wrote:

I just downloaded the opsview 3.0 appliance and am considering using it
for my production opsview instance.  It looks promising so far.  I would
however like to get my old data onto it.  I followed the instructions at
http://docs.opsview.com/doku.php?id=opsview3.0:migratinghardware and
everything works fine up to the installer/upgradedb_opsview.pl part.  I
did not notice that the upgrade was not performed until I got an error
when trying to startup opsview-web (error below).  I verified that the
configured users in opsview.conf are able to connect to the databases,
and that the tables in the databases contain the data from my actual
production instance.  In starting to dig through the code I found that
the odw schema version is 2.7.8. I am not at a loss for how to proceed,
and help would be appreciated.

Please post the full output from running the upgrade.pl script


# ./upgradedb.pl
Sun Nov 20 22:34:25 2011: Starting for opsview
Opsview database already up to date
Sun Nov 20 22:34:25 2011: Finished for opsview
Upgrading Nagios part of Runtime database
Sun Nov 20 22:34:25 2011: Starting for runtime-nagios
Upgrading Opsview part of Runtime database
Sun Nov 20 22:34:25 2011: Starting for runtime-opsview
Database already up to date
Sun Nov 20 22:34:25 2011: Finished for runtime-opsview
Sun Nov 20 22:34:25 2011: Finished for runtime-nagios
Upgrading ODW database
Sun Nov 20 22:34:26 2011: Starting for odw
Database already up to date
Sun Nov 20 22:34:26 2011: Finished for odw

This is the problem I am talking about there is no error message but the
db schema version still shows 2.7.8 for odw after this runs and opsview
throws an error when trying to start with the following message:

# /etc/init.d/opsview-web start
Starting opsview-web: Couldn't load class (Opsview::Web) because:
DBIx::Class::ResultSet::find(): DBI Exception: DBD::mysql::st execute
failed: Unknown column 'me.date_format' in 'field list' [for Statement
"SELECT me.id, me.default_statusmap_layout, me.default_statuswrl_layout,
me.refresh_rate, me.log_notifications, me.log_service_retries,
me.log_host_retries, me.log_event_handlers, me.log_initial_states,
me.log_external_commands, me.log_passive_checks, me.daemon_dumps_core,
me.date_format, me.audit_log_retention, me.host_info_url,
me.hostgroup_info_url, me.service_info_url, me.enable_odw_import,
me.enable_full_odw_import, me.odw_large_retention_months,
me.odw_small_retention_months, me.opsview_server_name,
me.soft_state_dependencies, me.show_timeline,
me.smart_hosttemplate_removal, me.rancid_email_notification,
me.send_anon_data, me.uuid, me.netdisco_url, me.updates_includemajor
FROM opsview.systempreferences me WHERE ( me.id = ? )" with ParamValues:
0=1] at /usr/local/opsview-web/script/../lib/Opsview/Web.pm line 421
Compilation failed in require at
/usr/local/nagios/perl/lib/i486-linux-gnu-thread-multi/Class/MOP.pm line
117.
at /usr/local/nagios/perl/lib/i486-linux-gnu-thread-multi/Class/MOP.pm
line 123
       Class::MOP::__ANON__('DBIx::Class::ResultSet::find(): DBI
Exception: DBD::mysql::st...') called at
/usr/local/nagios/perl/lib/Try/Tiny.pm line 100
       Try::Tiny::try('CODE(0x88d4a08)',
'Try::Tiny::Catch=REF(0x90cc934)') called at
/usr/local/nagios/perl/lib/i486-linux-gnu-thread-multi/Class/MOP.pm line 128
       Class::MOP::load_first_existing_class('Opsview::Web') called at
/usr/local/nagios/perl/lib/i486-linux-gnu-thread-multi/Class/MOP.pm line 140
       Class::MOP::load_class('Opsview::Web') called at
/usr/local/nagios/perl/lib/Catalyst/ScriptRole.pm line 48

Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0x90cccdc)')
called at /usr/local/nagios/perl/lib/Catalyst/Script/Server.pm line 192

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x90cccdc)') called
at /usr/local/nagios/perl/lib/Catalyst/ScriptRunner.pm line 20
       Catalyst::ScriptRunner::run('Catalyst::ScriptRunner',
'Opsview::Web', 'Server') called at script/opsview_web_server.pl line 9

Also, can you confirm what version you are upgrading from and to?


I am upgrading from opsview 3.9.1 to 3.13.1.

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


  Duncs

-- 
Duncan Ferguson
Support Team Leader
Opsview




Tel: +44 845 057 7887
Mobile: +44 (0) 7968 148 748
Email: [email protected]
Skype: duncan_j_ferguson

www.opsview.com

This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although we routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsview is the trading name for Opsera Limited, a company registered in the UK under Company Number 5396532. Our registered office is Gorse View, Horsell Rise, Woking, Surrey, GU21 4RB, UK


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

Reply via email to