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 for hrStorageIndex agility #15028
Conversation
Thank you for looking into this! I've been trying to figure out a fix for this for many versions! |
Would it be possible to index on something else, like mountpoint instead? Guessing it breaks the design too much? |
HOST-RESOURCES-MIB::hrStorageTable doesn't have the mount point unfortunately.
|
Mounts changing hrStorageIndex is a really annoying bug in your snmpd implementation... |
@murrant tested works ok Test with JunOS EVO box Pre-Test : Set device 42 into non-polling poller group? (use GROUP 5 TYO ) Control Test
Results -> Notice the index's change, and the storage_used, storage_free etc follow the index, so are set incorrectly in 'test2' for id=1597 Patch Test On second dispatcher perform the following
Results -> Notice the index's change HOWEVER the storage_used, storage_free etc follow the description, so are set correctly in 'test2' for id=1597 Post-Test set device back to poller group = 0 |
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
* fix for hrStorageIndex agility * test for array * Handle not found data * Handle description changed correctly * remove debug --------- Co-authored-by: Tony Murray <murraytony@gmail.com>
* fix for hrStorageIndex agility * test for array * Handle not found data * Handle description changed correctly * remove debug --------- Co-authored-by: Tony Murray <murraytony@gmail.com>
Please give a short description what your pull request is for
It is possible that the HOST-RESOURCES-MIB::hrStorageTable has updated between discovery and polling. If we assume it hasn't we can end up assigning the values of the wrong mount point to another mount point. This can cause
issues with not only display, but also alarming.
We can compare the description expected with one from the hrStorageIndex entry and if they are not equal then we can filter the table to return an entry that does match.
We have found with JunOS EVO when anyone logs into the box it mounts
tmpfs 3.1G 0 3.1G 0% /run/user/{uid}
which causes the ordering of the HOST-RESOURCES-MIB::hrStorageTable to change which causes all sorts of issues ... (like Storage alarms because some partition just got muddled up with some other suppressed partition (ie a loopback mount) that has 0% free space)
Please note
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.