Puppet Class: puppet_metrics_dashboard::dashboards
- Defined in:
- manifests/dashboards.pp
Summary
Configures Grafana dashboards.Overview
Configures Grafana dashboards.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'manifests/dashboards.pp', line 6
class puppet_metrics_dashboard::dashboards {
if $puppet_metrics_dashboard::add_dashboard_examples {
$_overwrite_dashboards_ensure = $puppet_metrics_dashboard::overwrite_dashboards ? {
true => 'absent',
false => 'file',
}
file { $puppet_metrics_dashboard::overwrite_dashboards_file:
ensure => $_overwrite_dashboards_ensure,
mode => '0644',
}
$_overwrite = $facts['overwrite_dashboards_disabled'] ? {
true => false,
default => true,
}
$_dblist = $puppet_metrics_dashboard::influxdb_database_name
if $_overwrite and ('graphite' in $_dblist){
include puppet_metrics_dashboard::dashboards::graphite
}
if $_overwrite and ('puppet_metrics' in $_dblist){
include puppet_metrics_dashboard::dashboards::puppet_metrics
}
if $_overwrite and ('telegraf' in $_dblist){
include puppet_metrics_dashboard::dashboards::telegraf
}
}
}
|