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
37
38
39
40
41
42
43
44
45
|
# File 'modules/prometheus/manifests/snmp_exporter.pp', line 12
class prometheus::snmp_exporter {
ensure_packages(['prometheus-snmp-exporter'])
require prometheus::assemble_config
prometheus::snmp_exporter::module { 'default':
template => 'default',
}
service { 'prometheus-snmp-exporter':
ensure => running,
require => Package['prometheus-snmp-exporter'],
}
profile::auto_restarts::service { 'prometheus-snmp-exporter': }
file { '/etc/prometheus/snmp.yml.d':
ensure => directory,
mode => '0500',
owner => 'root',
group => 'root',
}
file { '/usr/local/bin/prometheus-snmp-exporter-config':
ensure => absent,
}
exec { 'assemble snmp.yml':
onlyif => 'prometheus-assemble-config --onlyif snmp',
command => 'prometheus-assemble-config snmp',
notify => Service['prometheus-snmp-exporter'],
path => '/usr/local/bin',
}
}
|