Opscenter 5.2 缺少 1 天和 1 周图表比例的数据

Opscenter 5.2 缺少 1 天和 1 周图表比例的数据

我最近将 Opscenter 从 5.1 更新到 5.2,昨天才发现,如果我选择不同的 1 天或 1 周图表比例,图表中将不会显示任何数据。我检查了日志和 chrome 控制台,没有问题,请求数只有 200,响应中没有数据:

curl 'http://cassandra.mydomain.com:8888/keyspace/new-metrics?metrics=read-repair-attempted&start=1437630985&end=1438250185&step=7200&forecast=0&node_aggregation=1&node_group=*'
response
{"aggregation_function": {"thrift-connections": "Total"}, "columnfamilies": [], "bounds": {"start": 1437624000, "step": 7200, "end": 1438250400}, "metrics": ["thrift-connections"], "nodes": ["10.0.1.178", "10.0.3.148", "10.0.2.145", "10.0.2.172", "10.0.3.86", "10.0.1.29"], "data": {"*": [{"metric": "thrift-connections", "data-points": []}]}}

我使用 cqlsh 检查了 Opscenter 键空间,并确认数据是否存在,例如:

cqlsh:OpsCenter> SELECT * FROM rollups7200 LIMIT 2;
 key                                                   | column1   | value
-------------------------------------------------------+-----------+----------------------------
 10.0.1.172-keyspace-hostinfo-getWriteCount | 730437247 | 0x3beb2702000000003eb26e06
 10.0.1.172-keyspace-hostinfo-getWriteCount | 730444447 | 0x3bc9ff51000000003eb25444
(2 rows)
cqlsh:OpsCenter> SELECT * FROM rollups86400  LIMIT 2;
 key                                                   | column1   | value
-------------------------------------------------------+-----------+----------------------------
 10.0.1.172-keyspace-hostinfo-getWriteCount | 730437247 | 0x3bb54ce4000000003eb2765d
 10.0.1.29-keyspace-hostinfo-getPendingTasks | 710392447 | 0x3dbbac7e0000000042f80000

* 更新 *

这里是 Opscenter 键空间的描述:

CREATE KEYSPACE "OpsCenter" WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '2'
};

USE "OpsCenter";

CREATE TABLE backup_reports (
  week text,
  event_time timestamp,
  backup_id text,
  type text,
  destination text,
  deleted_at timestamp,
  full_status text,
  keyspaces text,
  status text,
  PRIMARY KEY ((week), event_time, backup_id, type, destination)
) WITH CLUSTERING ORDER BY (event_time DESC, backup_id ASC, type ASC, destination ASC) AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=0.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='99.0PERCENTILE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE bestpractice_results (
  key text,
  column1 varint,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  CLUSTERING ORDER BY (column1 DESC) AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE events (
  key text,
  action bigint,
  column_family text,
  level bigint,
  message text,
  success boolean,
  target_node text,
  time bigint,
  PRIMARY KEY ((key))
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 2, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE events_timeline (
  key text,
  column1 bigint,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE pdps (
  key text,
  column1 text,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE rollups300 (
  key text,
  "timestamp" varint,
  value blob,
  PRIMARY KEY ((key), "timestamp")
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 2, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE rollups60 (
  key text,
  "timestamp" varint,
  value blob,
  PRIMARY KEY ((key), "timestamp")
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 2, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE rollups7200 (
  key text,
  column1 varint,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE rollups86400 (
  key text,
  column1 varint,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.250000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

CREATE TABLE settings (
  key blob,
  column1 blob,
  value blob,
  PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='{"info": "OpsCenter management data.", "version": [5, 1, 0]}' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  index_interval=128 AND
  read_repair_chance=1.000000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='NONE' AND
  memtable_flush_period_in_ms=0 AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};

答案1

因此,看起来有些架构升级失败。您可以尝试重新启动 opscenterd 以查看它是否运行。rollups7200 表仍在运行 5.1.0(请参阅架构中​​的注释)。您也可以手动修复此问题:

ALTER TABLE "OpsCenter".rollups7200 RENAME column1 to timestamp

相关内容