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

Firewall and server domain name #17

Closed
Oyabi opened this issue Nov 24, 2014 · 5 comments
Closed

Firewall and server domain name #17

Oyabi opened this issue Nov 24, 2014 · 5 comments

Comments

@Oyabi
Copy link
Contributor

Oyabi commented Nov 24, 2014

Hi,
i have an issue when I try to put domain name in zabbix::agent for the parameter server and or serveractive.

Indeed, in manifests/agent.pp we have this code for the firewall :

# Manage firewall
if $manage_firewall {
  firewall { '150 zabbix-agent':
    dport  => $listenport,
    proto  => 'tcp',
    action => 'accept',
    source => "${server}/24",
    state  => ['NEW','RELATED', 'ESTABLISHED'],
 }

Here my code :

# Zabbix
 class { 'zabbix::agent':
         zabbix_version => '2.2.6',
         server => 'example.com',
         serveractive => 'example.com',
         hostname => 'test_puppet',
         manage_firewall => true,
 }
 zabbix::userparameters { 'raid_default':
         source => 'puppet:///modules/zabbix/raid0_test.conf.erb',
 }

The /24 doesn't work on debian 7 (wheezy).
I have this error with puppet agent -v --test --debug command.

Error: Failed to apply catalog: Parameter source failed on Firewall[150 zabbix-agent]: host_to_ip failed for example.fr/24, exception no address for example.com//24 at /etc/puppet/modules/zabbix/manifests/agent.pp:292
Wrapped exception:
host_to_ip failed for example.com/24, exception no address for parc.tec6.fr/24

Can you make a change for resolv this unfotunetly problem please ?

Thanks for you super project !

@dj-wasabi
Copy link
Contributor

Hi Oyabi,

Thanks for making time to create this issue. I Fixed it. You can download it from github. In the near future, 0.6.0 will be released on the forge.

Kind regards,
Werner

@Oyabi
Copy link
Contributor Author

Oyabi commented Dec 5, 2014

Thank you very much.
I have detected another thing. I use hiera at work and only one line in my /etc/puppet/manifests/site.pp :

hiera_include('classes', '')

For some server I must use userparameter but I can't user zabbix::userparameters because it's a resource.
I've seen the parameters userparameter in zabbix::agent but it seen to not be use in template zabbix_agentd.conf.erb.
For my use I have add <%= @unsafeuserparameters %> at line 213 but we probably make better fix.

Thank you for your work and have a nice day ;)

@dj-wasabi
Copy link
Contributor

Hi Oyabi,

Thanks. I've created the following class:

manifests/userparameter.pp

Can you check if this will help you?

Kind regards,
Werner

@Oyabi
Copy link
Contributor Author

Oyabi commented Dec 6, 2014

Oh, I haven't test it yet but it seems to be exactly what I need.
Thank you one more time for all you've done. ;)
If I have another idea I gonna share it with you.

@dj-wasabi
Copy link
Contributor

Hi Oyabi,

If you experience any problems, don't hesistate to open an new issue at github.
Will close this issue.

Kind regards,
Werner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants