Changeset 1755

Show
Ignore:
Timestamp:
12/03/08 11:21:44 (1 month ago)
Author:
ton
Message:

RRD migration initiated from db upgrade scripts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/DEV-opsview3/CHANGES

    r1748 r1755  
    44        Convert all mysql datetime fields into UTC 
    55        nagiosgraph forked and now part of opsview-core package. Creates new style RRDs if the old ones do not exist 
     6        Old style RRDs are upgraded as part of the database upgrade process 
    67        Updated scriptaculous to 1.8.2 
    78 
  • branches/DEV-opsview3/opsview-core/bin/db_opsview

    r1731 r1755  
    787787        INSERT INTO schema_version (major_release, version) VALUES ('2.13', '2'); 
    788788        INSERT INTO schema_version (major_release, version) VALUES ('2.14', '2'); 
    789         INSERT INTO schema_version (major_release, version) VALUES ('3.0', '2'); 
     789        INSERT INTO schema_version (major_release, version) VALUES ('3.0', '3'); 
    790790 
    791791EOF 
  • branches/DEV-opsview3/opsview-core/installer/migrate_rrds

    r1751 r1755  
    5959closedir D; 
    6060 
     61my $now = scalar localtime; 
     62print "$now: Starting RRD migration\n"; 
    6163my $rrd_migration_flag = "/usr/local/nagios/var/rrd_migration.flag"; 
    6264open F, "> $rrd_migration_flag" or die "Cannot create migration flag"; 
     
    235237 
    236238unlink $rrd_migration_flag; 
     239$now = scalar localtime; 
     240print "$now: Finished migration\n"; 
    237241 
    238242# From insert.pl 
  • branches/DEV-opsview3/opsview-core/installer/upgradedb_opsview.pl

    r1731 r1755  
    13331333 
    13341334if ($db->is_lower("3.0.2")) { 
     1335        print "Updating all auditlog entries to UTC - this may take some time\n"; 
    13351336        $dbh->do("UPDATE auditlogs SET datetime=CONVERT_TZ(datetime, 'SYSTEM', '+00:00')"); 
    13361337        $db->updated; 
    13371338} 
    13381339 
     1340# Bit cheeky - this migration is run as if there is a db change, although no change has actually occurred  
     1341# at DB level. This ensures it is only run the once 
     1342if ($db->is_lower("3.0.3")) { 
     1343        print "Updating RRDs - running this in the background. Check /tmp/migrate_rrds.log for status\n"; 
     1344        system("nohup nice -n 20 /usr/local/nagios/installer/migrate_rrds >> /tmp/migrate_rrds.log 2>&1 &"); 
     1345        $db->updated; 
     1346} 
    13391347 
    13401348if ($opts->{t}) {