Git Product home page Git Product logo

Comments (7)

neurodrone avatar neurodrone commented on May 24, 2024

Interesting. Which version of Ceph are you running?

from ceph_exporter.

craig08 avatar craig08 commented on May 24, 2024

Ceph Jewel 10.2.5

from ceph_exporter.

neurodrone avatar neurodrone commented on May 24, 2024

Thanks! I will look at pushing out a fix for this soon.

from ceph_exporter.

craig08 avatar craig08 commented on May 24, 2024

The value -nan is hard to unmarshal because it is neither a valid number nor a valid double quoted string.
Due to golang does not support unmarshal nan and inf number in json, I came up with a dumb solution to replace all -nan in the response of MonCommand to 0.

buf = bytes.Replace(buf, []byte(":-nan"), []byte(":0"), -1)

And it seems to work. Do you have any other tidy solution or should I send a pull request to you?

from ceph_exporter.

neurodrone avatar neurodrone commented on May 24, 2024

Oh sure, feel free to send a PR up! At the rate of things I have scheduled, it looks like I will be able to get to this earliest by Friday.

from ceph_exporter.

neurodrone avatar neurodrone commented on May 24, 2024

There's a tracker for making sure the invalid json gets addressed: http://tracker.ceph.com/issues/18239 but there has been no movement on that yet. It's weird to make the change to replace that specific string in a JSON output, but a hacky solution will at least get this working until the fix goes out.

from ceph_exporter.

craig08 avatar craig08 commented on May 24, 2024

I just sent a pull request to make a workaround by this method. Feel free to reject or amend the commit.
Thank you very much.

from ceph_exporter.

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.