Permalink
Browse files

infochimps fork of zabbix

  • Loading branch information...
1 parent d77c24b commit fd4d1394efc7259e45e42950abeb5d69d213295e Dhruv Bansal committed with Philip (flip) Kromer Jan 24, 2012
View
@@ -61,3 +61,4 @@ knife/checksums/*
vendor/cluster_chef
knife/plugins
site-cookbooks/*
+zabbix_integration
View
@@ -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
Submodule zabbix added at 4a672f
@@ -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
-
-
-
@@ -1,5 +0,0 @@
-Vagrant::Config.run do |config|
-
- config.vm.box = "lucid64"
- config.vm.host_name = "zabbixrecipe.vagranttest.com"
-end
@@ -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
-
@@ -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": {
- }
-}
@@ -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"
@@ -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
-
@@ -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
@@ -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
-
Oops, something went wrong.

0 comments on commit fd4d139

Please sign in to comment.