Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

infochimps fork of zabbix

  • Loading branch information...
commit fd4d1394efc7259e45e42950abeb5d69d213295e 1 parent d77c24b
@dhruvbansal dhruvbansal authored Philip (flip) Kromer committed
Showing with 6 additions and 855 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  .gitmodules
  3. +1 −1  cookbooks/zabbix
  4. +1 −0  vendor/infochimps/zabbix
  5. +0 −82 vendor/laradji/zabbix/README.rdoc
  6. +0 −5 vendor/laradji/zabbix/Vagrantfile
  7. +0 −25 vendor/laradji/zabbix/attributes/default.rb
  8. +0 −35 vendor/laradji/zabbix/metadata.json
  9. +0 −12 vendor/laradji/zabbix/metadata.rb
  10. +0 −59 vendor/laradji/zabbix/recipes/agent_prebuild.rb
  11. +0 −69 vendor/laradji/zabbix/recipes/agent_source.rb
  12. +0 −43 vendor/laradji/zabbix/recipes/default.rb
  13. +0 −56 vendor/laradji/zabbix/recipes/firewall.rb
  14. +0 −74 vendor/laradji/zabbix/recipes/mysql_setup.rb
  15. +0 −16 vendor/laradji/zabbix/recipes/server.rb
  16. +0 −70 vendor/laradji/zabbix/recipes/server_source.rb
  17. +0 −63 vendor/laradji/zabbix/recipes/web.rb
  18. +0 −1  vendor/laradji/zabbix/templates/default/mongo.ini.erb
  19. +0 −49 vendor/laradji/zabbix/templates/default/web_app.conf.erb
  20. +0 −9 vendor/laradji/zabbix/templates/default/zabbix_agentd.conf.erb
  21. +0 −70 vendor/laradji/zabbix/templates/default/zabbix_agentd.init.erb
  22. +0 −32 vendor/laradji/zabbix/templates/default/zabbix_java_proxy.init.erb
  23. +0 −35 vendor/laradji/zabbix/templates/default/zabbix_java_proxy_settings.sh.erb
  24. +0 −13 vendor/laradji/zabbix/templates/default/zabbix_server.conf.erb
  25. +0 −36 vendor/laradji/zabbix/templates/default/zabbix_server.init.erb
View
1  .gitignore
@@ -61,3 +61,4 @@ knife/checksums/*
vendor/cluster_chef
knife/plugins
site-cookbooks/*
+zabbix_integration
View
3  .gitmodules
@@ -2,3 +2,6 @@
path = vendor/opscode
url = git://github.com/infochimps-labs/opscode_cookbooks.git
update = merge
+[submodule "vendor/infochimps/zabbix"]
+ path = vendor/infochimps/zabbix
+ url = git://github.com/infochimps-cookbooks/zabbix.git
View
2  cookbooks/zabbix
1  vendor/infochimps/zabbix
@@ -0,0 +1 @@
+Subproject commit 4a672fe11fb469687c3579cd8b9e5301a5a21747
View
82 vendor/laradji/zabbix/README.rdoc
@@ -1,82 +0,0 @@
-= DESCRIPTION:
-This cookbook install zabbix-agent and zabbix-server.
-
-By defaut the cookbook install zabbix-agent, check the attribute for enable/disable zabbix_server / web or disable zabbix_agent installation.
-
-Default login password for zabbix frontend is admin / zabbix CHANGE IT !
-
-The mikoomi part is not standard , it has be tune for working on agent side, so include the zabbix::mikoomi recipe on agent side.
-
-= REQUIREMENTS:
-
-= ATTRIBUTES:
-
-Don't forget to set [:zabbix][:agent][:servers] = ["Your_zabbix_server.com","secondaryserver.com"]
-Don't forget to set [:zabbix][:web][:fqdn] or you will not have the zabbix web interface
-
-If you want to use beta release of zabbix you can change the branch attribute and the zabbix version
-example :
-
-node[:zabbix][:server][:branch] = "ZABBIX%20Latest%20Development"
-node[:zabbix][:server][:version] = "1.9.6"
-
-
-= USAGE:
-
-Be carefull when you update your server version, you need to run the sql patch in /opt/zabbix-$VERSION.
-
-= TODO:
-
-- Support more platform on agent side centos, windows ?
-- Add support for ufw , this way search agent how need to have accces to zabbix_server:10051 <-> zabbix_agent:10050
-
-= CHANGELOG:
-
-0.0.18
- - Fix sysconfdir to point to /etc/zabbix on recipe server_source
- - Fix right for folder frontends/php on recipe web
- - Hardcode the PATH of conf file in initscript
- - Agent source need to build on a other folder
- - Add --prefix option to default attributes when using *-source recipe
-
-0.0.17
- - Don't mess with te PID, PID are now in /tmp
-
-0.0.16
- - Add depencies for recipe agent_source
- - Add AlertScriptsPath folder and option for server.
-
-0.0.15
- - Add firewall magic for communication between client and server
-0.0.14
- - Correction on documentation
-0.0.13
- - Fix some issue on web receipe.
-
-0.0.12
- - Change default value of zabbix.server.dbpassword to nil
-
-0.0.11
- - Remove mikoomo
- - Still refactoring
-
-0.0.10
- - Preparation for multiple type installation and some refactoring
- - Support the installation of a beta version when using the install_method == source and changing the attribute branch
-
-0.0.9
- - Tune of mikoomi for running on agent side.
-
-0.0.8
- - Fix some major issu
-
-0.0.7
- - Add some love to php value
- - Now recipe mysql_setup populate the database
- - Minor fix
-
-0.0.6
- - Change the name of the web_app to fit the fqdn
-
-
-
View
5 vendor/laradji/zabbix/Vagrantfile
@@ -1,5 +0,0 @@
-Vagrant::Config.run do |config|
-
- config.vm.box = "lucid64"
- config.vm.host_name = "zabbixrecipe.vagranttest.com"
-end
View
25 vendor/laradji/zabbix/attributes/default.rb
@@ -1,25 +0,0 @@
-#
-# Cookbook Name:: zabbix
-# Attributes:: default
-
-default[:zabbix][:agent][:servers] = []
-default[:zabbix][:agent][:configure_options] = ["--prefix=/opt/zabbix", "--with-libcurl"]
-default[:zabbix][:agent][:branch] = "ZABBIX%20Latest%20Stable"
-default[:zabbix][:agent][:install] = true
-default[:zabbix][:agent][:version] = "1.8.5"
-default[:zabbix][:agent][:install_method] = "prebuild"
-
-default[:zabbix][:server][:install] = false
-default[:zabbix][:server][:version] = "1.8.8"
-default[:zabbix][:server][:branch] = "ZABBIX%20Latest%20Stable"
-default[:zabbix][:server][:dbhost] = "localhost"
-default[:zabbix][:server][:dbname] = "zabbix"
-default[:zabbix][:server][:dbuser] = "zabbix"
-default[:zabbix][:server][:dbpassword] = nil
-default[:zabbix][:server][:dbport] = "3306"
-default[:zabbix][:server][:install_method] = "source"
-default[:zabbix][:server][:configure_options] = [ "--prefix=/opt/zabbix","--with-libcurl","--with-net-snmp","--with-mysql " ]
-
-default[:zabbix][:web][:install] = false
-default[:zabbix][:web][:fqdn] = nil
-
View
35 vendor/laradji/zabbix/metadata.json
@@ -1,35 +0,0 @@
-{
- "dependencies": {
- "mysql": ">= 1.2.0",
- "ufw": ">= 0.6.1",
- "database": ">= 1.0.0",
- "apache2": ">= 0.0.0"
- },
- "name": "zabbix",
- "maintainer_email": "nacer.laradji@gmail.com",
- "attributes": {
- },
- "license": "Apache 2.0",
- "suggestions": {
- },
- "platforms": {
- "debian": ">= 6.0",
- "ubuntu": ">= 10.04"
- },
- "maintainer": "Nacer Laradji",
- "long_description": "= DESCRIPTION:\nThis cookbook install zabbix-agent and zabbix-server.\n\nBy defaut the cookbook install zabbix-agent, check the attribute for enable/disable zabbix_server / web or disable zabbix_agent installation.\n\nDefault login password for zabbix frontend is admin / zabbix CHANGE IT !\n\nThe mikoomi part is not standard , it has be tune for working on agent side, so include the zabbix::mikoomi recipe on agent side.\n\n= REQUIREMENTS:\n\n= ATTRIBUTES:\n\nDon't forget to set [:zabbix][:agent][:servers] = [\"Your_zabbix_server.com\",\"secondaryserver.com\"]\nDon't forget to set [:zabbix][:web][:fqdn] or you will not have the zabbix web interface\n\nIf you want to use beta release of zabbix you can change the branch attribute and the zabbix version\nexample : \n\nnode[:zabbix][:server][:branch] = \"ZABBIX%20Latest%20Development\"\nnode[:zabbix][:server][:version] = \"1.9.6\"\n\n\n= USAGE:\n\nBe carefull when you update your server version, you need to run the sql patch in /opt/zabbix-$VERSION.\n\n= TODO:\n\n- Support more platform on agent side centos, windows ?\n- Add support for ufw , this way search agent how need to have accces to zabbix_server:10051 <-> zabbix_agent:10050\n\n= CHANGELOG:\n\n0.0.18\n\t- Fix sysconfdir to point to /etc/zabbix on recipe server_source \n\t- Fix right for folder frontends/php on recipe web\n\t- Hardcode the PATH of conf file in initscript\n\t- Agent source need to build on a other folder\n\t- Add --prefix option to default attributes when using *-source recipe\n\t\n0.0.17\n\t- Don't mess with te PID, PID are now in /tmp\n\t\n0.0.16 \n\t- Add depencies for recipe agent_source\n\t- Add AlertScriptsPath folder and option for server.\n\t\n0.0.15\n\t- Add firewall magic for communication between client and server\n0.0.14\n\t- Correction on documentation\n0.0.13\n\t- Fix some issue on web receipe.\n\t\n0.0.12 \n\t- Change default value of zabbix.server.dbpassword to nil\n\n0.0.11\n\t- Remove mikoomo\n\t- Still refactoring\n\t\n0.0.10\n\t- Preparation for multiple type installation and some refactoring\n\t- Support the installation of a beta version when using the install_method == source and changing the attribute branch\n\n0.0.9\n\t- Tune of mikoomi for running on agent side.\n\n0.0.8 \n\t- Fix some major issu\n\t\n0.0.7 \n\t- Add some love to php value\n\t- Now recipe mysql_setup populate the database\n\t- Minor fix\n\t\n0.0.6 \n\t- Change the name of the web_app to fit the fqdn\n\n\n\t\n",
- "version": "0.0.18",
- "recommendations": {
- },
- "recipes": {
- },
- "groupings": {
- },
- "conflicting": {
- },
- "replacing": {
- },
- "description": "Installs/Configures zabbix Agent/Server",
- "providing": {
- }
-}
View
12 vendor/laradji/zabbix/metadata.rb
@@ -1,12 +0,0 @@
-maintainer "Nacer Laradji"
-maintainer_email "nacer.laradji@gmail.com"
-license "Apache 2.0"
-description "Installs/Configures zabbix Agent/Server"
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.0.18"
-supports "ubuntu", ">= 10.04"
-supports "debian", ">= 6.0"
-depends "apache2"
-depends "database", ">= 1.0.0"
-depends "mysql", ">= 1.2.0"
-depends "ufw", ">= 0.6.1"
View
59 vendor/laradji/zabbix/recipes/agent_prebuild.rb
@@ -1,59 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: agent_prebuild
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-# Install configuration
-template "/etc/zabbix/zabbix_agentd.conf" do
- source "zabbix_agentd.conf.erb"
- owner "root"
- group "root"
- mode "644"
- notifies :restart, "service[zabbix_agentd]"
-end
-
-# Install Init script
-template "/etc/init.d/zabbix_agentd" do
- source "zabbix_agentd.init.erb"
- owner "root"
- group "root"
- mode "754"
-end
-
-# Define arch for binaries
-if node.kernel.machine == "x86_64"
- $zabbix_arch = "amd64"
-elsif node.kernel.machine == "i686"
- $zabbix_arch = "i386"
-end
-
-# installation of zabbix bin
-script "install_zabbix_agent" do
-interpreter "bash"
-user "root"
-cwd "/opt/zabbix"
-action :nothing
-notifies :restart, "service[zabbix_agentd]"
-code <<-EOH
-tar xvfz /opt/zabbix_agents_#{node.zabbix.agent.version}.linux2_6.#{$zabbix_arch}.tar.gz
-EOH
-end
-
-# Download and intall zabbix agent bins.
-remote_file "/opt/zabbix_agents_#{node.zabbix.agent.version}.linux2_6.#{$zabbix_arch}.tar.gz" do
- source "http://www.zabbix.com/downloads/#{node.zabbix.agent.version}/zabbix_agents_#{node.zabbix.agent.version}.linux2_6.#{$zabbix_arch}.tar.gz"
- mode "0644"
- action :create_if_missing
- notifies :run, "script[install_zabbix_agent]"
-end
-
-# Define zabbix_agentd service
-service "zabbix_agentd" do
- supports :status => true, :start => true, :stop => true
- action [ :start, :enable ]
-end
-
View
69 vendor/laradji/zabbix/recipes/agent_source.rb
@@ -1,69 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: agent_source
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-case node[:platform]
-when "ubuntu","debian"
- # install some dependencies
- %w{ fping libcurl3 libiksemel-dev libiksemel3 libsnmp-dev libiksemel-utils libcurl4-openssl-dev }.each do |pck|
- package "#{pck}" do
- action :install
- end
- end
-when "centos"
- log "No centos Support yet"
-end
-
-# Install configuration
-template "/etc/zabbix/zabbix_agentd.conf" do
- source "zabbix_agentd.conf.erb"
- owner "root"
- group "root"
- mode "644"
- notifies :restart, "service[zabbix_agentd]"
-end
-
-# Install Init script
-template "/etc/init.d/zabbix_agentd" do
- source "zabbix_agentd.init.erb"
- owner "root"
- group "root"
- mode "754"
-end
-
-directory "/opt/zabbix-agent-src" do
- action :create
-end
-
-# installation of zabbix bin
-script "install_zabbix_agent" do
- interpreter "bash"
- user "root"
- cwd "/opt"
- action :nothing
- notifies :restart, "service[zabbix_agentd]"
- code <<-EOH
- tar xvfz zabbix-#{node.zabbix.agent.version}-agent.tar.gz -C /opt/zabbix-agent-src/
- (cd zabbix-agent-src/zabbix-#{node.zabbix.agent.version} && ./configure --enable-agent #{node.zabbix.agent.configure_options.join(" ")})
- (cd zabbix-agent-src/zabbix-#{node.zabbix.agent.version} && make install)
- EOH
-end
-
-# Download zabbix source code
-remote_file "/opt/zabbix-#{node.zabbix.agent.version}-agent.tar.gz" do
- source "http://freefr.dl.sourceforge.net/project/zabbix/#{node.zabbix.agent.branch}/#{node.zabbix.agent.version}/zabbix-#{node.zabbix.agent.version}.tar.gz"
- mode "0644"
- action :create_if_missing
- notifies :run, "script[install_zabbix_agent]"
-end
-
-# Define zabbix_agentd service
-service "zabbix_agentd" do
- supports :status => true, :start => true, :stop => true
- action [ :start, :enable ]
-end
View
43 vendor/laradji/zabbix/recipes/default.rb
@@ -1,43 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: default
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-# Create zabbix User
-user "zabbix" do
- comment "zabbix User"
- home "/opt/zabbix"
- shell "/bin/bash"
-end
-
-# Define zabbix Agent folder
-zabbix_dirs = [
- "/etc/zabbix",
- "/etc/zabbix/include",
- "/var/log/zabbix",
- "/opt/zabbix",
- "/opt/zabbix/bin",
- "/opt/zabbix/sbin",
- "/var/run/zabbix",
- "/etc/zabbix/externalscripts",
- "/opt/zabbix/AlertScriptsPath"
-]
-
-# Create zabbix folder
-zabbix_dirs.each do |dir|
- directory dir do
- owner "zabbix"
- group "zabbix"
- mode "755"
- end
-end
-
-
-if node[:zabbix][:agent][:install] == true
- include_recipe "zabbix::agent_#{node.zabbix.agent.install_method}"
-end
-
View
56 vendor/laradji/zabbix/recipes/firewall.rb
@@ -1,56 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: firewall
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-# This is the firewall part of zabbix installation.
-#
-
-include_recipe "ufw"
-# enable platform default firewall
-firewall "ufw" do
- action :enable
-end
-
-if node.zabbix.server.install == true
- # Search for some client
- zabbix_clients = search(:node ,'recipes:zabbix')
-
- zabbix_clients.each do |client|
-
- # Accept connection from zabbix_agent on server
- firewall_rule "zabbix_client_#{client[:fqdn]}" do
- port 10051
- protocol :udp
- source client[:ipaddress]
- action :allow
- end
-
- end if zabbix_clients
-
-end
-
-# Search for some client
-zabbix_servers = search(:node ,'recipes:zabbix\:\:server')
-if zabbix_servers
- zabbix_servers.each do |server|
-
- # Accept connection from zabbix_agent on server
- firewall_rule "zabbix_server_#{server[:fqdn]}" do
- port 10050
- protocol :udp
- source server[:ipaddress]
- action :allow
- end
-
- end if zabbix_servers
-end
-
-
-# enable platform default firewall
-firewall "ufw" do
- action :enable
-end
View
74 vendor/laradji/zabbix/recipes/mysql_setup.rb
@@ -1,74 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: mysql_setup
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
-
-include_recipe "mysql::client"
-include_recipe "database"
-
-# generate the password
-node.set_unless[:zabbix][:server][:dbpassword] = secure_password
-
-mysql_connection_info = {:host => "localhost", :username => 'root', :password => node['mysql']['server_root_password']}
-
-begin
- gem_package "mysql" do
- action :install
- end
- Gem.clear_paths
- require 'mysql'
- m=Mysql.new("localhost","root",node['mysql']['server_root_password'])
- if m.list_dbs.include?("zabbix") == false
-
- # create zabbix database
- mysql_database 'zabbix' do
- connection mysql_connection_info
- action :create
- notifies :run, "execute[zabbix_populate_schema]"
- notifies :run, "execute[zabbix_populate_data]"
- notifies :run, "execute[zabbix_populate_image]"
- notifies :create, "template[/etc/zabbix/zabbix_server.conf]"
- end
-
- # create zabbix user
- mysql_database_user 'zabbix' do
- connection mysql_connection_info
- password node[:zabbix][:server][:dbpassword]
- action :create
- end
-
- # populate database
- execute "zabbix_populate_schema" do
- command "/usr/bin/mysql -u root #{node.zabbix.server.dbname} -p#{node.mysql.server_root_password} < /opt/zabbix-#{node.zabbix.server.version}/create/schema/mysql.sql"
- action :nothing
- end
- execute "zabbix_populate_data" do
- command "/usr/bin/mysql -u root #{node.zabbix.server.dbname} -p#{node.mysql.server_root_password} < /opt/zabbix-#{node.zabbix.server.version}/create/data/data.sql"
- action :nothing
- end
- execute "zabbix_populate_image" do
- command "/usr/bin/mysql -u root #{node.zabbix.server.dbname} -p#{node.mysql.server_root_password} < /opt/zabbix-#{node.zabbix.server.version}/create/data/images_mysql.sql"
- action :nothing
- end
-
- # Grant zabbix
- mysql_database_user 'zabbix' do
- connection mysql_connection_info
- password node[:zabbix][:server][:dbpassword]
- database_name 'zabbix'
- host 'localhost'
- privileges [:select,:update,:insert,:create,:drop,:delete]
- action :grant
- end
-
- end
-rescue LoadError
- Chef::Log.info("Missing gem 'mysql'")
-end
-
View
16 vendor/laradji/zabbix/recipes/server.rb
@@ -1,16 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: server
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-if node[:zabbix][:server][:install] == true
- include_recipe "zabbix::server_#{node.zabbix.server.install_method}"
-end
-
-if node[:zabbix][:web][:install] == true
- include_recipe "zabbix::web"
-end
View
70 vendor/laradji/zabbix/recipes/server_source.rb
@@ -1,70 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: server_source
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-case node[:platform]
-when "ubuntu","debian"
- # install some dependencies
- %w{ fping libmysql++-dev libmysql++3 libcurl3 libiksemel-dev libiksemel3 libsnmp-dev snmp libiksemel-utils libcurl4-openssl-dev }.each do |pck|
- package "#{pck}" do
- action :install
- end
- end
-when "centos"
- log "No centos Support yet"
-end
-
-
-# installation of zabbix bin
-script "install_zabbix_server" do
- interpreter "bash"
- user "root"
- cwd "/opt"
- action :nothing
- notifies :restart, "service[zabbix_server]"
- code <<-EOH
- tar xvfz /opt/zabbix-#{node.zabbix.server.version}.tar.gz
- (cd zabbix-#{node.zabbix.server.version} && ./configure --enable-server #{node.zabbix.server.configure_options.join(" ")})
- (cd zabbix-#{node.zabbix.server.version} && make install)
- EOH
-end
-
-# Download zabbix source code
-remote_file "/opt/zabbix-#{node.zabbix.server.version}.tar.gz" do
- source "http://freefr.dl.sourceforge.net/project/zabbix/#{node.zabbix.server.branch}/#{node.zabbix.server.version}/zabbix-#{node.zabbix.server.version}.tar.gz"
- mode "0644"
- action :create_if_missing
- notifies :run, "script[install_zabbix_server]"
-end
-
-# Install Init script
-template "/etc/init.d/zabbix_server" do
- source "zabbix_server.init.erb"
- owner "root"
- group "root"
- mode "754"
-end
-
-# install zabbix server conf
-template "/etc/zabbix/zabbix_server.conf" do
- source "zabbix_server.conf.erb"
- owner "root"
- group "root"
- mode "644"
- notifies :restart, "service[zabbix_server]"
-end
-
-# Define zabbix_agentd service
-service "zabbix_server" do
- supports :status => true, :start => true, :stop => true
- action [ :start, :enable ]
-end
-
-if node.attribute[:mysql][:server_root_password]
- include_recipe "zabbix::mysql_setup"
-end
View
63 vendor/laradji/zabbix/recipes/web.rb
@@ -1,63 +0,0 @@
-# Author:: Nacer Laradji (<nacer.laradji@gmail.com>)
-# Cookbook Name:: zabbix
-# Recipe:: mysql_setup
-#
-# Copyright 2011, Efactures
-#
-# Apache 2.0
-#
-
-# Execute apache2 receipe + mod_php5 receipe
-include_recipe "apache2"
-include_recipe "apache2::mod_php5"
-
-case node[:platform]
-when "ubuntu","debian"
- # Dependencie installation
- package "php5-mysql" do
- action :install
- notifies :restart, "service[apache2]"
- end
-
- package "php5-gd" do
- action :install
- notifies :restart, "service[apache2]"
- end
-when "centos"
- log "No centos Support yet"
-end
-
-# Link to the web interface version
-link "/opt/zabbix/web" do
- to "/opt/zabbix-#{node.zabbix.server.version}/frontends/php"
-end
-
-# fix web folder right
-script "zabbix_fix_web_right" do
- interpreter "bash"
- user "root"
- cwd "/opt"
- action :nothing
- code <<-EOH
- chown www-data -R /opt/zabbix-#{node.zabbix.server.version}/frontends/php
- EOH
-end
-
-# Give access to www-data to zabbix frontend config folder
-directory "/opt/zabbix-#{node.zabbix.server.version}/frontends/php" do
- owner "www-data"
- group "www-data"
- mode "0755"
- recursive true
- action :create
- notifies :run, resources(:script => "zabbix_fix_web_right")
-end
-
-if node[:zabbix][:web][:fqdn] != nil
- #install vhost for zabbix frontend
- web_app "#{node.zabbix.web.fqdn}" do
- server_name node.zabbix.web.fqdn
- server_aliases "zabbix"
- docroot "/opt/zabbix/web"
- end
-end
View
1  vendor/laradji/zabbix/templates/default/mongo.ini.erb
@@ -1 +0,0 @@
-extension=mongo.so
View
49 vendor/laradji/zabbix/templates/default/web_app.conf.erb
@@ -1,49 +0,0 @@
-<VirtualHost *:80>
- ServerName <%= @params[:server_name] %>
- ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %>
- DocumentRoot <%= @params[:docroot] %>
- RewriteEngine On
-
- <Directory <%= @params[:docroot] %>>
- Options +FollowSymLinks
- AllowOverride None
- Order allow,deny
- Allow from all
- php_admin_value memory_limit 256M
- php_admin_value post_max_size 32M
- php_admin_value upload_max_filesize 16M
- php_admin_value max_execution_time 600
- php_admin_value max_input_time 600
- php_admin_value date.timezone "Europe/Paris"
- </Directory>
-
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- </Directory>
-
- <Location /server-status>
- SetHandler server-status
-
- Order Deny,Allow
- Deny from all
- Allow from 127.0.0.1
- </Location>
-
- LogLevel info
- ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
- CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
-
- RewriteEngine On
- RewriteLog <%= node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
- RewriteLogLevel 0
-
- # Canonical host, <%= @params[:server_name] %>
- RewriteCond %{HTTP_HOST} !^<%= @params[:server_name] %> [NC]
- RewriteCond %{HTTP_HOST} !^$
- RewriteRule ^/(.*)$ http://<%= @params[:server_name] %>/$1 [L,R=301]
-
- RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
- RewriteCond %{SCRIPT_FILENAME} !maintenance.html
- RewriteRule ^.*$ /system/maintenance.html [L]
-</VirtualHost>
View
9 vendor/laradji/zabbix/templates/default/zabbix_agentd.conf.erb
@@ -1,9 +0,0 @@
-Hostname=<%= @node[:fqdn] %>
-LogFile=/var/log/zabbix/zabbix_agentd.log
-DebugLevel=3
-EnableRemoteCommands=1
-LogRemoteCommands=1
-Include=/etc/zabbix/include
-PidFile=/tmp/zabbix_agentd.pid
-Server=<%= node.zabbix.agent.servers.join(',') %>
-StartAgents=4
View
70 vendor/laradji/zabbix/templates/default/zabbix_agentd.init.erb
@@ -1,70 +0,0 @@
-#! /bin/sh
-#
-# Zabbix agent start/stop script.
-#
-# Written by Alexei Vladishev <alexei.vladishev@zabbix.com>.
-# Add status support by Ovea Inc.
-
-NAME=zabbix_agentd
-PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/zabbix/sbin
-DAEMON=/opt/zabbix/sbin/${NAME}
-DESC="Zabbix agent daemon"
-PID=/tmp/$NAME.pid
-
-test -f $DAEMON || exit 0
-
-set -e
-
-case "$1" in
- start)
- echo "Starting $DESC: $NAME"
- start-stop-daemon --oknodo --start --pidfile $PID \
- --exec $DAEMON -- -c /etc/zabbix/zabbix_agentd.conf
- ;;
-
- stop)
- echo "Stopping $DESC: $NAME"
- start-stop-daemon --oknodo --stop --pidfile $PID \
- --exec $DAEMON
- ;;
- restart|force-reload)
- #
- # If the "reload" option is implemented, move the "force-reload"
- # option to the "reload" entry above. If not, "force-reload" is
- # just the same as "restart".
- #
-# echo -n "Restarting $DESC: zabbix_agent"
- $0 stop
- sleep 3
- $0 start
-# start-stop-daemon --stop --quiet --pidfile \
-# /tmp/$NAME.pid --user zabbix --exec $DAEMON
-# sleep 1
-# start-stop-daemon --start --quiet --pidfile \
-# /tmp/$NAME.pid --user zabbix --exec $DAEMON
-# echo "$NAME."
- ;;
- status)
- if [ -f "$PID" ]; then
- echo "zabbix_agentd is running (pid $PID)."
- PIDVALID=$(ps --pid `cat $PID` -o pid=)
- if [ $PIDVALID ]; then
- exit 0
- else
- echo "pid file exist but zabbix_agentd is NOT running."
- fi
- else
- echo "zabbix_agentd is NOT running."
- exit 1
- fi
- ;;
-
- *)
- N=/etc/init.d/$NAME
- # echo "Usage: $N {start|stop|restart|force-reload}" >&2
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
View
32 vendor/laradji/zabbix/templates/default/zabbix_java_proxy.init.erb
@@ -1,32 +0,0 @@
-#! /bin/sh
-#
-# Zabbix java proxy daemon start/stop script.
-# Nacer Laradji <nacer.laradji@gmail.com>
-
-NAME=zabbix_java_proxy
-DESC="Zabbix java proxy daemon"
-PID=//var/run/zabbix/$NAME.pid
-
-test -f $DAEMON || exit 0
-
-case "$1" in
- start)
- echo "Starting $DESC: $NAME"
- (cd /opt/zabbix/sbin/zabbix_java && ./startup.sh)
- ;;
- stop)
- echo "Stopping $DESC: $NAME"
- (cd /opt/zabbix/sbin/zabbix_java && ./shutdown.sh)
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart}" >&2
- exit 1
- ;;
-esac
-
-exit 0
View
35 vendor/laradji/zabbix/templates/default/zabbix_java_proxy_settings.sh.erb
@@ -1,35 +0,0 @@
-# This is a configuration file for Zabbix Java Proxy.
-# It is sourced by startup.sh and shutdown.sh scripts.
-
-### Option: zabbix.listenIP
-# IP address to listen on.
-#
-# Mandatory: no
-# Default:
-# LISTEN_IP="0.0.0.0"
-
-### Option: zabbix.listenPort
-# Port to listen on.
-#
-# Mandatory: no
-# Range: 1024-32767
-# Default:
-LISTEN_PORT=10052
-
-### Option: zabbix.pidFile
-# Name of PID file.
-# If omitted, Zabbix Java Proxy is started as a console application.
-#
-# Mandatory: no
-# Default:
-# PID_FILE=
-
-PID_FILE="/var/run/zabbix/zabbix_java_proxy.pid"
-
-### Option: zabbix.startPollers
-# Number of worker threads to start.
-#
-# Mandatory: no
-# Range: 1-1000
-# Default:
-# START_POLLERS=5
View
13 vendor/laradji/zabbix/templates/default/zabbix_server.conf.erb
@@ -1,13 +0,0 @@
-# Generated by chef.
-
-############ GENERAL PARAMETERS #################
-
-LogFile=/var/log/zabbix/zabbix_server.log
-DBHost=<%= node.zabbix.server.dbhost %>
-DBName=<%= node.zabbix.server.dbname %>
-DBUser=<%= node.zabbix.server.dbuser %>
-DBPassword=<%= node.zabbix.server.dbpassword %>
-DBPort=<%= node.zabbix.server.dbport %>
-
-Include=/etc/zabbix/include
-AlertScriptsPath=/opt/zabbix/AlertScriptsPath
View
36 vendor/laradji/zabbix/templates/default/zabbix_server.init.erb
@@ -1,36 +0,0 @@
-#! /bin/sh
-#
-# Zabbix daemon start/stop script.
-#
-# Written by Alexei Vladishev <alexei.vladishev@zabbix.com>.
-
-NAME=zabbix_server
-DAEMON=/opt/zabbix/sbin/${NAME}
-DESC="Zabbix server daemon"
-PID=/tmp/$NAME.pid
-
-test -f $DAEMON || exit 0
-
-case "$1" in
- start)
- echo "Starting $DESC: $NAME"
- start-stop-daemon --oknodo --start --pidfile $PID \
- --exec $DAEMON -- -c /etc/zabbix/zabbix_server.conf
- ;;
- stop)
- echo "Stopping $DESC: $NAME"
- start-stop-daemon --oknodo --stop --pidfile $PID \
- --exec $DAEMON
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0

0 comments on commit fd4d139

Please sign in to comment.
Something went wrong with that request. Please try again.