Version information
This version is compatible with:
- Puppet Enterprise >=3.5.0 <5.0.0
- Puppet >=3.5.0 <5.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'rplessl-telegraf', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
Overview
This Puppet module installs and manages InfluxDB Telegraf.
Use this puppet module to install and configure InfluxDB Telegraf with version 0.2.0 and newer.
Module Description
The module installs the telegraf package from the provided repositories and installs the basic configuration file and reconfigures this setup based on your whishes.
Supported Linux distributions are Debian based (Ubuntu, Debian) and RedHat based (CentOS, RHEL).
The installed package for telegraf will be fetched from a) the provided package from get.influxdb.com or b) the provided package from your own repository (apt repository, aptly, yum)
Setup
Setup Requirements
puppet-telegraf requires only the wget module when the parameter install_from_repository
is set to false. Furthermore the stdlib
module is required.
Beginning with telegraf
Include the class and set the InfluxDB parameters.
class { 'telegraf':
install_from_repository => false,
outputs_influxdb_enabled => true,
outputs_influxdb_urls => ['http://localhost:8086'],
outputs_influxdb_database => 'telegraf',
outputs_influxdb_username => 'telegraf',
outputs_influxdb_password => 'metricsmetricsmetricsmetrics',
}
This telegraf module supports the following configuration options:
class { 'telegraf':
ensure => 'installed',
version => '0.2.0',
install_from_repository => true,
config_base_file => '/etc/opt/telegraf/telegraf.conf',
config_directory => '/etc/opt/telegraf/telegraf.d',
# [outputs.influxdb] section of telegraf.conf
outputs_influxdb_enabled => true,
outputs_influxdb_urls => ['http://localhost:8086'],
outputs_influxdb_database => 'telegraf',
outputs_influxdb_username => 'telegraf',
outputs_influxdb_password => 'metricsmetricsmetricsmetrics',
# [tags] section of telegraf.conf
tags => {
virtual => $::virtual,
lsbdistdescription => $::lsbdistdescription,
environment => $::my_own_facter_environment,
location => $::my_own_facter_location,
}
# [agent]
agent_hostname => $::hostname,
}
Development
- Fork it (https://github.com/rplessl/puppet-telegraf/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Wish: Make sure your Pull Requests passes the Rspec tests.
Testing Code Enhancement (rspec)
Testing is done with rspec.
Testing Setup with Vagrant
Install and setup vagrant [https://docs.vagrantup.com/v2/installation/index.html](as described here).
Fetch virtual machines:
vagrant box add puppetlabs/ubuntu-14.04-64-puppet --insecure
vagrant box add puppetlabs/centos-6.6-64-puppet --insecure
vagrant box add puppetlabs/centos-7.0-64-puppet --insecure
vagrant box add puppetlabs/debian-7.8-64-puppet --insecure
vagrant box add markusperl/debian-8.0-jessie-64-shrinked-puppet --insecure
Add vagrant puppet support and run tests:
bundle install
bundle exec librarian-puppet install
vagrant up
License
Licensed under the MIT License. Copyright 2015 Roman Plessl (@rplessl)
See LICENSE File
v0.2.0 [2015-11-09]
- Updated installation manual in README.md -- @rplessl
- Fix last bits of code coverage -- @rplessl
- Ready to add plugins for comming releases (v0.2.1++) -- @rplessl
v0.1.91 [2015-11-09]
- More Rake Tasks -- @rplessl
- More Code Coverage -- @rplessl
v0.1.90 [2015-11-03]
- New Upstream Release and Interface for InfluxDB Telegraf 0.2.0 -- @rplessl
- Snipplets Mechanism with /etc/opt/telegraf/telegraf.d -- @rplessl
v0.0.1 [2015-10-01]
- Initial release -- @rplessl
Dependencies
- maestrodev/wget (>= 1.6.0 <2.0.0)
The MIT License (MIT) Copyright (c) 2015 Roman Plessl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.