Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

zabbix-agent (18) Versions 0.15.8

Installs/Configures Zabbix Agent

Policyfile
Berkshelf
Knife
cookbook 'zabbix-agent', '= 0.15.8', :supermarket
cookbook 'zabbix-agent', '= 0.15.8'
knife supermarket install zabbix-agent
knife supermarket download zabbix-agent
README
Dependencies
Changelog
Quality 50%

Chef Cookbook - zabbix-agent

Cookbook Version
Build Status
OpenCollective
OpenCollective
License

This cookbook installs and configures the zabbix-agent with sane defaults and very minimal dependancies.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Supported OS Distributions

  • RHEL
  • CentOS
  • Ubuntu
  • Debian
  • Windows

Other similar versions will likely work as well but are not regularly tested.

Usage

If you have a supported OS, internet access, and a searchable DNS alias for "zabbix" that will resolve to your zabbix server this cookbook will work with no additional changes. Just include recipe[zabbix-agent] in your run_list.

Otherwise you will need to modify this to point to your zabbix server:

node['zabbix']['agent']['servers'] = 'zabbix-server.yourdomain.com'

and

default['zabbix']['agent']['package']['repo_uri'] = 'http://private-repo.yourdomain.com'
default['zabbix']['agent']['package']['repo_key'] = 'http://private-repo.yourdomain.com/path-to-repo.key'

or try one of the other install methods

Other recomended cookbooks

  • libzabbix - in development LWRPs to auto regester and setup monitoring for hosts
  • zabbix-server - install configure Zabbix server - planned
  • zabbix-web - install configure Zabbix web frontend - planned

zabbix_agentd.conf file

All attributes in the zabbix_agentd.conf file can be controlled from the:

node['zabbix']['agent']['conf']

attribute. This will require a change in attribute naming for upgrades from 0.9.0.

default['zabbix']['agent']['conf']['Timeout'] = '10'

or

---
{
  "default_attributes": {
    "zabbix": {
      "agent": {
        "conf": {
          "Server": ["zabbix.example.com"],
          "Timeout": "10"
        }
      }
    }
  }
}

Default Install, Configure and run zabbix agent

Install packages from repo.zabbix.com and run the Agent:

{
  "run_list": [
    "recipe[zabbix-agent]"
  ]
}

Selective Install or Install and Configure (don't start zabbix-agent)

Alternatively you can just install, or install and configure:

{
  "run_list": [
    "recipe[zabbix-agent::install]"
  ]
}

or

{
  "run_list": [
    "recipe[zabbix-agent::configure]"
  ]
}

Attributes

Install Method options are:

node['zabbix']['agent']['install_method'] = 'package' # Default
node['zabbix']['agent']['install_method'] = 'source'
node['zabbix']['agent']['install_method'] = 'prebuild'
node['zabbix']['agent']['install_method'] = 'cookbook_file' # not yet implemented
node['zabbix']['agent']['install_method'] = 'chocolatey' # Default for Windows

# skip is preferred if no internet access when provisioning
# zabbix agent was already installed via chef during image bake process
node['zabbix']['agent']['install_method'] = 'skip'

Version

node['zabbix']['agent']['version'] # Default 3.0.29

Servers

node['zabbix']['agent']['conf']['Server'] = ["Your_zabbix_server.com","secondaryserver.com"]
# defaults to zabbix
node['zabbix']['agent']['conf']['ServerActive'] = ["Your_zabbix_active_server.com"]

Package install

If you do not set any attributes you will get an install of zabbix agent version 3.0.29 with
what should be a working configuration if your DNS has aliases for zabbix.yourdomain.com and
your hosts search yourdomain.com.

Source install

If you do not specify source_url attributes for agent it will be set to download the specified branch and version from the official Zabbix source repository. If you want to upgrade later, you need to either nil out the source_url attributes or set them to the URL you wish to download from.

node['zabbix']['agent']['version']
node['zabbix']['agent']['configure_options']

to install an alternative branch or tar file you can specify it here

node['zabbix']['agent']['source_url'] = "http://domain.com/path/to/source.tar.gz"

Prebuild install

The current latest prebuild is behind the source and packaged versions. You will need to set

node['zabbix']['agent']['version']

to the version you wish to be installed.

Cookbook file install

This will install a provided package that can be included in the ./files directory of the cookbook itself and stored on the chef server.

Chocolatey install

Currently untested. Pull requests and kitchen tests desired.

Note

A Zabbix agent running on the Zabbix server will need to :

  • use a different account than the one the server uses or it will be able to spy on private data.
  • specify the local Zabbix server using the localhost (127.0.0.1, ::1) address.

Recipies

default

The default recipe installs, configures and starts the zabbix_agentd.

You can control the agent install with the following attributes:

    node['zabbix']['agent']['install_method'] = 'package' # Default

or

    node['zabbix']['agent']['install_method'] = 'source'

or

    node['zabbix']['agent']['install_method'] = 'prebuild'

or

    node['zabbix']['agent']['install_method'] = 'cookbook_file' # not yet implemented

service

Controls the service start/stop/restart

configure

applies the provided attributes to the configurable items

install

Installs the cookbook based on the 'install_method'. Includes one of the following recipes

install_source

Downloads and installs the Zabbix agent from source

install_package

Sets up the Zabbix default repository and installs the agent from there

install_prebuild

Downloads the Zabbix prebuilt tar.gz file and installs it

install_chocolatey

Needs testing

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website
https://opencollective.com/sous-chefs/sponsor/1/website
https://opencollective.com/sous-chefs/sponsor/2/website
https://opencollective.com/sous-chefs/sponsor/3/website
https://opencollective.com/sous-chefs/sponsor/4/website
https://opencollective.com/sous-chefs/sponsor/5/website
https://opencollective.com/sous-chefs/sponsor/6/website
https://opencollective.com/sous-chefs/sponsor/7/website
https://opencollective.com/sous-chefs/sponsor/8/website
https://opencollective.com/sous-chefs/sponsor/9/website

Dependent cookbooks

chocolatey >= 0.0.0

Contingent cookbooks

pg_monz Applicable Versions

CHANGELOG

0.15.8 - 2023-10-31

0.15.7 - 2023-10-26

  • Fix notification triggers

0.15.6 - 2023-09-28

  • resolved cookstyle error: .delivery/project.toml:2:8 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:4:10 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:5:13 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:6:10 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:7:9 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:8:14 convention: Style/StringLiterals
  • resolved cookstyle error: .delivery/project.toml:9:11 convention: Style/StringLiterals

0.15.5 - 2023-09-28

  • Standardise files with files in sous-chefs/repo-management

0.15.4 - 2023-02-14

0.15.3 - 2021-08-31

  • Standardise files with files in sous-chefs/repo-management

0.15.2 - 2021-06-01

  • resolved cookstyle error: spec/default_spec.rb:131:25 warning: ChefDeprecations/DeprecatedChefSpecPlatform

0.15.1 (2020-05-05)

  • resolved cookstyle error: recipes/configure.rb:34:3 refactor: ChefStyle/NegatingOnlyIf

0.15.0 (2020-20-01)

  • Require Chef Infra Client 14 or later
  • Upgrade the default client version to 3.0.29 as 3.0.9 isn't on the Zabbix site anymore
  • Fix prebuilt installs since the packages on the Zabbix site have changed name format
  • Use the Linux 3.x prebuilt binaries not 2.6 binaries
  • Use systemd not sys-v init scripts to start the agent on Debian / RHEL based systems now
  • Use the build_essential resource and remove the dependency on the build-essential cookbook
  • Removed the apt-get update before adding the Zabbix apt repository as this is not necessary
  • Removed the include_recipe 'yum' before setting up the Zabbix yum repo as this is not necessary
  • Removed dependency on apt and yum cookbooks
  • Change Test Kitchen testing to kitchen-dokken
  • Remove ChefSpec matchers file which is no longer necessary with ChefSpec 7.1
  • Use multi-package installs where available to speed up package installation
  • Use platform? and platform_family? helpers where possible to simplify the codebase
  • Simplify the apt_repository usage by removing distribution property
  • Fix source installs on Debian 10+ and Ubuntu 18.04+
  • Migrate to Github actions for testing
  • Use platform_family not platform to better support derivative OS releases like Oracle Linux

0.14.0

  • upgrade to default client version 3.0.9
  • move kitchen to docker so it can be run in travisci

0.12.0

  • include kitchen tests for all supported OS types
  • upgrade to default client version 2.4.4
  • cleanup source compile dependancies
  • added debian as supported
  • added more distributions and versions to kitchen testing
  • many bug fixes for diffrent distribution versions

0.11.0

  • Move LWRPs to their own cookbook to clean up zabbix-agent
  • Clean up linting and unit tests

0.10.0

  • Upgrading from 0.9.0 may require some slight changes to attribute names that control the configuration file.
  • Migrate zabbix_agentd.conf to a fully dynamically generated template
  • Include many more tests
  • General clean-up of code

0.9.0

  • Major refactor of all code.
  • Rename cookbook to zabbix-agent, strip out all server, web, java-gateway dependencies.
  • Add default code path chefspec tests
  • Update kitchen tests
  • Added package install from repo.zabbix.com
  • Rename many cookbooks to follow a Install->Configure->Service design pattern.

Collaborator Number Metric
            

0.15.8 passed this metric

Contributing File Metric
            

0.15.8 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

0.15.8 passed this metric

No Binaries Metric
            

0.15.8 passed this metric

Testing File Metric
            

0.15.8 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.15.8 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number