This adds a default port option for the SMNP client on the remote host to defaults.inc.php.
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.
SNMP Default Port Support
Add options to defaults for SNMP Client port
Use configured SNMP port rather than hard coded.
Fix Typo #1
Thanks for the patch. Scrutinizer is reporting an issue that looks worth investigating: https://scrutinizer-ci.com/g/librenms/librenms/inspections/ccb3c3a6-ef5e-4824-9c54-3819ac32eec2/issues/
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.
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.
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.
Undo for commit
Fixed, will follow the COMMIT.md (issue-xxx branch) method for next commit.
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 :)
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.