Upgrade OpsCenter to version 5.2.2

opscenter-nodata

Today I decided how I upgraded OpsCenter on one of us cluster. One of reasons was that box "Cluster Health" still loading only and I want try the newest version.

This bring me some throuble (like every upgrade :-)). First I had to upgrade all datastax-agents on each node. After that on WebUI OpsCenter I saw "No Data" in some boxes (specifically a "write requests", "disk utilization", "write request latency" and "load").

Solution for this "No Data" trouble was some alters in cassandra keyspace for OpsCenter.

ALTER TABLE "OpsCenter"."events" ADD message text;
ALTER TABLE "OpsCenter"."events" ADD column_family text;
ALTER TABLE "OpsCenter"."events" ADD target_node text;
ALTER TABLE "OpsCenter"."events" ADD event_source text;
ALTER TABLE "OpsCenter"."events" ADD "keyspace" text;
ALTER TABLE "OpsCenter"."events" ADD api_source_ip text;
ALTER TABLE "OpsCenter"."events" ADD user text;
ALTER TABLE "OpsCenter"."events" ADD source_node text;
ALTER TABLE "OpsCenter"."events" with comment = '{"info": "OpsCenter management data.", "version": [5, 2, 2]}';
ALTER TABLE "OpsCenter"."rollups60" RENAME column1 to timestamp;
ALTER TABLE "OpsCenter"."rollups60" with comment = '{"info": "OpsCenter management data.", "version": [5, 2, 2]}';
ALTER TABLE "OpsCenter"."rollups300" RENAME column1 to timestamp;
ALTER TABLE "OpsCenter"."rollups300" with comment = '{"info": "OpsCenter management data.", "version": [5, 2, 2]}';
ALTER TABLE "OpsCenter"."rollups7200" RENAME column1 to timestamp;
ALTER TABLE "OpsCenter"."rollups7200" with comment = '{"info": "OpsCenter management data.", "version": [5, 2, 2]}';
ALTER TABLE "OpsCenter"."rollups86400" RENAME column1 to timestamp;
ALTER TABLE "OpsCenter"."rollups86400" with comment = '{"info": "OpsCenter management data.", "version": [5, 2, 2]}';

After this i saw data in all graph. Next step was increase replication factor on keyspace "Opscenter" and run "nodetool repair". This was rather tuning that upgrade step.

cqlsh> ALTER KEYSPACE "OpsCenter" WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'KO' : 3, 'NG' : 3 };

After all this steps OpsCenter was still unstable. OpsCenter and datastax-agents had connections trouble so big that the simplest way was drop keyspace for OpsCenter purge opscenter and datastax-agents and install it all again.

server:~ # apt-get purge opscenter datastax-agent
server:~ # cqlsh
cqlsh > DROP KEYSPACE "OpsCenter";
cqlsh >
server:~ # apt-get install opscenter datastax-agent
server:~ # service opscenter start
server:~ # service datastax-agent

After this Opscenter looks fine and we haven't one problem with that.