DataStax Help Center

OpsCenter API call to get metrics on specific devices never completes

Summary

This article relates to OpsCenter API calls timing out for specific queries.

Symptoms

Some OpsCenter API queries either timeout or never complete.

For example, retrieving the metrics for all network interfaces returns the following:

$ curl -G http://myOpsCenter:8888/myCluster/metrics/10.1.2.3/os-net-sent/all
{"lo": {"AVERAGE": [[1463456040, 1338.9248046875], \
[1463456100, 1410.7618408203125], \
[1463456160, 1611.4544677734375]]}, \
"eth0": {"AVERAGE": [[1463456040, 128.9248046875], \
[1463456100, 202.60316467285156], \
[1463456160, 399.93121337890625]]}}

But when retrieving the metrics for a specific device, e.g. eth0, no results are returned:

$ curl -G http://myOpsCenter:8888/myCluster/metrics/10.1.2.3/os-net-sent/eth0

The following error is also reported in opscented.log:

2016-05-17 13:56:07+1000 []  INFO: Unhandled error in Deferred:
2016-05-17 13:56:07+1000 [] Unhandled Error
    Traceback (most recent call last):
      File "/home/ubuntu/opscenter-5.2.4/lib/py-debian/2.7/amd64/twisted/internet/defer.py", line 1076, in gotResult
        _inlineCallbacks(r, g, deferred)
      File "/home/ubuntu/opscenter-5.2.4/lib/py-debian/2.7/amd64/twisted/internet/defer.py", line 1063, in _inlineCallbacks
        deferred.callback(e.value)
      File "/home/ubuntu/opscenter-5.2.4/lib/py-debian/2.7/amd64/twisted/internet/defer.py", line 361, in callback
        self._startRunCallbacks(result)
      File "/home/ubuntu/opscenter-5.2.4/lib/py-debian/2.7/amd64/twisted/internet/defer.py", line 455, in _startRunCallbacks
        self._runCallbacks()
    ---  ---
      File "/home/ubuntu/opscenter-5.2.4/lib/py-debian/2.7/amd64/twisted/internet/defer.py", line 542, in _runCallbacks
        current.result = callback(current.result, *args, **kw)
      File "build/lib/python2.7/site-packages/opscenterd/TwistedRouter.py", line 236, in controllerSucceeded
        
      File "build/lib/python2.7/site-packages/opscenterd/WebServer.py", line 4306, in default_write
        
      File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps
        sort_keys=sort_keys, **kw).encode(obj)
      File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
        chunks = self.iterencode(o, _one_shot=True)
      File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
        return _iterencode(o, 0)
    exceptions.TypeError: keys must be a string

Cause

The cause of the issue in unknown and is currently being investigated (internal defect ID OPSC-8885).

Workaround

One option is to iterate through the results of the /metrics/<node_ip>/os-net-sent/all in your script or application to obtain the data for specific devices.

Another option is to use other system tools to monitor operating system-related metrics.

There is no available ETA at the time of writing. Please click the "follow" button below to subscribe to updates.

See also

DataStax doc - OpsCenter API - Retrieving metrics data

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk