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

Prometheus v2 to_yaml add line_width option #638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant