Classes
Public Classes
sensu
: Base Sensu classsensu::agent
: Manage Sensu agentsensu::backend
: Manage Sensu backendsensu::plugins
: Manage Sensu plugins
Private Classes
sensu::backend::default_resources
: Default sensu resourcessensu::backend::resources
: Define sensu resourcessensu::backend::tessen
: Manage tessen phone homesensu::repo
: Private class to manage sensu repository resourcessensu::repo::community
: Private class to manage sensu community repository resourcessensu::ssl
: Private class to manage sensu SSL resources
Resource types
sensu_ad_auth
: Manages Sensu Active Directory auth. Requires valid enterprise license.sensu_api_validator
: Verify that a connection can be successfully established between a node and the sensu-backend server. Its primary use is as a precondition tsensu_asset
: Manages Sensu assetssensu_check
: Manages Sensu checkssensu_cluster_member
: Manages Sensu cluster memberssensu_cluster_role
: Manages Sensu cluster rolessensu_cluster_role_binding
: Manages Sensu cluster role bindingssensu_config
: Manages Sensu configssensu_configure
: Managessensuctl configure
. This is a private type not intended to be used directly.sensu_entity
: Manages Sensu entitiessensu_event
: Manages Sensu eventssensu_filter
: Manages Sensu filterssensu_handler
: Manages Sensu handlerssensu_hook
: Manages Sensu hookssensu_ldap_auth
: Manages Sensu LDAP auth. Requires valid enterprise license.sensu_mutator
: Manages Sensu mutatorssensu_namespace
: Manages Sensu namespacessensu_plugin
: Manages Sensu pluginssensu_role
: Manages Sensu rolessensu_role_binding
: Manages Sensu role bindingssensu_silenced
: Manages Sensu silencingsensu_user
: Manages Sensu users
This is the main Sensu class
The following parameters are available in the sensu
class.
Data type: String
Version of Sensu to install. Defaults to installed
to support
Windows MSI packaging and to avoid surprising upgrades.
Default value: 'installed'
Data type: Stdlib::Absolutepath
Absolute path to the Sensu etc directory.
Default value: '/etc/sensu'
Data type: Stdlib::Absolutepath
Absolute path to the Sensu ssl directory.
Default value: '/etc/sensu/ssl'
Data type: String
User used by sensu services
Default value: 'sensu'
Data type: String
User group used by sensu services
Default value: 'sensu'
Data type: Boolean
Boolean to determine if the etc_dir should be purged such that only Puppet managed files are present.
Default value: true
Data type: Boolean
Boolean to determine if the ssl_dir should be purged such that only Puppet managed files are present.
Default value: true
Data type: Boolean
Boolean to determine if software repository for Sensu should be managed.
Default value: true
Data type: Boolean
Sensu backend service uses SSL
Default value: true
Data type: Optional[String]
Source of SSL CA used by sensu services
Default value: $facts['puppet_localcacert']
Class to manage the Sensu agent.
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions => ['linux', 'apache-servers'],
},
}
The following parameters are available in the sensu::agent
class.
Data type: Optional[String]
Version of sensu agent to install. Defaults to installed
to support
Windows MSI packaging and to avoid surprising upgrades.
Default value: undef
Data type: Optional[String[1]]
Source of package for installing Windows. Paths with http:// or https:// will be downloaded Paths with puppet:// or absolute filesystem paths will also be installed.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Where to download the MSI for Windows. Defaults to C:\
.
This parameter only used when package_source
is an URL or when it's a puppet source (puppet://
).
Default value: undef
Data type: String
Name of Sensu agent package.
Default value: 'sensu-go-agent'
Data type: String
Name of the Sensu agent service.
Default value: 'sensu-agent'
Data type: String
Sensu agent service ensure value.
Default value: 'running'
Data type: Boolean
Sensu agent service enable value.
Default value: true
Data type: Hash
Sensu agent configuration hash used to define agent.yml.
Default value: {}
Data type: Array[Sensu::Backend_URL]
Array of sensu backends to pass to backend-url
config option.
The protocol prefix of ws://
or wss://
are optional and will be determined
based on sensu::use_ssl
parameter by default.
Passing backend-url
as part of config_hash
takes precedence.
Default value: ['localhost:8081']
Data type: Boolean
Sets show_diff parameter for agent.yml configuration file
Default value: true
Data type: Optional[Stdlib::Absolutepath]
Path to agent log file, only for Windows.
Defaults to C:\ProgramData\sensu\log\sensu-agent.log
Default value: undef
Class to manage the Sensu backend.
class { 'sensu::backend':
password => 'secret',
}
The following parameters are available in the sensu::backend
class.
Data type: Optional[String]
Version of sensu backend to install. Defaults to installed
to support
Windows MSI packaging and to avoid surprising upgrades.
Default value: undef
Data type: String
Name of Sensu backend package.
Default value: 'sensu-go-backend'
Data type: String
Name of Sensu CLI package.
Default value: 'sensu-go-cli'
Data type: String
Name of the Sensu backend service.
Default value: 'sensu-backend'
Data type: String
Sensu backend service ensure value.
Default value: 'running'
Data type: Boolean
Sensu backend service enable value.
Default value: true
Data type: Stdlib::Absolutepath
Sensu backend state directory path.
Default value: '/var/lib/sensu/sensu-backend'
Data type: Hash
Sensu backend configuration hash used to define backend.yml.
Default value: {}
Data type: String
Sensu backend host used to configure sensuctl and verify API access.
Default value: $trusted['certname']
Data type: Stdlib::Port
Sensu backend port used to configure sensuctl and verify API access.
Default value: 8080
Data type: Optional[String]
The SSL certificate source
Default value: $facts['puppet_hostcert']
Data type: Optional[String]
The SSL private key source
Default value: $facts['puppet_hostprivkey']
Data type: String
Sensu backend admin password used to confiure sensuctl.
Default value: 'P@ssw0rd!'
Data type: Optional[String]
Sensu backend admin old password needed when changing password.
Default value: undef
Data type: String
The sensu agent password
Default value: 'P@ssw0rd!'
Data type: Optional[String]
The sensu agent old password needed when changing agent_password
Default value: undef
Data type: Boolean
Sets if default sensu resources should be included
Default value: true
Data type: Boolean
Sets show_diff parameter for backend.yml configuration file
Default value: true
Data type: Optional[String]
The source of sensu-go enterprise license. Supports any valid Puppet File sources such as absolute paths or puppet:/// Do not define with license_content
Default value: undef
Data type: Optional[String]
The content of sensu-go enterprise license Do not define with license_source
Default value: undef
Data type: Boolean
Boolean that determines if Tessen is managed
Default value: true
Data type: Enum['present','absent']
Determine if Tessen is opt-in (present) or opt-out (absent)
Default value: 'present'
Data type: Hash
Hash of sensu_ad_auth resources
Default value: {}
Data type: Hash
Hash of sensu_asset resources
Default value: {}
Data type: Hash
Hash of sensu_check resources
Default value: {}
Data type: Hash
Hash of sensu_cluster_member resources
Default value: {}
Data type: Hash
Hash of sensu_cluster_role_binding resources
Default value: {}
Data type: Hash
Hash of sensu_cluster_role resources
Default value: {}
Data type: Hash
Hash of sensu_config resources
Default value: {}
Data type: Hash
Hash of sensu_entitie resources
Default value: {}
Data type: Hash
Hash of sensu_event resources
Default value: {}
Data type: Hash
Hash of sensu_filter resources
Default value: {}
Data type: Hash
Hash of sensu_handler resources
Default value: {}
Data type: Hash
Hash of sensu_hook resources
Default value: {}
Data type: Hash
Hash of sensu_ldap_auth resources
Default value: {}
Data type: Hash
Hash of sensu_mutator resources
Default value: {}
Data type: Hash
Hash of sensu_namespace resources
Default value: {}
Data type: Hash
Hash of sensu_role_binding resources
Default value: {}
Data type: Hash
Hash of sensu_role resources
Default value: {}
Data type: Hash
Hash of sensu_silenced resources
Default value: {}
Data type: Hash
Hash of sensu_user resources
Default value: {}
Class to manage the Sensu plugins.
class { 'sensu::plugins':
plugins => ['disk-checks'],
extensions => ['graphite'],
}
class { 'sensu::plugins':
plugins => {
'disk-checks' => { 'version' => 'latest' },
},
extensions => {
'graphite' => { 'version' => 'latest' },
},
}
The following parameters are available in the sensu::plugins
class.
Data type: String
Ensure property for sensu plugins package.
Default value: 'installed'
Data type: String
Name of the Sensu plugins ruby package.
Default value: 'sensu-plugins-ruby'
Data type: Array
Package dependencies needed to install plugins and extensions. Default is OS dependent.
Default value: []
Data type: Variant[Array, Hash]
Plugins to install
Default value: []
Data type: Variant[Array, Hash]
Extensions to install
Default value: []
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Exec[sensu-add-license]
sensu_ad_auth { 'ad':
ensure => 'present',
servers => [
{
'host' => '127.0.0.1',
'port' => 636,
},
],
server_binding => {
'127.0.0.1' => {
'user_dn' => 'cn=binder,dc=acme,dc=org',
'password' => 'P@ssw0rd!'
}
},
server_group_search => {
'127.0.0.1' => {
'base_dn' => 'dc=acme,dc=org',
}
},
server_user_search => {
'127.0.0.1' => {
'base_dn' => 'dc=acme,dc=org',
}
},
}
The following properties are available in the sensu_ad_auth
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
AD servers Defaults:
- insecure: false
- security: tls
- trusted_ca_file: ""
- client_cert_file: ""
- client_key_file: ""
AD server bindings
Search configuration for groups. Defaults:
- attribute: member
- name_attribute: cn
- object_class: group
Search configuration for users. Defaults:
- attribute: sAMAccountName
- name_attribute: displayName
- object_class: person
The prefix added to all AD groups.
The prefix added to all AD usernames.
The following parameters are available in the sensu_ad_auth
type.
namevar
The name of the AD auth.
Verify that a connection can be successfully established between a node and the sensu-backend server. Its primary use is as a precondition to prevent configuration changes from being applied if the sensu_backend server cannot be reached, but it could potentially be used for other purposes such as monitoring.
sensu_api_validator { 'sensu':
sensu_api_server => 'localhost',
sensu_api_ort => 8080,
}
The following properties are available in the sensu_api_validator
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the sensu_api_validator
type.
namevar
An arbitrary name used as the identity of the resource.
The DNS name or IP address of the server where sensu_api should be running.
Default value: localhost
The port that the sensu_api server should be listening on.
Default value: 8080
Whether the connection will be attemped using https
Default value: false
URL to use for testing if the Sensu backend is up
Default value: /health
The max number of seconds that the validator should wait before giving up and deciding that sensu_api is not running; defaults to 15 seconds.
Default value: 30
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
sensu_asset { 'test':
ensure => 'present',
url => 'http://example.com/asset/example.tar',
sha512 => '4f926bf4328fbad2b9cac873d117f771914f4b837c9c85584c38ccf55a3ef3c2e8d154812246e5dda4a87450576b2c58ad9ab40c9e2edc31b288d066b195b21b',
filters => ['System.OS==linux'],
}
The following properties are available in the sensu_asset
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The URL location of the asset.
The checksum of the asset
Valid values: /.*/, absent
A set of filters used by the agent to determine of the asset should be installed.
The Sensu RBAC namespace that this asset belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_asset
type.
namevar
The name of the asset.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_handler
- Puppet will autorequiesensu_handler
resources defined inhandlers
property.sensu_asset
- Puppet will autorequiresensu_asset
resources defined inruntime_assets
property.sensu_hook
- Puppet will autorequiresensu_hook
resources defined incheck_hooks
property.
sensu_check { 'test':
ensure => 'present',
command => 'check-http.rb',
subscriptions => ['demo'],
handlers => ['email'],
interval => 60,
}
sensu_check { 'test':
ensure => 'present',
command => 'check-cpu.sh -w 75 -c 90',
subscriptions => ['linux'],
check_hooks => [
{ 'critical' => ['ps'] },
{ 'warning' => ['ps'] },
],
interval => 60,
}
The following properties are available in the sensu_check
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The check command to be executed.
An array of Sensu entity subscriptions that check requests will be sent to.
An array of Sensu event handlers (names) to use for events created by the check.
Valid values: /^[0-9]+$/, absent
The frequency in seconds the check is executed.
Valid values: /.*/, absent
When the check should be executed, using the Cron syntax.
Valid values: true
, false
If check requests are published for the check.
Default value: true
Valid values: /^[0-9]+$/, absent
The check execution duration timeout in seconds (hard stop).
Valid values: /^[0-9]+$/, absent
The time to live (TTL) in seconds until check results are considered stale.
Valid values: true
, false
If the Sensu agent writes JSON serialized Sensu entity and check data to the command process' STDIN
Default value: false
Valid values: /^[0-9]+$/, absent
The flap detection low threshold (% state change) for the check
Valid values: /^[0-9]+$/, absent
The flap detection high threshold (% state change) for the check
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
An array of check response types with respective arrays of Sensu hook names.
Valid values: /^[\w.-]+$/, absent
The entity name, used to create a proxy entity for an external resource (i.e., a network switch).
Valid values: true
, false
If the check should be executed on a single entity within a subscription in a round-robin fashion.
Sensu entity attributes to match entities in the registry, using Sensu Query Expressions
Valid values: true
, false
If proxy check requests should be splayed
The splay coverage percentage use for proxy check request splay calculation.
Valid values: true
, false
If the event is to be silenced.
Valid values: /.*/, absent
An array of environment variables to use with command execution.
Valid values: nagios_perfdata, graphite_plaintext, influxdb_line, opentsdb_line, absent
The metric format generated by the check command.
Valid values: /.*/, absent
An array of Sensu handlers to use for events created by the check.
Maximum size, in bytes, of stored check outputs.
Valid values: true
, false
Discard check output after extracting metrics.
The Sensu RBAC namespace that this check belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_check
type.
namevar
The name of the check.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_cluster_member { 'backend2':
ensure => 'present',
peer_urls => ['http://192.168.52.12:2380'],
}
The following properties are available in the sensu_cluster_member
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Array of cluster peer URLs
The following parameters are available in the sensu_cluster_member
type.
namevar
The name of the cluster member.
Cluster member ID - read-only
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_cluster_role { 'test':
ensure => 'present',
rules => [{'verbs' => ['get','list'], 'resources' => ['checks'], 'resource_names' => ['']}],
}
The following properties are available in the sensu_cluster_role
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The rulesets that a role applies.
The following parameters are available in the sensu_cluster_role
type.
namevar
The name of the role.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_cluster_role
- Puppet will autorequiresensu_cluster_role
resource defined inrole_ref
property.sensu_user
- Puppet will autorequiresensu_user
resources based on users and groups defined for thesubjects
property.
sensu_cluster_role_binding { 'test':
ensure => 'present',
role_ref => 'test-role',
subjects => [
{ 'type' => 'User', 'name' => 'test-user' }
],
}
The following properties are available in the sensu_cluster_role_binding
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
References a cluster role.
The users or groups being assigned.
The following parameters are available in the sensu_cluster_role_binding
type.
namevar
The name of the role binding.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_config { 'format':
value => 'json',
}
The following properties are available in the sensu_config
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The value of the config.
The following parameters are available in the sensu_config
type.
namevar
The name of the config.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_api_validator[sensu]
file
- Puppet will autorequirefile
resources defined intrusted_ca_file
property.
The following properties are available in the sensu_configure
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
sensu-backend URL
Path to trusted CA
Default value: /etc/sensu/ssl/ca.crt
The following parameters are available in the sensu_configure
type.
namevar
The name of the resource.
Username to use with sensuctl configure
Password to use with sensuctl configure
Password to use when bootstrapping sensuctl
Default value: P@ssw0rd!
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_handler
- Puppet will autorequiesensu_handler
resource defined inderegistration_handler
property.
sensu_entity { 'test':
ensure => 'present',
entity_class => 'proxy',
}
The following properties are available in the sensu_entity
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The entity type
A list of subscription names for the entity
System information about the entity, such as operating system and platform.
Timestamp the entity was last seen, in epoch time.
Valid values: true
, false
If the entity should be removed when it stops sending keepalive messages.
Default value: false
The name of the handler to be called when an entity is deregistered.
List of items to redact from log messages.
The Sensu RBAC namespace that this entity belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_entity
type.
namevar
The unique name of the entity
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
sensu_event { 'test for sensu-agent':
ensure => 'resolve'
}
sensu_event { 'test for sensu-agent':
ensure => 'absent'
}
The following properties are available in the sensu_event
type.
Valid values: present, resolve, absent, delete
Aliases: "delete"=>"absent"
The basic property that the resource should be in.
The following parameters are available in the sensu_event
type.
namevar
Event name. Can take form of ' for '.
The name of the entity the event should match
The name of the check the event should match
The Sensu RBAC namespace that this event belongs to.
Default value: default
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_asset
- Puppet will autorequiresensu_asset
resources defined inruntime_assets
property.
sensu_filter { 'test':
ensure => 'present',
action => 'allow',
expressions => ["event.Entity.Environment == 'production'"],
}
The following properties are available in the sensu_filter
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: allow, deny
Action to take with the event if the filter expressions match.
Filter expressions to be compared with event data.
Valid values: /.*/, absent
Assets to be applied to the filter’s execution context.
The Sensu RBAC namespace that this filter belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_filter
type.
namevar
The name of the filter.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_filter
- Puppet will autorequiresensu_filter
resources defined infilters
property.sensu_mutator
- Puppet will autorequiresensu_mutator
resource defined formutator
property.sensu_handler
- Puppet will autorequiresensu_handler
resources defined forhandlers
property.sensu_asset
- Puppet will autorequiresensu_asset
resources defined inruntime_assets
property.
sensu_handler { 'test':
ensure => 'present',
type => 'pipe',
command => 'notify.rb'
}
The following properties are available in the sensu_handler
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: pipe, tcp, udp, set
The handler type.
Valid values: /.*/, absent
An array of Sensu event filters (names) to use when filtering events for the handler.
Valid values: /.*/, absent
The Sensu event mutator (name) to use to mutate event data for the handler.
Valid values: /^[0-9]+$/, absent
The handler execution duration timeout in seconds (hard stop)
Valid values: /.*/, absent
The handler command to be executed.
Valid values: /.*/, absent
An array of environment variables to use with command execution.
The socket host address (IP or hostname) to connect to.
The socket port to connect to.
Valid values: /.*/, absent
An array of Sensu event handlers (names) to use for events using the handler set.
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
The Sensu RBAC namespace that this handler belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_handler
type.
namevar
The name of the handler.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
sensu_hook { 'test':
ensure => 'present',
command => 'ps aux',
}
The following properties are available in the sensu_hook
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The hook command to be executed.
The hook execution duration timeout in seconds (hard stop)
Default value: 60
Valid values: true
, false
If the Sensu agent writes JSON serialized Sensu entity and check data to the command process’ STDIN.
Default value: false
The Sensu RBAC namespace that this hook belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_hook
type.
namevar
The name of the hook.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Exec[sensu-add-license]
sensu_ldap_auth { 'openldap':
ensure => 'present',
servers => [
{
'host' => '127.0.0.1',
'port' => 389,
},
],
server_binding => {
'127.0.0.1' => {
'user_dn' => 'cn=binder,dc=acme,dc=org',
'password' => 'P@ssw0rd!'
}
},
server_group_search => {
'127.0.0.1' => {
'base_dn' => 'dc=acme,dc=org',
}
},
server_user_search => {
'127.0.0.1' => {
'base_dn' => 'dc=acme,dc=org',
}
},
}
The following properties are available in the sensu_ldap_auth
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
LDAP servers Defaults:
- insecure: false
- security: tls
- trusted_ca_file: ""
- client_cert_file: ""
- client_key_file: ""
LDAP server bindings
Search configuration for groups. Defaults:
- attribute: member
- name_attribute: cn
- object_class: groupOfNames
Search configuration for users. Defaults:
- attribute: uid
- name_attribute: cn
- object_class: person
The prefix added to all LDAP groups.
The prefix added to all LDAP usernames.
The following parameters are available in the sensu_ldap_auth
type.
namevar
The name of the LDAP auth.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_asset
- Puppet will autorequiresensu_asset
resources defined inruntime_assets
property.
sensu_mutator { 'example':
ensure => 'present',
command => 'example-mutator.rb',
}
The following properties are available in the sensu_mutator
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The mutator command to be executed.
Valid values: /^[0-9]+$/, absent
The mutator execution duration timeout in seconds (hard stop)
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
Valid values: /.*/, absent
An array of environment variables to use with command execution.
The Sensu RBAC namespace that this mutator belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_mutator
type.
namevar
The name of the mutator.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace { 'test':
ensure => 'present',
}
The following properties are available in the sensu_namespace
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the sensu_namespace
type.
namevar
The name of the namespace.
Autorequires:
Package[sensu-plugins-ruby]
sensu_plugin { 'disk-checks':
ensure => 'present',
}
sensu_plugin { 'disk-checks':
ensure => 'present',
version => '4.0.0',
}
sensu_plugin { 'disk-checks':
ensure => 'present',
version => 'latest',
}
The following properties are available in the sensu_plugin
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Valid values: latest, /[0-9.]+/
Specific version to install, or latest
The following parameters are available in the sensu_plugin
type.
namevar
Plugin or extension name
Valid values: true
, false
Sets to install an extension instead of a plugin
Default value: false
Install Sensu plugins and extensions from a custom SOURCE
Valid values: true
, false
Clean up (remove) other installed versions of the plugin(s) and/or extension(s)
Default value: true
Install Sensu plugins and extensions via a PROXY URL
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
sensu_role { 'test':
ensure => 'present',
rules => [{'verbs' => ['get','list'], 'resources' => ['checks'], 'resource_names' => ['']}],
}
The following properties are available in the sensu_role
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Namespace the role is restricted to.
Default value: default
The rulesets that a role applies.
The following parameters are available in the sensu_role
type.
namevar
The name of the role.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_role
- Puppet will autorequiresensu_role
resource defined inrole_ref
property.sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.sensu_user
- Puppet will autorequiresensu_user
resources based on users and groups defined for thesubjects
property.
sensu_role_binding { 'test':
ensure => 'present',
role_ref => 'test-role',
subjects => [
{ 'type' => 'User', 'name' => 'test-user' }
],
}
The following properties are available in the sensu_role_binding
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Namespace the role binding is restricted to.
Default value: default
References a role.
The users or groups being assigned.
The following parameters are available in the sensu_role_binding
type.
namevar
The name of the role binding.
The name of a sensu_silenced
resource may not match the name returned by sensuctl.
The name from sensuctl will take the form of subscription:check
.
If you wish to have a sensu_silenced
resource name match sensuctl then define the name
using the subscription:check
format and do not define subscription
or check
properties.
The subscription
and check
properties take precedence over value in the name if name takes the form subscription:check
.
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
sensu_silenced { 'test':
ensure => 'present',
subscription => 'entity:sensu_agent',
}
sensu_silenced { 'entity:sensu_agent:*':
ensure => 'present',
}
sensu_silenced { 'linux:check-http':
ensure => 'present',
}
Define silencing where subscription is linux and check is check-http. The subscription
property overrides the value from name.
sensu_silenced { 'test:check-http':
ensure => 'present',
subscription => 'linux',
}
Define silencing where subscription is linux and check is test. The check
property overrides the value from name.
sensu_silenced { 'linux:check-http':
ensure => 'present',
check => 'test',
}
The following properties are available in the sensu_silenced
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Time at which silence entry goes into effect, in epoch.
Number of seconds until this entry should be deleted.
Default value: -1
Valid values: true
, false
If the entry should be deleted when a check begins return OK status (resolves).
Default value: false
Valid values: /.*/, absent
Person/application/entity responsible for creating the entry.
Valid values: /.*/, absent
Explanation for the creation of this entry.
The Sensu RBAC namespace that this silenced belongs to.
Default value: default
Custom attributes to include with event data, which can be queried like regular attributes.
Arbitrary, non-identifying metadata to include with event data.
The following parameters are available in the sensu_silenced
type.
namevar
Silenced name
The name of the check the entry should match
The name of the subscription the entry should match
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
sensu_user { 'test':
ensure => 'present',
password => 'supersecret',
groups => ['users'],
}
sensu_user { 'test'
ensure => 'present',
password => 'newpassword',
old_password => 'supersecret',
groups => ['users'],
}
The following properties are available in the sensu_user
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The user's password.
Groups to which the user belongs.
Valid values: true
, false
The state of the user’s account.
Default value: false
The following parameters are available in the sensu_user
type.
namevar
The name of the user.
The user's old password, needed in order to change a user's password
Valid values: true
, false
Run sensuctl configure for this user
Default value: false
URL to use with 'sensuctl configure'
Default value: http://127.0.0.1:8080