Skip to content
Ric Lister edited this page May 24, 2013 · 2 revisions

Opscenter source displays time-series data about your cassandra ring using the opscenter API.

Metric options

  • type: opscenter
  • target: available targets are listed in the opscenter api docs and generally take the form: {cluster_id}/cluster-metrics/{dc}/{metric}, see below for examples
  • function: aggregation to perform at source on the metric: min, max, or average

Example

Dash.stats()
  .config({
    type:     'opscenter',
    source:   'http://opscenter:8888',
    function: 'average',
    display:  'last'
  })
  .add(
    {
      title:  'Read ops',
      target: 'my_keyspace/cluster-metrics/all/read-ops'
    },
    {
      title:  'Write ops',
      target: 'my_keyspace/cluster-metrics/all/write-ops'
    }
  );

Find

The opscenter source .find() function will return a list of column families.

For example, show write ops for all CFs:

Dash.stats()
  .find({
    type:   'opscenter',
    source: 'http://opscenter:8888',
    target: 'my_keyspace/keyspaces/my_keyspace',
    add: function(cf) {
      return {
        title:   cf.replace(/_/g, ' '),
        target:  'my_keyspace/cluster-metrics/all/my_keyspace/' + cf + '/cf-write-ops',
        display: 'last'
      }
    }
  });
Clone this wiki locally