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

blackbox exporters source_labels must be unquoted #98

Conversation

tuxmea
Copy link
Member

@tuxmea tuxmea commented Oct 30, 2017

when setting relabel configs we can not provide an array as to_yaml
converts this to folded. blackbox exporter expets this to be a flow
style array without any quotes.

in puppet we provide the information (e.g.):

'relabel_configs' => [
  {
    'source_labels' => '[__address__]',
    'target_label'  => '__param_target',
  },
  {
    'source_labels' => '[__param_target]',
    'target_label'  => 'instance',
  },
  {
    'target_label' => '__address',
    'replacement'  => '127.0.0.1:9115',
  },
],

within the template we gsub the double quotes which '.to_yaml' adds.

when setting relabel configs we can not provide an array as to_yaml
converts this to folded. blackbox exporter expets this to be a flow
style array without any quotes.

in puppet we provide the information (e.g.):

    'relabel_configs' => [
      {
        'source_labels' => '[__address__]',
        'target_label'  => '__param_target',
      },
      {
        'source_labels' => '[__param_target]',
        'target_label'  => 'instance',
      },
      {
        'target_label' => '__address',
        'replacement'  => '127.0.0.1:9115',
      },
    ],

within the template we gsub the double quotes which '.to_yaml' adds.
@bastelfreak bastelfreak added the bug Something isn't working label Oct 30, 2017
@bastelfreak
Copy link
Member

Thanks Martin!

@bastelfreak bastelfreak merged commit 6362a71 into voxpupuli:master Oct 30, 2017
@tuxmea tuxmea deleted the blackbox_exporter_source_labels_without_quotes branch October 31, 2017 13:22
Rovanion pushed a commit to Rovanion/puppet-prometheus that referenced this pull request May 5, 2021
…labels_without_quotes

blackbox exporters source_labels must be unquoted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants