Comments (14)
Hi @TomaszUrugOlszewski, thanks for the issue. Are you able to provide a PR for this?
from puppet-prometheus.
I've just tested this using the YAML pasted above and I'm unable to replicate the issue.
Can you confirm your versions match the below? I assume they do as I've installed from the packages you have listed.
Enviroment:
Debian GNU/Linux 8.9
puppet 4.10.8
hiera 3.3.2
ruby 2.1.9p490
from puppet-prometheus.
@TomaszUrugOlszewski can you please verify the comment from @benpollardcts
from puppet-prometheus.
Yes, of course. I'll try to find out what's wrong.
from puppet-prometheus.
I was able to recreate my issue on fresh vagrant environment with image debian/contrib-jessie64
ii puppet-agent 1.10.9-1jessie amd64 The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, hiera and mcollective.
ii puppetlabs-release-pc1 1.1.0-2jessie all Release packages for the Puppet Labs PC1 repository
ii puppetserver 2.8.0-1puppetlabs1 all Puppet Labs puppetserver
Test code
vagrant@contrib-jessie:~$ cat /etc/puppetlabs/code/environments/production/manifests/site.pp
$ble = {
'scrape_configs' =>
[
{
'job_name' => 'bleble',
'static_configs' =>
[
{
'targets' =>
[
'mongo-badabum2a:9216',
'mongo-badabum2b:9216',
'mongo-badabum2c:9216',
],
'labels' =>
{
'cluster' => 'something-somewhere-sometime',
}
}
]
}
]
}
$template = @(END)
<% require 'yaml' -%>
<%= @ble.to_yaml(options = {:line_width => -1}) -%>
END
file { '/tmp/test.yaml':
content => inline_template($template)
}
Result
"scrape_configs":
- "job_name": >-
bleble
"static_configs":
- "targets":
- >-
mongo-badabum2a:9216
- >-
mongo-badabum2b:9216
- >-
mongo-badabum2c:9216
"labels":
"cluster": >-
something-somewhere-sometime
After changing line_width "-1" to "800":
root@contrib-jessie:/home/vagrant# cat /tmp/test.yaml
---
scrape_configs:
- job_name: bleble
static_configs:
- targets:
- mongo-badabum2a:9216
- mongo-badabum2b:9216
- mongo-badabum2c:9216
labels:
cluster: something-somewhere-sometime
To be honest, I have no idea how to debug it, I'm not familar with ruby. My suggestion is to change it from -1 to some bigger value than 80, or revert, to keep compability with older(?) puppet/puppetserver/debian versions.
from puppet-prometheus.
@TomaszUrugOlszewski one question: is the yaml file with the weird syntax working? I want to know whether this is just ugly looking or whether it affects the service.
from puppet-prometheus.
Initially I thought that it's broken syntax, but after removing my "dirty fix" looks like everything is fine. Works as expected.
from puppet-prometheus.
@TomekClearcode thanks. @TomaszUrugOlszewski can you confirm that the ugly looking syntax is working?
Please let us know if you are OK with having ugly looking but working syntax. In this case we could close this issue.
from puppet-prometheus.
Sorry @tuxmea, it was me under different login. Yes we can close it, I can live with it.
from puppet-prometheus.
@TomaszUrugOlszewski great. thanks.
from puppet-prometheus.
We have tried to update to the latest Puppet module version and we got an error with the Prometheus config test during the Puppet run.
puppet-agent[23364]: (/Stage[main]/Prometheus::Config/File[prometheus.yaml]/content) line 135: cannot unmarshal !!str `[__addr...` into model.LabelNames
puppet-agent[23364]: (/Stage[main]/Prometheus::Config/File[prometheus.yaml]/content) line 139: cannot unmarshal !!str `[__para...` into model.LabelNames
We use the following setup:
- Prometheus Version: 1.7.1
- OS: CentOS Linux release 7.4.1708 (Core)
- Puppet Version: 5.3.5
- Prometheus Puppet Modul Version: v5.0.0
Part of our working 'prometheus.yaml'
- job_name: blackbox
scrape_interval: 30s
scrape_timeout: 30s
metrics_path: "/probe"
params:
module:
- index_page
static_configs:
- targets:
- https://localhost/index.html
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
The is the not working config:
...
- source_labels: >-
[__address__]
...
Could you please reopen this issue.
from puppet-prometheus.
I have the same issue with:
puppetserver=5.3.3
puppet-agent=5.5.3
ruby=2.4.4p296 (2018-03-28 revision 63013)
prometheus module=6.0.6
And this definitely affects the service.
UPD: I was trying to use prometheus server > v2, but did it wrong with hiera. Now I am able to use hiera right way and I have prom v2 and my config has right syntax.
from puppet-prometheus.
@vanch what did you change?
@Ulme007 not sure what the issue is. Are the hiera strings quoted? Could you share your hiera data?
from puppet-prometheus.
Closing due to lack of feedback, feel free to re-open
from puppet-prometheus.
Related Issues (20)
- node_exporter.pp does not provide direct way to override the listening port
- ipmi exporter does not support remote ipmi HOT 1
- Add support for managing kafka node exporter
- deprecation of `source_match(_re)` and `target_match(_re)`
- mongodb_exporter doesn't allow overriding service and binary name
- Trouble using prometheus::server::collect_tag. HOT 1
- node_exporter change default port 9100 HOT 2
- Support scrape_config_files option HOT 3
- Received SIGTERM, exiting gracefully HOT 3
- Remove prometheus 1.x support
- Remove support for alertmanager < 0.13.0
- Drop support for redis_exporter < 1.0.0
- "job_name: prometheus" duplication HOT 1
- replace systemd unit templates with systemd::manage_unit
- Dependency Dashboard
- Dependency Dashboard
- Drop suppoprt for apache_exporter < 1.x HOT 1
- move all exporter versions to the manifests.
- Drop support for elasticsearch_exporter < 1.1.0
- Archlinux prometheus server ui bug with version > 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-prometheus.