Git Product home page Git Product logo

puppet-influxdb's Introduction

Overview

This module will install and configure InfluxDB 1.x.

This module works on Debian- and RHEL-based OS'es.

Dependencies

This module depends on the toml gem, which has to be installed on the puppetmaster.

It can be installed via puppet, like this (using this module):

package { 'toml':
  ensure   => 'installed',
  provider => 'puppetserver_gem',
}

Sample setup

class { '::influxdb':
  admin_username => <admin username>,
  admin_password => <admin password>,
  configuration  => {
    'data'  => {
      'dir'                     => '/mnt/influxdb/data',
      'wal-dir'                 => '/mnt/influxdb/wal',
      'max-series-per-database' => 0,
      'max-values-per-tag'      => 0,
    },
    '[udp]' => {
      'enabled'       => true,
      'bind-address'  => ':8090',
      'database'      => 'metrics',
      'batch-pending' => 1024,
      'read-buffer'   => 33554432,
    },
  },
  databases      => {
    'prometheus' => {
      'ensure' => present,
    }
  },
  users          => {
    'grafana' => {
      'password' => 'asdfghjkl!"§"!"$',
    },
    'prometheus' => {
      'password' => 'asdfghjkl!"§"!"$',
    },
  },
}

influxdb::database { 'metrics': }

influxdb::user { 'grafana_user':
  password   => 'mySuperSecretPassWORD',
  privilege  => 'READ',
  database   => 'metrics',
}

# Note: for durations, InfluxDB converts the duration literals to something else. Write that something else in puppet.
influxdb::retention_policy { '1YearRetention':
  database => 'prometheus',
  duration => '8640h0m0s',
}

http auth

http_auth is automatically enabled and configured.

An admin account will automatically be created with the parameters passed to the main class: influxdb::admin_username and influxdb::admin_password

This admin account is the one used in puppet, to manage all resources

puppet-influxdb's People

Contributors

magnuslarsen avatar unki avatar

Stargazers

 avatar

Watchers

 avatar  avatar

puppet-influxdb's Issues

toml-rb requirements

Repo is dependent on toml-rb which isn't present or available with stock Puppet installations.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- toml

Following a similar requirement from puppetlabs/puppet_metrics_dashboard:
https://github.com/puppetlabs/puppet_metrics_dashboard#requirements

From puppetserver this results in:
[root@puppet ~]# puppetserver gem install toml-rb
Fetching: citrus-3.0.2.gem (100%)
Successfully installed citrus-3.0.2
Fetching: toml-rb-2.0.1.gem (100%)
ERROR: Error installing toml-rb:
toml-rb requires Ruby version >= 2.3.

It looks like ruby 2.3 wasn't added until Puppet 6. Trying an older version of toml-rb:

puppetserver gem install toml-rb -v 0.1.2

resolves successfully. But installing this on either master, server or the client doesn't seem to resolve the dependency. I am guessing there are some undocumented dependencies and/or version requirements for using this plugin.,

undefined method `gsub' for nil:NilClass

Hi,

When it comes to user creation, it requires that database and privilege be specified. It then throws the above error. My user config is as follows:

users => {
'grafana' => {
'password' => 'k3jkji',
privilege => 'READ',
database => 'telegraf',
},
'telegraf' => {
'password' => 'kj4ki4',
'privilege' => 'READ',
'database' => 'telegraf',
},

I do have the dependencies installed. Influxdb version:1.8.4. Full error below. Any ideas?

Error: /Stage[main]/Influxdb/Influxdb::User[telegraf]/Influxdb_user[influxdb_user_telegraf]: Could not evaluate: undefined method `gsub' for nil:NilClass

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.