Support for Custom Default SMNP Port #237

merged 6 commits into from Jun 20, 2014


None yet

3 participants


This adds a default port option for the SMNP client on the remote host to
It then updates the addhost page to use the setting thats been set.
This will allow people like me who run SNMP on a custom port on all systems to set the port once in configuration instead of every time we add a host.

bohdan-s added some commits Jun 20, 2014
bohdan-s SNMP Default Port Support
Add options to defaults for SNMP Client port
bohdan-s SNMP Default Port Support
Use configured SNMP port rather than hard coded.
bohdan-s SNMP Default Port Support
Fix Typo #1

Hi bohdan-s,

Thanks for the patch. Scrutinizer is reporting an issue that looks worth investigating:

Any comments?


laf commented Jun 20, 2014

Those aren't related to what bohdan-s has added. 2 of them are the usual code is duplicated across project, the other one is because the php file doesn't see $config being declared across all paths which it won't as it's set elsewhere.

Looks good to merge to me.

bohdan-s SNMP Default Port Support
Add support for SNMP v3 as well as SNMP v1/v2c

Thanks laf, Thats what i thought as well, just added commit fixing SNMPv3 which I missed.
Sorry this is the first time I have worked with Git so please feel free to correct me if I do anything wrong.

bohdan-s Create
Documentation for using Lighttpd instead of Apache as the web server.
Test and running for over 2 weeks on my own server.

Ok, I am confused now, every change I am making is being added to this pull request.
I'n going to go read up on how to use git and I'll come back and fix it up.

bohdan-s Delete
Undo for commit

Sorry guys,
Fixed, will follow the (issue-xxx branch) method for next commit.

laf commented Jun 20, 2014

I was exactly the same when I started :)

In essence what you should do is create a local branch for each pull request you want. You can do this by running:

git push origin master:lighttpd

This will create a new local branch called lighttpd, change to this by doing

git checkout lighttpd

Make your changes and once done do:

git push origin lighttpd

Now in your github account you will see a new branch which you can submit a pr for which will just contain those changes. So for this, do one for lighttpd and one for snmp port.

Please bear in mind that your master though will now be out of sync with librenm's due to this pull request. So you will need to get your master back in sync, at this early stage it may just be easier to re-clone the librenms/librenms repo and start again (backup your changes so you can re-apply them).

Any questions jump on irc :)

laf commented Jun 20, 2014

Haha you fixed it before I finished typing my reply :) Most of what I've said stands though except if we merge this change then your local branch will be clean.

@laf laf merged commit 329e9fd into librenms:master Jun 20, 2014

1 check passed

default Scrutinizer: 9 new issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment