Skip to content

Conversation

@bdeferme
Copy link

Pull Request (PR) description

Prometheus v2 to_yaml missing line_width option breaks puppetdb queries by adding new lines.

E.g. using:

  ...

  $_puppetdb_queries = {
    'some_app'  => "inventory { resources { type = 'Package' and title = 'some_app' } and ( ${_environment_query} ) }",
    'node' => "inventory { resources { type = 'Package' and title = 'node_exporter' } and ( ${_environment_query} ) }",
  }

  class { 'prometheus::server':
  ...
    scrape_configs  => [
      {
        'job_name'            => 'some_app',
        'puppetdb_sd_configs' => [
          {
            'include_parameters' => false,
            'port'               => 8161,
            'query'              => $_puppetdb_queries['some_app'],

Without line_width -1, line breaks are added breaking the puppetdb queries.

This Pull Request (PR) fixes the following issues

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants