-
-
Notifications
You must be signed in to change notification settings - Fork 227
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 option to specify type of interface in agent class #697
Conversation
Can someone take a look at this please? |
@@ -16,8 +16,12 @@ def self.instances | |||
) | |||
|
|||
api_hosts.map do |h| | |||
interface = h['interfaces'].select { |i| i['type'].to_i == 1 && i['main'].to_i == 1 }.first | |||
interface = h['interfaces'].select { |i| i['main'].to_i == 1 }.first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some inline comments to describe the magic that's happening here?
manifests/agent.pp
Outdated
@@ -253,6 +256,7 @@ | |||
$zbx_group_create = $zabbix::params::agent_zbx_group_create, | |||
$zbx_templates = $zabbix::params::agent_zbx_templates, | |||
Array[Hash] $zbx_macros = [], | |||
Integer $zbx_interface_type = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you enforce the datatype a bit more? are negative values allowed? I think there is an upper limit that could be enforced as well?
@bastelfreak I've made the requested changes and rebased to current master |
Pull Request (PR) description
This pull request adds option to specify interface type in agent.pp, so you can create an agent that is purely SNMP/JMX/IPMI.