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

Fix: netstats-udp, tcp and ip rrd's not updating #10197

Merged
merged 7 commits into from May 10, 2019

Conversation

Projects
None yet
5 participants
@slashdoom
Copy link
Contributor

commented May 7, 2019

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@CLAassistant

This comment has been minimized.

Copy link

commented May 7, 2019

CLA assistant check
All committers have signed the CLA.

@slashdoom

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

Seems to have broken with PR #9537. Attempt to fix.

@slashdoom

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

CLA is signed.

@CirnoT

This comment has been minimized.

Copy link
Contributor

commented May 7, 2019

You have to click link to recheck CLA.

@CirnoT

This comment has been minimized.

Copy link
Contributor

commented May 7, 2019

These changes make no sense to me. Does it actually work for you? All it did for me was to generate empty RRD file with no actual data.

chrome_2019-05-07_15-15-20

@murrant

This comment has been minimized.

Copy link
Member

commented May 7, 2019

The fix isthe correct approach (LibreNMS now escapes all snmp arguments). Need to use an array so each oid gets escaped individually instead of all together.

Just the data isn't formatted as expected after the change. I'll update netstats-ip.inc.php to show what I think is the correct fix.

murrant and others added some commits May 7, 2019

@slashdoom

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

Thanks all. Updates pushed and seems to working/graphing.

@murrant

This comment has been minimized.

Copy link
Member

commented on includes/polling/netstats/netstats-ip.inc.php in d4079c4 May 8, 2019

$fields is always set, you might as well remove the check if you do that. The check should probably be isnumeric() anyway.

slashdoom added some commits May 8, 2019

@slashdoom

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

That makes sense. So I've changed back to checking $data and changed the checks to is_numeric(). I also moved the if statement up so it doesn't run the for loop if the checks fail.

@murrant murrant added the Bug 🐞 label May 10, 2019

@murrant

This comment has been minimized.

Copy link
Member

commented May 10, 2019

Thanks @slashdoom 👍

@murrant murrant merged commit 517a32c into librenms:master May 10, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details

spencerbutler added a commit to spencerbutler/librenms that referenced this pull request May 21, 2019

Fix: netstats-udp, tcp and ip rrd's not updating (librenms#10197)
* netstats fixes

* code climate

* Update netstats-ip.inc.php

* fixes

* code climate

* GH feedback changes

* codeclimate

@lock lock bot locked as resolved and limited conversation to collaborators Jul 9, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.