Skip to content
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

Add SNMPv3 support #665

Merged
merged 2 commits into from
Jul 21, 2017
Merged

Add SNMPv3 support #665

merged 2 commits into from
Jul 21, 2017

Conversation

bodgit
Copy link
Contributor

@bodgit bodgit commented May 9, 2017

This PR adds SNMPv3 support to the SNMP plugin which should fix #236, I also took the opportunity to refactor the plugin to use Puppet 4.x data types.

The only breaking change AFAICT is that I renamed the invertmatch and instanceprefix parameters to invert_match and instance_prefix respectively in the collectd::plugin::snmp::data defined type to match the hash keys passed in the data parameter in collectd::plugin::snmp class given everything else matched up.

To keep my employers legal team happy, I have to include the following:

This contribution is provided 'as is' and without any warranty or guarantee of any kind, express or implied, including in relation to its quality, suitability for a particular purpose or non-infringement. To the extent permitted by law, in no event shall the creator of this contribution be liable for any claim, damage or other liability, whether arising in contract, tort or otherwise, arising out of or in connection with this contribution.

@oranenj
Copy link
Contributor

oranenj commented May 25, 2017

Re-running checks...

@dannygoulder
Copy link

Tried this out but was getting a lot of errors from the data types (using PE 2016.4.3 which includes Puppet 4.7). I've made my own fork with the changes (minus the Puppet4 data types) here which is passing tests for me.

@bodgit
Copy link
Contributor Author

bodgit commented Jul 6, 2017

What were the errors? I don't think it's realistic to just remove all of the Puppet 4 types but it might be a simple fix. An example of how you're calling the module/define would be good too.

@bastelfreak
Copy link
Member

Hi @bodgit , thanks for the PR. Can you please rebase it against latest master?

* Refactor SNMP plugin to use Puppet 4 data types.
* Rename `invertmatch` and `instanceprefix` parameters in
  `collectd::plugin::snmp::data` defined type to match the hash keys
  passed in the `data` parameter in `collectd::plugin::snmp` class.
@bodgit bodgit force-pushed the snmpv3 branch 2 times, most recently from b3deef3 to d063661 Compare July 21, 2017 12:37
@bodgit
Copy link
Contributor Author

bodgit commented Jul 21, 2017

Done. Tests all seem to pass.

$data = {},
$hosts = {},
$interval = undef,
Enum['present', 'absent'] $ensure = 'present',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datatypes \o/

@bastelfreak bastelfreak added the enhancement New feature or request label Jul 21, 2017
@bastelfreak
Copy link
Member

Thanks @bodgit.

@bastelfreak bastelfreak merged commit b995bda into voxpupuli:master Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for snmp v3
4 participants