Project

General

Profile

Actions

Feature #8574

closed

Enable AgentX-support in lldpd using GUI

Added by Nicklas Björk over 6 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
lldpd
Target version:
-
Start date:
06/14/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:

Description

The lldpd-package provided by the package manager seems to be compiled with AgentX-support, but there is nowhere to activate it using the GUI. An AgentX sub-agent can connect to Net-SNMP and would in this case make LLDP-information available over SNMP.

In the Net-SNMP configuration, AgentX has to be enabled. I suppose this could also be added as a GUI option in the Net-SNMP package, but can for now be added to the Custom Options.

master agentx

I made the following changes, which will add the flag -x to the lldpd command line:

--- /usr/local/www/lldpd_settings.php.orig      2018-06-14 11:06:34.932043000 +0200
+++ /usr/local/www/lldpd_settings.php   2018-06-14 11:22:26.464359000 +0200
@@ -63,6 +63,7 @@
                $lldpd = array();
                $lldpd['enable'] = $pconfig['enable'];
                $lldpd['receiveonly'] = $pconfig['receiveonly'];
+               $lldpd['agentx'] = $pconfig['agentx'];
                $lldpd['interfaces'] = $pconfig['interfaces'];
                $lldpd['chassis'] = $pconfig['chassis'];
                $lldpd['management'] = $pconfig['management'];
@@ -150,6 +151,13 @@
        $pconfig['receiveonly']
 ));

+$section->addInput(new Form_Checkbox(
+       'agentx',
+       'Enable AgentX',
+       'With this option, lldpd will enable an SNMP subagent using AgentX protocol',
+       $pconfig['agentx']
+));
+
 $section->addInput(new Form_Select(
        'interfaces_a',
        'Interfaces',

--- /usr/local/pkg/lldpd/lldpd.inc.orig 2018-06-14 11:10:58.582840000 +0200
+++ /usr/local/pkg/lldpd/lldpd.inc      2018-06-14 11:11:41.649295000 +0200
@@ -155,6 +155,10 @@
                }
        }

+       if ($lldpd_config['agentx'] == 'yes') {
+               $cmd .= ' -x';
+       }
+
        /* Write the rc script */
        $start = "      $cmd";
        $stop = "       /usr/bin/killall -q lldpd";

LLDP information can then be queried using the LLDP-MIB tree at .1.0.8802.1.1.2.

Actions

Also available in: Atom PDF