Support for Custom Default SMNP Port #237

Merged
merged 6 commits into from Jun 20, 2014

Projects

None yet

3 participants

@bohdan-s
Contributor

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.

bohdan-s added some commits Jun 20, 2014
bohdan-s SNMP Default Port Support
Add options to defaults for SNMP Client port
7e74971
bohdan-s SNMP Default Port Support
Use configured SNMP port rather than hard coded.
6836ee7
bohdan-s SNMP Default Port Support
Fix Typo #1
955d5f4
@paulgear
Member

Hi bohdan-s,

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/

Any comments?

Thanks,
Paul

@laf
Member
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
ec94633
@bohdan-s
Contributor

Hi,
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 INSTALL_LIGHTTPD.md
Documentation for using Lighttpd instead of Apache as the web server.
Test and running for over 2 weeks on my own server.
706b912
@bohdan-s
Contributor

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.
Sorry,

bohdan-s Delete INSTALL_LIGHTTPD.md
Undo for commit
0ac827d
@bohdan-s
Contributor

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

@laf
Member
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
Member
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
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment