feat: setup metrics agents
- set puppet::puppetdb_api class to export puppetdb - set infra::dns::server class to export bind - set all to export node and systemd metrics
This commit is contained in:
@@ -29,6 +29,7 @@ class profiles::base (
|
||||
include profiles::base::hosts
|
||||
include profiles::accounts::sysadmin
|
||||
include profiles::ntp::client
|
||||
include profiles::metrics::default
|
||||
|
||||
# configure dns records for client
|
||||
profiles::dns::client {"${facts['networking']['fqdn']}-default":}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user