Coder Social home page Coder Social logo

Fix Cassandra metrics about dd-agent HOT 7 CLOSED

alq666 avatar alq666 commented on July 17, 2024
Fix Cassandra metrics

from dd-agent.

Comments (7)

alq666 avatar alq666 commented on July 17, 2024

To build the agent, simply edit config.py to bump up the version and git push. Jenkins will take care of the rest (building and deploying to staging).

tests/test_cassandra contains some basic tests (in particular for cfstats).

from dd-agent.

clofresh avatar clofresh commented on July 17, 2024

Is this error related? Saw it in syslog:

float() argument must be a string or a number
Traceback (most recent call last):
  File "/usr/share/datadog/agent/checks/cassandra.py", line 296, in check
    self._parseInfo(pipe.read(), results)
  File "/usr/share/datadog/agent/checks/cassandra.py", line 76, in _parseInfo     
    results["token"] = float(Cassandra._find(lines, r"^Token[^:]+: ([0-9]+)$"))
TypeError: float() argument must be a string or a number

from dd-agent.

alq666 avatar alq666 commented on July 17, 2024

What to do:

  1. move cassandra to the new checks.d interface
  2. tag cfstats by "keyspace" and "cf", rather than creating a device, prefix metrics with "cassandra" to match the old metrics name without going through the flatten_cassandra bit in the agent-driver.

from dd-agent.

alq666 avatar alq666 commented on July 17, 2024

Time to move to jmx to get these stats. nodetool's format is just too brittle.

from dd-agent.

alq666 avatar alq666 commented on July 17, 2024

I've done some research on alternate ways to get jmx data from python. None are fundamentally more appealing than jmxterm (from calling java objects in python via some elaborate but very alpha method to running extra servlet to convert jmx into json), save implementing JRMP natively in python.

So jmxterm it is. What would be interesting is profiling the python code that traverses all the mbeans of a cassandra node (e.g. running 1.1.6).

from dd-agent.

remh avatar remh commented on July 17, 2024

I'm afraid it can really takes a while to go through all mbeans, I'll write a small script that does that and profile it to be sure.

from dd-agent.

alq666 avatar alq666 commented on July 17, 2024

Ok, go ahead and time it. Else we can extend jmxterm to dump all the attributes in 1 command.

from dd-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.