puppet-prometheus
puppet-prometheus copied to clipboard
Any working examples of using the `collect_scrape_jobs` behavior?
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet:
$ sudo /opt/puppetlabs/bin/puppet --version
6.4.0
- Ruby:
$ sudo /opt/puppetlabs/puppet/bin/ruby --version
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
- Distribution: ??
- Module version:
8.3.0
How to reproduce (e.g Puppet code you use
prometheus server
class profile::prometheus::server {
include ::prometheus
firewall {
'8093 Allow prometheus connections':
proto => 'tcp',
dport => [9100],
action => 'accept';
}
}
prometheus::manage_prometheus_server: true
prometheus::scrape_configs: []
prometheus::collect_scrape_jobs:
- job_name: prometheus-node-exporter
prometheus client
class profile::prometheus::client {
include ::prometheus
}
shared yaml
prometheus::scrape_configs:
- job_name: prometheus
scrape_interval: 10s
scrape_timeout: 10s
static_configs:
- targets:
- stats.alertinnovation.com:9090
labels:
alias: prometheus
- job_name: nodexporter
scrape_interval: 10s
scrape_timeout: 10s
static_configs:
- targets:
- stats.alertinnovation.com:9100
labels:
alias: node
prometheus::version: 2.4.3
prometheus::node_exporter::version: 1.0.0-rc.0
What are you seeing
Catalog is applied without any errors but the prometheus server isn't collecting any node_exporter configs.
What behaviour did you expect instead
I expect to see the catalog applied but also the prometheus server collecting node_exporter configs.
Output log
Any additional information you'd like to impart
I think this is more of a usage question then a bug but I feel the examples do not really show how to exercise this collector behavior.