Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
35c0e2f
Totally reworked, see CHANGELOG.md for details
Jan 17, 2015
a3ae530
Corrected parameter names
Jan 17, 2015
b3c51af
switched to forward slashes.
Jan 17, 2015
1cb0648
Added selector for the service's name since it's different on Windows.
Jan 17, 2015
5c2e33d
Not sure how it got there, but removed a special character.
Jan 18, 2015
ebc585c
Removed another special character and reversed slashes for this value…
Jan 18, 2015
e520d06
Spaces in the include path break the Windows agent so adjusting accor…
Jan 18, 2015
b397919
Added parent directory in the ProgramData directory
Jan 18, 2015
732e593
Another rework of the windows side plus validated params
Jan 18, 2015
4887994
corrected typo
Jan 18, 2015
daac8c6
so that names are consistent, converting fqdn do lower case by default.
Jan 18, 2015
a3d34c4
Added param for the log file
Jan 18, 2015
152bc76
switched to forward slashes.
Jan 18, 2015
0205982
duplicate declaration
Jan 18, 2015
2aaed7a
switched to forward slashes.
Jan 18, 2015
d0f8a6b
Updated docs
Jan 18, 2015
fb6ca27
Corrected OS-specific setting
Jan 18, 2015
aa9f4d7
Ignoring vagrant files
Jan 18, 2015
36e49b8
Updating post testing on Windows 2012 R2
Jan 18, 2015
9c1a330
Added Ubuntu support
Jan 19, 2015
77ea841
Updated README and added a LICENSE file.
Jan 19, 2015
b196663
Merge branch 'feature/ubuntu_support' into develop
Jan 19, 2015
4218e09
typos
Jan 19, 2015
1e36081
Adding notify to package resource
Jan 19, 2015
c292814
corrected name, reduced output
Jan 19, 2015
eac072d
prepping release by setting up some basic testing
Jan 19, 2015
19a2252
Added blank line to the end of the file.
Jan 20, 2015
25e6aca
Switched to http address
Jan 20, 2015
0b7f2dc
Merge branch 'release/2.0.0' into develop
Jan 20, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-pro
repo_token: 7msLgVvXyGptO9sHn47l34uP8BMdZzCyz
8 changes: 8 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fixtures:
forge_modules:
chocolatey: "rismoney/chocolatey"
inifile: "puppetlabs/inifile"
stdlib: "puppetlabs/stdlib"
symlinks:
zabbixagent: "#{source_dir}"

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
pkg
/.bundle/
/.idea/
/.vagrant/
/coverage/
/pkg/
/spec/fixtures/
/vendor/
Gemfile.lock
18 changes: 18 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>zabbixagent</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
1 change: 1 addition & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--no-class_inherits_from_params_class-check
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: ruby
cache: bundler
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1

env:
- PUPPET_VERSION=3.7.3

script: 'bundle exec rake tests'

notifications:
email:
on_failure: change
on_success: never
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2015-01-17 Fork - Release 2.0.0
Total Rework by genebean:
- Converted to use the install -> config -> service pattern
- Moved all parameters to `params.pp`
- Removed dependency on epel module
- Added Zabbix repo
- Added option to disable repo management per repo
- Changed Windows setup to utilize the official Zabbix package via Chocolatey
- Added .project file for Geppetto
- Added Vagrant config to facilitate testing and development
- Added several new parameters (see changes to README.md)

2014-07-15 Release 1.0.1
Changes:
- Upgrade package format and fix deprecation warnings.
Expand All @@ -16,6 +28,6 @@ Bugfixes:
2013-01-02 Release 0.1.0
Changes:
- Use ini_setting module to only change necessary settings rather than use
the entire config file as a template. This will insulate us from changes in the
the entire config file as a template. This will insulate us from changes in the
Zabbix configuration with new versions.
- Other fixes
- Other fixes
17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# vim:ft=ruby
source ENV['GEM_SOURCE'] || "https://rubygems.org"

if ENV.key?('PUPPET_VERSION')
puppetversion = "= #{ENV['PUPPET_VERSION']}"
else
puppetversion = ['>= 3.7.3', '< 4.0']
end

group :development, :unit_tests do
gem 'puppet', puppetversion
gem 'puppet-lint', ['>= 1.0.0', '< 1.1.0']
gem 'puppetlabs_spec_helper', '~> 0.8'
gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git'
end


27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2015, Gene Liverman
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of genebean-zabbixagent nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
155 changes: 132 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,132 @@
# Zabbix Agent Puppet Module
This module manages the zabbix agent for a monitored machine.

This module has been tested against Puppet 3.0.1 on Windows Server 2008R2, Ubuntu Server 12.04, and CentOS 6.3.

## Usage

```puppet
class { 'zabbixagent':
servers => 'zabbix.example.com', # Optional: defaults to localhost (accepts an array)
hostname => 'web01.example.com' # Optional: defaults to the fully qualified domain name of the machine
}
```

This is the only configuration supported at this time. Custom user parameters may
come at a later date. If there is any other configuration that ought to be made available,
then please let me know.

### Authors
* Scott Smerchek (@smerchek)

### Contributors
* Martijn Storck (@martijn) - Added CentOS support
[![Build Status][travis-img-master]][travis-ci]
[![Puppet Forge][pf-img]][pf-link]
[![GitHub tag][gh-tag-img]][gh-link]

# Zabbix Agent Puppet Module

#### Table of Contents

1. [Overview](#overview)
2. [Setup requirements](#setup-requirements)
3. [Parameters](#parameters)
4. [Limitations](#limitations)
5. [Usage](#usage)
6. [Contributing](#contributing)
7. [Contributors](#contributors)
8. [License](#license)

## Overview

This module manages the zabbix agent for a monitored machine. It can
also, optionally, manage repositories related to Zabbix on Linux. On the Red Hat
family of OS's, this includes both EPEL and Zabbix. On the Debian family,
this is just the Zabbix repo. On Windows this module utilizes the
[Chocolatey](chocolatey.org) provider.

## Setup Requirements

This module has been tested against Puppet 3.7.3 on:
* CentOS 6.6
* Ubuntu Server 14.04
* Windows 7
* Windows Server 2012 R2


## Parameters:

##### `ensure_setting`
Passed directly to ensure of package resource
Default: `'present'`

##### `hostname`
The hostname used in the config file.
Default: `downcase($::fqdn)`

##### `include_dir`
The directory that additional config files will be placed in.
Default: `'zabbix_agentd.d'`
Type: String

##### `include_file`
A file that that contain additional settings
Default: `''`
Type: String

##### `logfile`
The full path to where Zabbix should store it's logs.
Default: `'C:\zabbix_agentd.log'`
Type: String

##### `manage_repo_epel`
Determines if the EPEL repo is managed on the RedHat family of OS's.
Default: `false`
Type: boolean

##### `manage_repo_zabbix`
Determines if the Zabbix repo is managed on the RedHat family of OS's.
Default: `false`
Type: boolean

##### `servers`
The server or servers used in the Servers setting.
Default: `'127.0.0.1'`
Type: String separated by commas OR Array

##### `servers_active`
The server or servers used in the Servers setting.
Default: `'127.0.0.1'`
Type: String separated by commas OR Array


## Usage

```puppet
class { 'zabbixagent':
ensure_setting => 'latest',
include_file => 'userparams.conf',
servers => 'zabbix.example.com',
servers_active => 'zabbix.example.com',
}
```

The list of params above is the only configuration supported at this time but a
fully parameterized `zabbix_agentd.conf` will be coming soon.

## Contributing

Pull requests, bug reports, and enancement requrest are welcome! Enhancement
requests should be file just like other issues.

## Contributors

* Scott Smerchek (@smerchek) - Author of [softek-zabbixagent][pf-softek-zabbixagent]
* Martijn Storck (@martijn) - Added CentOS support

## License

This is released under the New BSD / BSD 3 Clause license. A copy of the license
can be found in the root of the module.

### History

This was originally [softek-zabbixagent][pf-softek-zabbixagent] before undergoing
a total rewrite in January 2015. Post rewrite, only a couple of comments and part of
one line of the original code was left. Since no 'substantial portions' of the code
was reused and no written licence was contained in the repository I have chosen not
to reuse the MIT license that was referenced in the original metadata.json file.

This module has been released independant of the origial after reviewing the
original author's GitHub issue tracker. Specificaly, it appeared that they had
not been responding to issues or pull requests for at least six months and some
had sat for nearly two years. This response timeframe and my needs didn't line
up so here we are.

[coveralls-master]: https://coveralls.io/r/genebean/genebean-zabbixagent?branch=master
[coveralls-img-master]: https://img.shields.io/coveralls/genebean/genebean-zabbixagent/master.svg
[gh-tag-img]: https://img.shields.io/github/tag/genebean/genebean-zabbixagent.svg
[gh-link]: https://github.com/genebean/genebean-zabbixagent
[pf-img]: https://img.shields.io/puppetforge/v/genebean/zabbixagent.svg
[pf-link]: https://forge.puppetlabs.com/genebean/zabbixagent
[pf-softek-zabbixagent]: https://forge.puppetlabs.com/softek/zabbixagent
[travis-ci]: https://travis-ci.org/genebean/genebean-zabbixagent
[travis-img-master]: https://img.shields.io/travis/genebean/genebean-zabbixagent/master.svg
13 changes: 13 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.ignore_paths = ["vendor/**/*.pp", "spec/**/*.pp"]
PuppetSyntax.exclude_paths = ["vendor/**/*", "spec/**/*"]

task :tests do
Rake::Task[:lint].invoke
Rake::Task[:validate].invoke
Rake::Task[:spec].invoke
end

13 changes: 13 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "genebean/centos6-rvm193-64bit"

config.vm.provision "shell", inline: "su - vagrant -c 'cd /vagrant; bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}'"

end

Binary file removed files/win64/zabbix_agentd.exe
Binary file not shown.
Binary file removed files/win64/zabbix_get.exe
Binary file not shown.
Binary file removed files/win64/zabbix_sender.exe
Binary file not shown.
Loading