Puppet Class: datadog_agent::integrations::ssh
- Inherits:
- datadog_agent::params
- Defined in:
- manifests/integrations/ssh.pp
Overview
Class: datadog_agent::integrations::ssh
This class will enable ssh check
See the sample ssh_check.d/conf.yaml for all available configuration options github.com/DataDog/integrations-core/blob/master/ssh_check/datadog_checks/ssh_check/data/conf.yaml.example
Parameters:
$host:
ssh server to use for ssh check
$port
$username
$password
$sftp_check
$private_key_file
$add_missing_keys
Sample Usage:
class { 'datadog_agent::integrations::ssh' :
host => 'localhost',
private_key_file => '/opt/super_secret_key',
}
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'manifests/integrations/ssh.pp', line 31
class datadog_agent::integrations::ssh (
String $host = $trusted['certname'],
Integer $port = 22,
String $username = $datadog_agent::dd_user,
Optional[Any] $password = undef,
Boolean $sftp_check = true,
Optional[String] $private_key_file = undef,
Boolean $add_missing_keys = true,
) inherits datadog_agent::params {
require datadog_agent
$dst_dir = "${datadog_agent::params::conf_dir}/ssh_check.d"
file { $dst_dir:
ensure => directory,
owner => $datadog_agent::dd_user,
group => $datadog_agent::params::dd_group,
mode => $datadog_agent::params::permissions_directory,
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name],
}
$dst = "${dst_dir}/conf.yaml"
file { $dst:
ensure => file,
owner => $datadog_agent::dd_user,
group => $datadog_agent::params::dd_group,
mode => $datadog_agent::params::permissions_protected_file,
content => template('datadog_agent/agent-conf.d/ssh.yaml.erb'),
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name],
}
}
|