Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying /node/stats?format=json does not properly serialize the node stats #222

Open
ctrowat opened this issue May 6, 2021 · 4 comments

Comments

@ctrowat
Copy link

ctrowat commented May 6, 2021

When making a GET request to the specified endpoint node stats are not returned correctly. Instead I get a response like this:

{
    "DEVICE1": "#<Oxidized::Node::Stats:0x000055fbadc63230>",
    "DEVICE2": "#<Oxidized::Node::Stats:0x000055fbadc31168>",
    "DEVICE3": "#<Oxidized::Node::Stats:0x000055fbadb44110>",
    "DEVICE4": "#<Oxidized::Node::Stats:0x000055fbadc2a750>",
...
}
@fernandolcx
Copy link

same here

@github-actions github-actions bot added the Stale label May 18, 2024
@robertcheramy robertcheramy added bug and removed Stale labels Jun 12, 2024
@robertcheramy
Copy link
Collaborator

I can reproduce. ?format=text also not working.

@danwalkeruk
Copy link

Confirmed here, I made an issue on the other repo ytti/oxidized#3234, and it has been mentioned here before #182

I have zero Ruby knowledge, but from some brief poking and GPT-ing, it seems to be that within lib/oxidized/web/webapp.rb there needs to be a serialisation method for the Node::Stats class, as currently when it's converted to json, you just get the above.

Anyone with Ruby knowledge able to take a look? Doesn't seem a big fix for this one.

Copy link

This issue is stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the Stale label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants