influx config

This commit is contained in:
Leif Johansson 2020-03-30 16:35:48 +02:00
parent 91368c5c5b
commit 77ff6d2c82
No known key found for this signature in database
GPG key ID: D73AD6430AD478D6
3 changed files with 19 additions and 1 deletions

View file

@ -73,3 +73,6 @@ redis_sentinel_ips:
- 94.176.224.138
- 94.176.224.9
- 94.176.224.10
influxdb2_org: SwedenConnect
influxdb2_bucket: eidas

View file

@ -2,7 +2,9 @@ require stdlib
require concat
class eid::telegraf(String $version = "stable") {
$influxdb2_token = hiera("influxdb2_token","NOT_SET_IN_HIERA")
$influxdb2_token = hiera("influxdb2_token","NOT_SET_IN_HIERA");
$influxdb2_org = hiera("influxdb2_org","NOT_SET_IN_HIERA");
$influxdb2_bucket = hiera("influxdb2_bucket","NOT_SET_IN_HIERA");
file {['/etc/telegraf','/etc/telegraf/telegraf.conf.d']: ensure => directory }
concat {'/etc/telegraf/telegraf.conf':
owner => 'root',

View file

@ -0,0 +1,13 @@
[[outputs.influxdb_v2]]
## The URLs of the InfluxDB cluster nodes.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## urls exp: http://127.0.0.1:9999
urls = ["https://metrics.sunet.se:9999"]
## Token for authentication.
token = "${INFLUXDB2_TOKEN}"
## Organization is the name of the organization you wish to write to; must exist.
organization = "${INFLUXDB2_ORG}"
## Destination bucket to write into.
bucket = "${INFLUXDB2_BUCKET}"