{"action":"created","issue":{"url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/212","repository_url":"https://api.github.com/repos/voxpupuli/puppet-zabbix","labels_url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/212/comments","events_url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/212/events","html_url":"https://github.com/voxpupuli/puppet-zabbix/issues/212","id":152468740,"number":212,"title":"ListenIP to accept $::fqdn as a value","user":{"login":"pvl7","id":6275786,"avatar_url":"https://avatars.githubusercontent.com/u/6275786?v=3","gravatar_id":"","url":"https://api.github.com/users/pvl7","html_url":"https://github.com/pvl7","followers_url":"https://api.github.com/users/pvl7/followers","following_url":"https://api.github.com/users/pvl7/following{/other_user}","gists_url":"https://api.github.com/users/pvl7/gists{/gist_id}","starred_url":"https://api.github.com/users/pvl7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvl7/subscriptions","organizations_url":"https://api.github.com/users/pvl7/orgs","repos_url":"https://api.github.com/users/pvl7/repos","events_url":"https://api.github.com/users/pvl7/events{/privacy}","received_events_url":"https://api.github.com/users/pvl7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-02T01:29:49Z","updated_at":"2016-05-12T13:40:55Z","closed_at":null,"body":"Hello\r\n\r\nI have multitenant systems where Zabbix agent binds to the wrong interfaces. Using '*' isn't a solution because, for example, on DMZ systems it may create a security hole. Can't rely on interface naming either as it is not consistent across systems and might not pick up the right nic with default module parameters. \r\n\r\nThe easy solution that works is to pass the $::fqdn or other fully qualified name to the listenip parameter for agent but the Puppet module must translate it to the IP address as Zabbix agent doesn't accept fdqn as a value. I've done that change to my local fork and it works perfectly. Wondering if you ok to merge it to the original repo? :)\r\n\r\n```\r\n[11:14]:git diff manifests/agent.pp\r\ndiff --git a/manifests/agent.pp b/manifests/agent.pp\r\nindex 701dd15..b501021 100644\r\n--- a/manifests/agent.pp\r\n+++ b/manifests/agent.pp\r\n@@ -263,12 +263,19 @@ class zabbix::agent (\r\n   # to network name. If more than 1 interfaces are available, we\r\n   # can find the ipaddress of this specific interface if listenip\r\n   # is set to for example \"eth1\" or \"bond0.73\".\r\n+  #\r\n+  # On multitenant systems sometimes useful to feed listenip\r\n+  # with the host's FQDN record to bind on the proper interface.\r\n+  #\r\n   if ($listenip != undef) {\r\n     if ($listenip =~ /^(eth|bond|lxc|eno|tap|tun).*/) {\r\n       $int_name  = \"ipaddress_${listenip}\"\r\n       $listen_ip = inline_template('<%= scope.lookupvar(int_name) %>')\r\n     } elsif is_ip_address($listenip) or $listenip == '*' {\r\n       $listen_ip = $listenip\r\n+    } elsif is_domain_name($listenip) {\r\n+      $domain_name = $listenip\r\n+      $listen_ip = inline_template('<%= Resolv.getaddress(domain_name) %>')\r\n     } else {\r\n       $listen_ip = $::ipaddress\r\n     }\r\n```\r\n\r\n\r\nThanks,\r\nPavel"},"comment":{"url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/comments/218760308","html_url":"https://github.com/voxpupuli/puppet-zabbix/issues/212#issuecomment-218760308","issue_url":"https://api.github.com/repos/voxpupuli/puppet-zabbix/issues/212","id":218760308,"user":{"login":"bastelfreak","id":341866,"avatar_url":"https://avatars.githubusercontent.com/u/341866?v=3","gravatar_id":"","url":"https://api.github.com/users/bastelfreak","html_url":"https://github.com/bastelfreak","followers_url":"https://api.github.com/users/bastelfreak/followers","following_url":"https://api.github.com/users/bastelfreak/following{/other_user}","gists_url":"https://api.github.com/users/bastelfreak/gists{/gist_id}","starred_url":"https://api.github.com/users/bastelfreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastelfreak/subscriptions","organizations_url":"https://api.github.com/users/bastelfreak/orgs","repos_url":"https://api.github.com/users/bastelfreak/repos","events_url":"https://api.github.com/users/bastelfreak/events{/privacy}","received_events_url":"https://api.github.com/users/bastelfreak/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T13:40:55Z","updated_at":"2016-05-12T13:40:55Z","body":"Hi,\r\n\r\nare you interested to turn the block into a function including your changes? We discussed that in https://github.com/voxpupuli/puppet-zabbix/pull/217#discussion_r62984382"}}