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

updated for puppetlabs-concat release 4.0.0 #12

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
42825bc
check_mk::agent::install: fix install from system repository on debian.
gwarf Sep 30, 2014
df6788a
Fix all_hosts_static.erb template, avoid breaking if static_hosts is …
gwarf Oct 1, 2014
73043ac
check_mk::agent::service: on debian wheezy xinetd init has no status …
gwarf Sep 16, 2015
6e9652d
check_mk::config: use cron instead of exec with schedule to avoid ski…
gwarf Nov 17, 2015
9e92422
check_mk::config: use cron instead of exec with schedule to avoid ski…
gwarf Nov 17, 2015
b9a2b72
README: document fork.
gwarf Nov 17, 2015
21a9caa
gitignore: do not ignore metadata.json.
gwarf Nov 17, 2015
393ec77
Import license and metadata.json
gwarf Nov 17, 2015
2601b8c
Changelog: add entry for v0.4.0
gwarf Nov 17, 2015
0105ec0
Drop deprecated Modulefile
gwarf Nov 17, 2015
95648ac
metadata.json: bump version
gwarf Nov 17, 2015
519ba4f
metadata.json: bump version
gwarf Nov 17, 2015
c33d1b6
check_mk::config: sudo requires a tty, so use su.
gwarf Nov 18, 2015
b4fe281
check_mk::host: almost initialize parameter
gwarf Nov 20, 2015
0cff0e4
metadata.json: bump version
gwarf Nov 20, 2015
9b8f3f8
check_mk::agent: update agent package management.
gwarf Nov 25, 2015
0d17b40
check_mk::agent::config: remove dependency on check_mk-agent-logwatch…
gwarf Nov 25, 2015
6ae555a
README: remove logwatch-related doc.
gwarf Nov 25, 2015
08b903b
example.yaml: drop non existing code conf...
gwarf Nov 25, 2015
20eed33
check_mk::agent::config: document class, fix style.
gwarf Nov 25, 2015
a1dc316
Merge pull request #2 from gnubila-france/fix_check_mk_centos_7
gwarf Nov 25, 2015
78aebf9
metadata.json: bump version
gwarf Nov 25, 2015
dae4199
check_mk::agent::config: on RHEL xinetd conf file is packaged elsewhe…
gwarf Nov 27, 2015
2c81ed4
check_mk::agent::config: delete xinetd file from previous package on …
gwarf Nov 27, 2015
2fd5cd2
Merge pull request #3 from gnubila-france/fix_check_mk_xinetd_rhel
gwarf Nov 27, 2015
34cefee
metadata.json: bump version
gwarf Nov 27, 2015
8c6294c
Enable travis tests
gwarf Dec 11, 2015
d865e43
Add rspec-test basics
gerhardsam May 29, 2015
7460f38
Use rspec version prior to 3.2.0 for ruby 1.8.7
gerhardsam Feb 25, 2016
7944869
Validate, lint-checks and execute rspec-tests via Travis
gerhardsam Feb 25, 2016
2974e18
Fix lint-warnings
gerhardsam Jun 3, 2015
bfce33b
Generate coverage reports at exit
gerhardsam Feb 26, 2016
0300c8c
Add test-cases for class check_mk
gerhardsam Jun 1, 2015
4827d59
Add test for check_mk::install
gerhardsam Jun 1, 2015
e160d40
Add test for check_mk::install_tarball
gerhardsam Feb 26, 2016
ea024c9
Add test for check_mk::config
gerhardsam Jun 1, 2015
b25613b
Add test for check_mk::service
gerhardsam Jun 1, 2015
2f83c60
Add test for check_mk::host
gerhardsam Jun 1, 2015
97324f4
Add test for check_mk::hostgroup
gerhardsam Jun 1, 2015
869119d
Add test for check_mk::agent
gerhardsam May 29, 2015
8567406
Add test for check_mk::agent::install
gerhardsam May 29, 2015
1a8d77c
Add test for check_mk::agent::service
gerhardsam Jun 1, 2015
a40f2a4
Add test for check_mk::agent::config
gerhardsam Jun 3, 2015
1ad04b9
Merge pull request #5 from gerhardsam/rspec-tests
gwarf Mar 7, 2016
845b271
metadata.json: add missing up boundary for stdlib
gwarf Mar 7, 2016
9248bae
Update files for version 0.6.2
gwarf Mar 7, 2016
f905fb1
Set optional parameters to be undefined
gerhardsam Mar 2, 2016
6c4395a
Include agent classes instead of instantiating them
gerhardsam Mar 2, 2016
22af0dc
Inherit agent-config parameters from parent-class
gerhardsam Mar 8, 2016
7f3f49b
Inherit agent-install parameters version and workspace from parent-class
gerhardsam Mar 8, 2016
4aa26ea
Make parameter version only mandatory with given filestore parameter
gerhardsam Mar 8, 2016
302e040
Merge pull request #6 from gerhardsam/paramters
gwarf Mar 8, 2016
0a7e295
Update files for version 0.7.0
gwarf Mar 8, 2016
e3f8280
Adding check_mk::agent::mrpe to configure mrpe lines
bgrolleman Nov 25, 2014
fd3bb45
Add test for check_mk::agent::mrpe
gerhardsam Feb 29, 2016
22b38c1
Append mrpe-check suffix for concat-fragment
gerhardsam Mar 9, 2016
2ebe420
Add parameter to create check_mk::agent::mrpe resources
gerhardsam Mar 8, 2016
166ce4d
Update documentation to explain parameter check_mk::agent::mrpe_checks
gerhardsam Mar 9, 2016
9056328
Add missing comma at EOL
gerhardsam Mar 9, 2016
c10b534
Drop support for ruby 1.8.7
gerhardsam Mar 9, 2016
a0bb36c
Merge pull request #7 from gerhardsam/mrpe
gwarf Mar 14, 2016
dafde6d
check_mk::agent::mrpe: add missing at EOL
gwarf Mar 14, 2016
53d6994
metadata.json: bump version
gwarf Mar 14, 2016
d582945
Changelog: add entry for 0.7.1
gwarf Mar 14, 2016
256dc4a
move params for init.pp to params.pp and allow override of check_mk s…
jhooyberghs Apr 5, 2016
feee8aa
set some defaults
jhooyberghs Apr 5, 2016
58b06fd
use params for filestore and host_groups
jhooyberghs Apr 5, 2016
194f2a5
Merge pull request #8 from jhooyberghs/master
jrevillard May 12, 2016
f9972d0
"concat::fragment" no longer supports "ensure"
Jun 12, 2017
5086481
avoid \file" duplicate resource
Jun 12, 2017
dfd114b
module \puppetlabs-concat" release "4.0.0" is now supported
Jun 12, 2017
c0dbd75
Merge pull request #10 from gnubila-france/concat_updated
jrevillard Jun 12, 2017
8c1038f
"config.pp" updated for "puppetlabs-concat" release 4.0.0 compatibility
Jun 15, 2017
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
6 changes: 6 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
symlinks:
check_mk: "#{source_dir}"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pkg/
metadata.json
*.swp
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--color
--format documentation
progress
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
language: ruby
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2
notifications:
email: false
env:
- PUPPET_GEM_VERSION="~> 3.7.0"
- PUPPET_GEM_VERSION="~> 3.8.0"
- PUPPET_GEM_VERSION="~> 4.1.0"
- PUPPET_GEM_VERSION="~> 4.2.0"
script:
- puppet --version
- bundle exec rake validate lint spec
matrix:
exclude:
- rvm: 2.2
env: PUPPET_GEM_VERSION="~> 3.7.0"
- rvm: 2.2
env: PUPPET_GEM_VERSION="~> 3.8.0"
16 changes: 16 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
0.7.1:
* Add check_mk::agent::mrpe, code from Bas Grolleman contributed by gerhardsam.

0.7.0:
* Rework of check_mk::agent classes, contributed by gerhardsam.

0.6.2:
* Add rspec tests contributed by gerhardsam.

0.4.0:

* Fix all_hosts_static.erb, update xinetd on wheezy and use cron instead of a
scheduled exec.

* Package a new version has upstream seems unmaintained.

0.3.0:

* Added host tags to agent config so that host groups can be auto-populated
Expand Down
23 changes: 23 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'metadata-json-lint', :require => false
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end

if rspecpuppetversion = ENV['RSPEC_GEM_VERSION']
gem 'rspec', rspecpuppetversion, :require => false
else
gem 'rspec', :require => false
end

# vim:ft=ruby
201 changes: 201 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
10 changes: 0 additions & 10 deletions Modulefile

This file was deleted.

13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# check_mk

[![Puppet Forge](http://img.shields.io/puppetforge/v/gnubilafrance/check_mk.svg)](https://forge.puppetlabs.com/gnubilafrance/check_mk)
[![Build Status](https://travis-ci.org/gnubila-france/puppet-check_mk.png?branch=master)](https://travis-ci.org/gnubila-france/puppet-check_mk)

Puppet module for:

* Installing and configuring the Open Monitoring Distribution (OMD) which
Expand All @@ -10,7 +13,7 @@ Puppet module for:
Agent hostnames are automatically added to the server all_hosts configuration
using stored configs.

Currently only tested on Redhat-like systems.
Original code by erwbgy, forked as upstream seems unmaintained.

## Server

Expand Down Expand Up @@ -72,15 +75,15 @@ created making the URL http://hostname/acme/check_mk/ running as the 'acme' user

## Agent

* Installs the check_mk-agent and check_mk-agent-logwatch packages
* Installs the check_mk-agent package.

* Configures the /etc/xinetd.d/check_mk configuration file

### Example 1

include check_mk::agent

Installs the check_mk and check_mk_logwatch packages from the system repository
Installs the check_mk package from the system repository
and configures /etc/xinetd.d/check_mk with no IP whitelist restrictions.

### Example 2
Expand All @@ -90,7 +93,7 @@ and configures /etc/xinetd.d/check_mk with no IP whitelist restrictions.
ip_whitelist => [ '10.7.96.21', '10.7.96.22' ],
}

Installs the specified versions of the check_mk and check_mk_logwatch packages
Installs the specified versions of the check_mk package
after retrieving them from the Puppet file store. Configures
/etc/xinetd.d/check_mk so that only the specified IPs (and localhost/127.0.0.1)
are allowed to connect.
Expand Down Expand Up @@ -120,6 +123,8 @@ Only required if a filestore is used.
*workspace*: The directory to use to store files used during installation.
Default: '/root/check_mk'

*mrpe_checks*: Specifies a hash of check_mk::agent::mrpe resources to create. Default: {}

## Host groups and tags

By default check_mk puts all hosts into a group called 'check_mk' but where you
Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
22 changes: 0 additions & 22 deletions example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,3 @@ check_mk::agent::host_tags:
- '%{kernel}'
- '%{role}'
- '%{location}'

check_mk::agent::jolokia::server: '127.0.0.1'
check_mk::agent::jolokia::port: '8080'
check_mk::agent::jolokia::user: 'monitoring'
check_mk::agent::jolokia::password: 'tinstaafl'
check_mk::agent::jolokia::suburi: 'jolokia'

check_mk::agent::jolokia::instances:
'My-App':
server: '10.0.0.1'
port: '8190'

check_mk::agent::logwatch::keep_defaults: 'true'
check_mk::agent::logwatch::logfiles:
'/apps/tomcat1/logs/tomcat/catalina.*.log':
critical:
- '^SERVERE:'
- '^ERROR:'
warning:
- '^WARNING:'
ignore:
- '^INFO'
Loading