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

poller doesn't update ifIndex using ifName port-association #7574

Closed
f0o opened this Issue Oct 28, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@f0o
Member

f0o commented Oct 28, 2017

If you use the ifName or ifDesc port-associations the ifIndex data in the DB is stale and won't get updated.

This breaks billing as it relies solely on ifIndex.

This is ugly but fixes it for now. Proper PR will be made tomorrow.

diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php
index 0a2c0d0..eed7728 100644
--- a/includes/polling/ports.inc.php
+++ b/includes/polling/ports.inc.php
@@ -437,6 +437,7 @@ foreach ($ports as $port) {
         $polled_period = ($polled - $port['poll_time']);
 
         $port['update'] = array();
+        $port['update']['ifIndex'] = $ifIndex;
         $port['update_extended'] = array();
         $port['state']  = array();
 

@f0o f0o added the Bug 🐞 label Oct 28, 2017

f0o added a commit to f0o/librenms that referenced this issue Oct 29, 2017

laf added a commit that referenced this issue Oct 30, 2017

@f0o f0o closed this Nov 6, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.