Defined Type: nrpe::command

Defined in:
manifests/command.pp

Overview

Class: nrpe::command

Parameters:

  • command (Any) (defaults to: undef)
  • arguments (Any) (defaults to: '')


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'manifests/command.pp', line 3

define nrpe::command (
  $command = undef,
  $arguments = '',
) {

  if $command == undef {
    $real_command = "/usr/lib/nagios/plugins/${name}"
  } else {
    $real_command = $command
  }

  $template = 'nrpe/command.erb'

  file { "nrpe-${name}":
    ensure  => file,
    name    => "/etc/nagios/nrpe.d/${name}.cfg",
    content => template($template),
    notify  => Service[$nrpe::service_name],
  }

}