Defined Type: prometheus::snmp_exporter::module

Defined in:
modules/prometheus/manifests/snmp_exporter/module.pp

Overview

Parameters:

  • template (Any)
  • community (Any) (defaults to: undef)
  • ensure (Any) (defaults to: present)


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/prometheus/manifests/snmp_exporter/module.pp', line 12

define prometheus::snmp_exporter::module (
  $template,
  $community = undef,
  $ensure = present,
) {
    $exporter_module = $title

    # prometheus-snmp-exporter-config will take care of assembling all
    # modules yaml files into snmp.yml for snmp_exporter to consume.
    file { "/etc/prometheus/snmp.yml.d/${exporter_module}.yml":
        content   => template("prometheus/snmp_exporter/${template}.yml.erb"),
        notify    => Exec['prometheus-snmp-exporter-config'],
        show_diff => false,
    }
}