olivierha / puppet-influxdb Goto Github PK
View Code? Open in Web Editor NEWManage Influxdb server using Puppet
License: Apache License 2.0
Manage Influxdb server using Puppet
License: Apache License 2.0
PR #21 breaks the module on Centos
package influxdb-client
is only present on Debian/Ubuntu.
Centos package doesn't exist but the module tries to install it.
......
Info: Applying configuration version 'b7d93e34a77dd86fb3896769d393c7b47eb02991'
Notice: /Stage[main]/Influxdb::Repo/Yumrepo[influxdb]/ensure: created
Info: Yumrepo[influxdb](provider=inifile): changing mode of /etc/yum.repos.d/influxdb.repo from 600 to 644
Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install influxdb-client-1.5.0-1' returned 1: Error: Nothing to do
Error: /Stage[main]/Influxdb::Install/Package[influxdb-client]/ensure: change from 'purged' to '1.5.0-1' failed: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install influxdb-client-1.5.0-1' returned 1: Error: Nothing to do
Notice: /Stage[main]/Influxdb::Config/File[/etc/influxdb/influxdb.conf]: Dependency Package[influxdb-client] has failures: true
......
root@int-influxdb-01:/etc/ssl 130 # yum info influxdb-client
Loaded plugins: fastestmirror, protectbase, rpm-warm-cache, versionlock
Loading mirror speeds from cached hostfile
0 packages excluded due to repository protections
Error: No matching Packages to list
I'm managing the installation of influxdb myself (from source to be specific). I would like to be able to pass a parameter to not run 'class { '::influxdb::install': }'
Thanks.
Hello,
You have a deprecated usage for apt::key and apt::source. I solved this issue with:
index 734e77d..e59ec9b 100644
--- a/manifests/repo.pp
+++ b/manifests/repo.pp
@@ -29,16 +29,16 @@ class influxdb::repo (
ensure_resource('package', 'apt-transport-https', {'ensure' => 'present' })
apt::key { 'influxdb':
- key => '05CE15085FC09D18E99EFB22684A14CF2582E0C5',
- key_content => template('influxdb/aptkey.erb'),
+ id => '05CE15085FC09D18E99EFB22684A14CF2582E0C5',
+ content => template('influxdb/aptkey.erb'),
}
apt::source { 'influxdb':
- location => 'https://repos.influxdata.com/debian',
- release => $::lsbdistcodename,
- repos => $influxdb_flavour,
- include_src => false,
- require => Apt::Key['influxdb'],
+ location => 'https://repos.influxdata.com/debian',
+ release => $::lsbdistcodename,
+ repos => $influxdb_flavour,
+ include => { 'src' => false },
+ require => Apt::Key['influxdb'],
}
}
default: {
I create a PR ?
Regards,
Greetings,
I am a security researcher, who is looking for security smells in Puppet scripts. I found instances where the HTTP protocol is used instead of HTTPS (HTTP with TLS). According to the Common Weakness Enumeration organization this is a security weakness (https://cwe.mitre.org/data/definitions/319.html). I was wondering why HTTP is used? Is it because of lack of tool support?
I am trying to find out if developers are forced to adopt bad practices due to lack of tool support when it comes to the HTTPS protocol. Maybe it is due to dependency on a resource that uses HTTP?
Any feedback is appreciated.
Source: https://github.com/olivierHa/puppet-influxdb/blob/master/manifests/params.pp (Line# 11,28)
Hello Olivier,
I love the idea of managing databases and retention policies via Puppet providers and it would be great to have an additional provider for continuous queries and users.
Kind regards,
Dennis
In order to use Grafana 2.5 with InfluxDB, we have to enable authentication .. and then discovered this module's custom types and providers don't work when authentication is enabled.
I'm putting together a pull-request that will address this, as well as creating users.
with a definition like:
influxdb_database { 'collectd':
ensure => 'present',
}
influxdb_retention_policy { '2w@collectd':
ensure => 'present',
database => 'collectd',
duration => '2w',
is_default => true,
replication => '1',
}
I get:
Error: Could not find a suitable provider for influxdb_retention_policy
Error: Could not find a suitable provider for influxdb_database
more detail:
[root@influxdb2 ~]# puppet resource influxdb_retention_policy --debug
Debug: Runtime environment: puppet_version=3.8.4, ruby_version=2.0.0, run_mode=user, default_encoding=UTF-8
Debug: Puppet::Type::Influxdb_retention_policy::ProviderRuby: file /opt/influxdb/influx does not exist
Debug: Puppet::Type::Influxdb_retention_policy::ProviderRuby: file /opt/influxdb/influx does not exist
[root@influxdb2 ~]# which influx
/bin/influx
I'm guessing they adjusted the rpm packaging (I'm using EL7) to change the binary install location. If the issue wasn't hardcoded in a custom provider, I'd offer a PR... but i don't know my way around those very well...
Looks like packaging was changed in 0.9.5: https://github.com/influxdb/influxdb/blob/master/CHANGELOG.md#v095-2015-11-20
Hi
It's mentioned as "Under development". Are there any plans for implementing that?
Regards,
Alex
Hello,
I am clustering influx and I need the meta[peers] but because this value is an array the template needs to be changed to use value.is_a?(Array) too(like the graphite section). Do you want me to PR it or is something you can push ?
Thanks,
Efstathios
As per the docs here: https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md
For readability, an array in the INI should be written on multiple lines; currently an array of templates is written on a single line; when there are multiple template and they've each got a long string, this can become difficult to read in the config.
Are you open to the idea of changing the template to write arrays onto multiple lines?
This would result in config with:
templates = [
"*.app env.service.resource.measurement",
"stats.* .host.measurement* region=us-west,agent=sensu",
"stats.* .host.measurement.field",
".measurement*",
]
instead of:
templates = [ "*.app env.service.resource.measurement", "stats.* .host.measurement* region=us-west,agent=sensu", "stats.* .host.measurement.field", ".measurement*" ]
I can successfully create a retention policy using the below code block, however trying to alter by changing the time from 3h to 2h results in an attempt to create a retention policy, not alter.
versions:
influxdb 0.10.1
oliverHa/puppet-influxdb 0.5.0 (cloned from github earlier today)
influxdb_retention_policy {'collectd_retention':
ensure => present,
database => "collectd_db",
duration => '2h',
is_default => 'false',
replication => '1',
}
Snippit from log:
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.10.1 8fa6e22d-dc31-11e5-9269-000000000000 84.408µs
[query] 2016/02/25 20:35:12 SHOW DATABASES
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /query?db=&epoch=ns&q=show+databases HTTP/1.1 200 107 - InfluxDBShell/0.10.1 8fa6fbbb-dc31-11e5-926a-000000000000 598.554µs
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.10.1 8faa2ceb-dc31-11e5-926b-000000000000 75.867µs
[query] 2016/02/25 20:35:12 SHOW RETENTION POLICIES ON collectd_db
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /query?db=&epoch=ns&q=show+retention+policies+on+collectd_db HTTP/1.1 200 135 - InfluxDBShell/0.10.1 8faa3fa3-dc31-11e5-926c-000000000000 697.931µs
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.10.1 8fad63ea-dc31-11e5-926d-000000000000 81.45µs
[query] 2016/02/25 20:35:12 SHOW RETENTION POLICIES ON _internal
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /query?db=&epoch=ns&q=show+retention+policies+on+_internal HTTP/1.1 200 124 - InfluxDBShell/0.10.1 8fad8573-dc31-11e5-926e-000000000000 662.949µs
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.10.1 8fb137da-dc31-11e5-926f-000000000000 80.859µs
[query] 2016/02/25 20:35:12 CREATE RETENTION POLICY collectd_retention ON collectd_db DURATION 2h REPLICATION 1 DEFAULT
[meta] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] POST /execute HTTP/1.1 200 28 - Go 1.1 package http 8fb15b58-dc31-11e5-9271-000000000000 38.281082ms
[meta] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:32:34 -0600] GET /?index=79 HTTP/1.1 200 292 - Go 1.1 package http 31305a25-dc31-11e5-91ab-000000000000 2m38.589730747s
[http] 2016/02/25 20:35:12 127.0.0.1 - - [25/Feb/2016:20:35:12 -0600] GET /query?db=&epoch=ns&q=create+RETENTION+POLICY+%22collectd_retention%22+ON+collectd_db+DURATION+7200s+REPLICATION+1+DEFAULT HTTP/1.1 200 40 - InfluxDBShell/0.10.1 8fb14a8c-dc31-11e5-9270-000000000000 39.699415ms
****
Hey, not really a serious issue but will be good if you could keep releases or tags reflecting your versions. Also that latest release with the module refactor was kinda a breaking one :) so would be nice to reflect that with a major release update.
thanks for the module though! I like the refactor too.
Cheers
PS forge version update too!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.