Merge pull request 'feat: setup metrics agents' (#68) from neoloc/node_exporter into develop
Reviewed-on: unkinben/puppet-prod#68
This commit is contained in:
commit
bae3d446b6
@ -23,6 +23,7 @@ mod 'puppet-chrony', '2.6.0'
|
||||
mod 'puppet-puppetboard', '9.0.0'
|
||||
mod 'puppet-nginx', '5.0.0'
|
||||
mod 'puppet-selinux', '4.1.0'
|
||||
mod 'puppet-prometheus', '13.4.0'
|
||||
|
||||
# other
|
||||
mod 'ghoneycutt-puppet', '3.3.0'
|
||||
|
||||
@ -36,6 +36,9 @@ profiles::puppet::client::runtimeout: 3600
|
||||
profiles::puppet::client::show_diff: true
|
||||
profiles::puppet::client::usecacheonfailure: false
|
||||
|
||||
prometheus::node_exporter::export_scrape_job: true
|
||||
prometheus::systemd_exporter::export_scrape_job: true
|
||||
|
||||
profiles::accounts::sysadmin::sshkeys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4mnB1H9XuvZkptDhXywWQ7QIcqa2WbhCen0OQJCtwn3s7EYtacmF5MxmwBYocPoK2AArGuh6NA9rwTdLrPdzhZ+gwe88PAzRLNzjm0ZBR+mA9saMbPJdqpKp0AWeAM8QofRQAWuCzQg9i0Pn1KDMvVDRHCZof4pVlHSTyHNektq4ifovn0zhKC8jD/cYu95mc5ftBbORexpGiQWwQ3HZw1IBe0ZETB1qPIPwsoJpt3suvMrL6T2//fcIIUE3TcyJKb/yhztja4TZs5jT8370G/vhlT70He0YPxqHub8ZfBv0khlkY93VBWYpNGJwM1fVqlw7XbfBNdOuJivJac8eW317ZdiDnKkBTxapThpPG3et9ib1HoPGKRsd/fICzNz16h2R3tddSdihTFL+bmTCa6Lo+5t5uRuFjQvhSLSgO2/gRAprc3scYOB4pY/lxOFfq3pU2VvSJtRgLNEYMUYKk= ben@unkin.net
|
||||
|
||||
|
||||
2
hieradata/roles/infra/dns.yaml
Normal file
2
hieradata/roles/infra/dns.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
prometheus::bind_exporter::export_scrape_job: true
|
||||
@ -31,6 +31,7 @@ class profiles::base (
|
||||
include profiles::ntp::client
|
||||
include profiles::dns::base
|
||||
include profiles::cloudinit::init
|
||||
include profiles::metrics::default
|
||||
|
||||
# include the python class
|
||||
class { 'python':
|
||||
|
||||
@ -17,11 +17,15 @@ class profiles::dns::server (
|
||||
|
||||
# setup base bind server
|
||||
class { 'bind':
|
||||
forwarders => $use_forwarders,
|
||||
dnssec => $dnssec,
|
||||
version => 'Controlled by Puppet',
|
||||
forwarders => $use_forwarders,
|
||||
dnssec => $dnssec,
|
||||
version => 'Controlled by Puppet',
|
||||
statistics_port => '8053',
|
||||
}
|
||||
|
||||
# setup bind_exporter
|
||||
include prometheus::bind_exporter
|
||||
|
||||
# if keys, import them
|
||||
$keys.each | $name, $data | {
|
||||
bind::key { $name:
|
||||
|
||||
11
site/profiles/manifests/metrics/default.pp
Normal file
11
site/profiles/manifests/metrics/default.pp
Normal file
@ -0,0 +1,11 @@
|
||||
# profiles::metrics::default
|
||||
#
|
||||
# these exporters will be setup on all nodes
|
||||
class profiles::metrics::default (
|
||||
Boolean $node_exporter = true,
|
||||
Boolean $systemd_exporter = true,
|
||||
) {
|
||||
|
||||
include prometheus::node_exporter
|
||||
include prometheus::systemd_exporter
|
||||
}
|
||||
@ -13,4 +13,9 @@ class profiles::puppet::puppetdb_api (
|
||||
|
||||
contain ::puppetdb::server
|
||||
|
||||
class { 'prometheus::puppetdb_exporter':
|
||||
puppetdb_url => "http://${listen_address}:8080/pdb/query",
|
||||
export_scrape_job => true,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user