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

Install Zabbix SERVER and PROXY on same machine #119

Closed
andreguilhon opened this issue Sep 25, 2015 · 6 comments
Closed

Install Zabbix SERVER and PROXY on same machine #119

andreguilhon opened this issue Sep 25, 2015 · 6 comments

Comments

@andreguilhon
Copy link

Is it possible to install both zabbix Server and Proxy on the same machine?
I'm trying to do this, but when I run puppet agent, it gives me the following error:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Zabbix::Database] is already declared in file /etc/puppet/environments/production/modules/zabbix/manifests/proxy.pp:518; cannot redeclare at /etc/puppet/environments/production/modules/zabbix/manifests/init.pp:294 on node zbxproxy.powers.com.br
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Here is the relevant part of site.pp:
`
node 'zbxproxy.powers.com.br' {
class { 'zabbix::proxy':
zabbix_server_host => '192.168.20.11',
zabbix_server_port => '10051',
database_type => 'sqlite',
}
file { '/usr/local/bin/backup_zabbix.sh' :
ensure => file,
owner => root,
group => zabbix,
mode => 0750,
content => template('zabbix/backup_zabbix.sh.erb'),
}
file { '/usr/local/bin/backup_config.sh' :
ensure => file,
owner => root,
group => zabbix,
mode => 0750,
content => template('zabbix/backup_config.sh.erb'),
}
file { '/usr/local/bin/backup.conf' :
ensure => file,
owner => root,
group => zabbix,
mode => 0640,
content => template('zabbix/backup.conf.erb'),
}
file { '/usr/local/bin/backup_dados.sh' :
ensure => file,
owner => root,
group => zabbix,
mode => 0750,
content => template('zabbix/backup_dados.sh.erb'),
}
cron { backup_zabbix:
ensure => present,
command => "/usr/local/bin/backup_zabbix.sh",
user => root,
hour => 0,
minute => 0
}
class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php

class { 'zabbix':
zabbix_url => 'zabbix.zbxproxy.powers.com.br',
database_type => 'mysql',
manage_resources => true,
zabbix_api_user => 'Admin',
zabbix_api_pass => 'zabbix',
}

}
`

@dj-wasabi
Copy link
Contributor

HI andreguilhon,

No it is not possible installing Zabbix Server and Proxy on the same host. Why would you do this?
For me it makes no sense for installing it on the same server.

Kind regards,
Werner

@andreguilhon
Copy link
Author

dj-wasabi the thing is that my company sells Monitoring as a Service, and we put an appliance in the client side. This appliance is a zabbix server for the client, but the we also send the data to our servers, and this is done by zabbix proxy, which stays in the same appliance. Thats wy I need both server and proxy on the same machine!
Is there any workaroound, maybe?

@dj-wasabi
Copy link
Contributor

Ok, I understand. What if you use the proxy part like this:

class { 'zabbix::proxy':
  zabbix_server_host => '192.168.20.11',
  zabbix_server_port => '10051',
  database_type => 'sqlite',
  manage_database => false,
}

I don't know if this works with sqlite... If not, maybe there is an other way, but it takes more steps.. :-)

@andreguilhon
Copy link
Author

I'll give it a try!

@andreguilhon
Copy link
Author

It worked like a charm!
Thanks for the quick ansewers and the excelent puppet module!

@dj-wasabi
Copy link
Contributor

Nice! 8-)
Have fun with it..

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