{"action":"created","issue":{"url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/160","repository_url":"https://api.github.com/repos/voxpupuli/puppet-prometheus","labels_url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/160/comments","events_url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/160/events","html_url":"https://github.com/voxpupuli/puppet-prometheus/issues/160","id":297421495,"number":160,"title":"relabel_configs unmarshal errors","user":{"login":"yackushevas","id":1884362,"avatar_url":"https://avatars1.githubusercontent.com/u/1884362?v=4","gravatar_id":"","url":"https://api.github.com/users/yackushevas","html_url":"https://github.com/yackushevas","followers_url":"https://api.github.com/users/yackushevas/followers","following_url":"https://api.github.com/users/yackushevas/following{/other_user}","gists_url":"https://api.github.com/users/yackushevas/gists{/gist_id}","starred_url":"https://api.github.com/users/yackushevas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yackushevas/subscriptions","organizations_url":"https://api.github.com/users/yackushevas/orgs","repos_url":"https://api.github.com/users/yackushevas/repos","events_url":"https://api.github.com/users/yackushevas/events{/privacy}","received_events_url":"https://api.github.com/users/yackushevas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-15T12:01:00Z","updated_at":"2018-02-16T11:51:31Z","closed_at":null,"author_association":"NONE","body":"## Affected Puppet, Ruby, OS and module versions/distributions\r\n\r\n- Puppet: 5.3.4\r\n- Ruby: 2.4.3p205p\r\n- Distribution: Debian 8\r\n- Module version: 4.0\r\n\r\n## How to reproduce (e.g Puppet code you use)\r\npart of the code from the hiera (json):\r\n```\r\n          \"relabel_configs\": [\r\n            {\r\n              \"source_labels\": \"['__meta_consul_service']\",\r\n              \"regex\": \"'(.*)'\",\r\n              \"target_label\": \"service\",\r\n              \"replacement\": \"$1\"\r\n            }\r\n          ]\r\n```\r\n\r\n## What are you seeing\r\n\r\nafter converting to yaml:\r\n```\r\n  - \"source_labels\": >-\r\n      ['__meta_consul_service']\r\n     \"regex\": >-\r\n       '(.*)'\r\n    \"target_label\": >-\r\n      'service'\r\n     \"replacement\": >-\r\n       '$1'\r\n```\r\n\r\n## What behaviour did you expect instead\r\n\r\n    relabel_configs:\r\n    - source_labels: ['__meta_consul_service']\r\n      regex:         '(.*)'\r\n      target_label:  'service'\r\n      replacement:   '$1'\r\n\r\n## Output log\r\n\r\n> Error: /Stage[main]/Prometheus::Config/File[prometheus.yaml]/content: change from '{md5}8822bf5e2346fa4e41e3cfb3f5e1d3d2' to '{md5}465e86f9620ff98445bc84004f7d491b' failed: Execution of '/usr/local/bin/promtool check-config /etc/prometheus/prometheus.yaml20180215-2965-nsyebg' returned 1: Checking /etc/prometheus/prometheus.yaml20180215-2965-nsyebg\r\n>   FAILED: yaml: unmarshal errors:\r\n>   line 26: cannot unmarshal !!str `['__met...` into model.LabelNames\r\n"},"comment":{"url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/comments/366216064","html_url":"https://github.com/voxpupuli/puppet-prometheus/issues/160#issuecomment-366216064","issue_url":"https://api.github.com/repos/voxpupuli/puppet-prometheus/issues/160","id":366216064,"user":{"login":"yackushevas","id":1884362,"avatar_url":"https://avatars1.githubusercontent.com/u/1884362?v=4","gravatar_id":"","url":"https://api.github.com/users/yackushevas","html_url":"https://github.com/yackushevas","followers_url":"https://api.github.com/users/yackushevas/followers","following_url":"https://api.github.com/users/yackushevas/following{/other_user}","gists_url":"https://api.github.com/users/yackushevas/gists{/gist_id}","starred_url":"https://api.github.com/users/yackushevas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yackushevas/subscriptions","organizations_url":"https://api.github.com/users/yackushevas/orgs","repos_url":"https://api.github.com/users/yackushevas/repos","events_url":"https://api.github.com/users/yackushevas/events{/privacy}","received_events_url":"https://api.github.com/users/yackushevas/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T11:51:31Z","updated_at":"2018-02-16T11:51:31Z","author_association":"NONE","body":"https://github.com/voxpupuli/puppet-prometheus/pull/104\r\nif i use this code:\r\n\r\n> <%= full_config.to_yaml.gsub(/source_labels: \".+?\"/) { |x| x.gsub('\"', '') } -%>\r\n\r\nthe problem goes away"}}
{"actor":{"display_login":"yackushevas"}}