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

Documentation of default values for InfluxWriter is outdated #537

Closed
s-johansson opened this issue Mar 6, 2019 · 2 comments
Closed

Documentation of default values for InfluxWriter is outdated #537

s-johansson opened this issue Mar 6, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@s-johansson
Copy link

s-johansson commented Mar 6, 2019

Expected Behavior

Defaults are applied as documented

# [*host_measurement*]
#    The value of this is used for the measurement setting in host_template. Defaults to  '$host.check_command$'
#
# [*host_tags*]
#    Tags defined in this hash will be set in the host_template.
#
#  [*service_measurement*]
#    The value of this is used for the measurement setting in host_template. Defaults to  '$service.check_command$'
#
# [*service_tags*]
#    Tags defined in this hash will be set in the service_template.
#
# [*enable_send_thresholds*]
#    Whether to send warn, crit, min & max tagged data. Defaults to false.
#
# [*enable_send_metadata*]
#    Whether to send check metadata e.g. states, execution time, latency etc. Defaults to false.
#
# [*flush_interval*]
#    How long to buffer data points before transfering to InfluxDB. Defaults to 10s.
#
# [*flush_threshold*]
#    How many data points to buffer before forcing a transfer to InfluxDB. Defaults to 1024.

Current Behavior

Defaults are not applied

# This file is managed by Puppet. DO NOT EDIT.
library "perfdata"

object InfluxdbWriter "influxdb" {
  host = "xxx"
  database = "xxx"
  username = "xxx"
  password = "xxx"
  host_template = {
    measurement = "undef"
    tags = "undef"
  }
  service_template = {
    measurement = "undef"
    tags = "undef"
  }
  enable_send_metadata = false
}

Possible Solution

  • Rework documentation
    or
  • Restore defaults as they they were removed after v1.4.0

Steps to Reproduce (for bugs)

Just declare the class without mentioned options

 class { 'icinga2::feature::influxdb':
    host                 => $icinga2_influxdb_host,
    database             => 'Icinga2',
    username             => $icinga2_influxdb_user,
    password             => $icinga2_influxdb_password,
    enable_send_metadata => $icinga2_influxdb_metadata
  }

Context

Your Environment

Using v2.0.1 and comparing result with v1.4.0

@s-johansson s-johansson changed the title Documentation of default values for InfluxWriter need is outdated Documentation of default values for InfluxWriter is outdated Mar 6, 2019
s-johansson pushed a commit to s-johansson/puppet-icinga2 that referenced this issue Mar 6, 2019
@s-johansson
Copy link
Author

Added default values to icinga2::feature::influxdb

@lbetz lbetz self-assigned this Mar 28, 2019
@lbetz lbetz added the bug label Apr 25, 2019
@lbetz
Copy link
Contributor

lbetz commented Apr 25, 2019

Default to:

object InfluxdbWriter "influxdb" {
host_template = {
measurement = "$host.check_command$"
tags = {
hostname = "$host.name$"
}
}
service_template = {
measurement = "$service.check_command$"
tags = {
hostname = "$host.name$"
service = "$service.name$"
}
}
}

@lbetz lbetz closed this as completed in ade1818 Apr 25, 2019
@lbetz lbetz added this to the v2.1.0 milestone Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants