Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >= 5.0.0 < 7.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'sensu-sensu', '3.4.1'
Learn more about managing modules with a PuppetfileDocumentation
Sensu-Puppet
Table of Contents
- Module Description
- Setup - The basics of getting started with sensu
- Usage - Configuration options and additional functionality
- Reference
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- License
Module description
Installs and manages Sensu, the open source monitoring framework.
Please note, that this is a Partner Supported module, which means that technical customer support for this module is solely provided by Sensu. Puppet does not provide support for any Partner Supported modules. Technical support for this module is provided by Sensu at https://sensuapp.org/support.
Documented with Puppet Strings
Compatibility - supported sensu versions
If not explicitly stated it should always support the latest Sensu release. Please log an issue if you identify any incompatibilities.
Sensu Go Version | Recommended Puppet Module Version |
---|---|
5.x | latest v3 |
Upgrade note
Sensu Go 5.x is a rewrite of Sensu and no longer depends on redis and rabbitmq. Version 3 of this module supports Sensu Go 5.x.
Users wishing to use the old v2 Puppet module to support previous Ruby based Sensu should use sensu/sensuclassic.
Setup
What sensu effects
This module will install packages, create configuration and start services necessary to manage Sensu agents and backend.
Setup requirements
Plugin sync is required if the custom sensu types and providers are used.
This module has a soft dependency on the puppetlabs/apt module (>= 5.0.1 < 7.0.0
) for systems using apt
.
If using Puppet >= 6.0.0 there is a soft dependency on the puppetlabs/yumrepo_core module (>= 1.0.1 < 2.0.0
) for systems using yum
.
If managing Windows there is a soft dependency on the puppet/archive module (>= 3.0.0 < 4.0.0
).
Beginning with sensu
This module provides Vagrant definitions that can be used to get started with Sensu.
vagrant up sensu-backend
vagrant ssh sensu-backend
Beginning with a Sensu cluster
Multiple Vagrant boxes are available for testing a sensu-backend cluster.
vagrant up sensu-backend-peer1 sensu-backend-peer2
vagrant provision sensu-backend-peer1 sensu-backend-peer2
Usage
Basic Sensu backend
The following example will configure sensu-backend, sensu-agent on backend and add a check.
By default this module will configure the backend to use Puppet's SSL certificate and CA.
It's advisable to not rely on the default password. Changing the password requires providing the previous password via old_password
.
class { 'sensu::backend':
password => 'supersecret',
old_password => 'P@ssw0rd!',
}
include sensu::agent
sensu_check { 'check-cpu':
ensure => 'present',
command => 'check-cpu.sh -w 75 -c 90',
interval => 60,
subscriptions => ['linux'],
}
Basic Sensu agent
The following example will manage resources necessary to configure a sensu-agent to communicate with a sensu-backend and
associated to linux
and apache-servers
subscriptions.
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions' => ['linux', 'apache-servers'],
},
}
Manage Windows Agent
This module supports Windows Sensu Go agent starting with version 5.7.0.
The Windows package source must be specified as either a URL, a Puppet source or a filesystem path.
Install sensu-go-agent on Windows from URL:
class { 'sensu::agent':
package_source => 'https://s3-us-west-2.amazonaws.com/sensu.io/sensu-go/5.7.0/sensu-go-agent_5.7.0.2380_en-US.x64.msi',
}
Install sensu-go-agent on Windows from Puppet source:
class { 'sensu::agent':
package_source => 'puppet:///modules/profile/sensu/sensu-go-agent.msi',
}
If a system already has the necessary MSI present it can be installed without downloading from an URL:
class { 'sensu::agent':
package_source => 'C:\Temp\sensu-go-agent.msi',
}
Advanced agent
If you wish to change the agent
password you must provide the new and old password.
It's advisable to set show_diff
to false
to avoid exposing the agent password.
class { 'sensu::backend':
agent_password => 'supersecret',
agent_old_password => 'P@ssw0rd!',
}
class { 'sensu::agent':
config_hash => {
'password' => 'supersecret',
},
show_diff => false,
}
Advanced SSL
By default this module uses Puppet's SSL certificates and CA.
If you would prefer to use different certificates override the ssl_ca_source
, ssl_cert_source
and ssl_key_source
parameters.
The value for url_host
must be valid for the provided certificate and the value used for agent's backends
must also match the certificate used by the specified backend.
If the certificates and keys are already installed then define the source parameters as filesystem paths.
class { 'sensu':
ssl_ca_source => 'puppet:///modules/profile/sensu/ca.pem',
}
class { 'sensu::backend':
url_host => 'sensu-backend.example.com',
ssl_cert_source => 'puppet:///modules/profile/sensu/cert.pem',
ssl_key_source => 'puppet:///modules/profile/sensu/key.pem',
}
class { 'sensu':
ssl_ca_source => 'puppet:///modules/profile/sensu/ca.pem',
}
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions' => ['linux', 'apache-servers'],
},
}
To disable SSL support:
class { 'sensu':
use_ssl => false,
}
Enterprise Support
In order to activate enterprise support the license file needs to be added:
class { 'sensu::backend':
license_source => 'puppet:///modules/profile/sensu/license.json',
}
The type sensu_ldap_auth
requires a valid enterprise license.
Installing Plugins
Plugin management is handled by the sensu::plugins
class.
Example installing plugins on agent:
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions' => ['linux', 'apache-servers'],
},
}
class { 'sensu::plugins':
plugins => ['disk-checks'],
}
The plugins
parameter can also be a Hash that sets the version:
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions' => ['linux', 'apache-servers'],
},
}
class { 'sensu::plugins':
plugins => {
'disk-checks' => { 'version' => 'latest' },
},
}
Set dependencies
to an empty Array to disable the sensu::plugins
dependency management.
class { 'sensu::plugins':
dependencies => [],
}
You can uninstall plugins by passing ensure
as absent
.
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions' => ['linux', 'apache-servers'],
},
}
class { 'sensu::plugins':
plugins => {
'disk-checks' => { 'ensure' => 'absent' },
},
}
Installing Extensions
Extension management is handled by the sensu::plugins
class.
Example installing extension on backend:
class { 'sensu::backend':
password => 'supersecret',
old_password => 'P@ssw0rd!',
}
class { 'sensu::plugins':
extensions => ['graphite'],
}
The extensions
parameter can also be a Hash that sets the version:
class { 'sensu::backend':
password => 'supersecret',
old_password => 'P@ssw0rd!',
}
class { 'sensu::plugins':
extensions => {
'graphite' => { 'version' => 'latest' },
},
}
You can uninstall extensions by passing ensure
as absent
.
class { 'sensu::backend':
password => 'supersecret',
old_password => 'P@ssw0rd!',
}
class { 'sensu::plugins':
extensions => {
'graphite' => { 'ensure' => 'absent' },
},
}
Exported resources
One possible approach to defining checks is having agents export their checks to the sensu-backend using Exported Resources.
The following example would be defined for agents:
@@sensu_check { 'check-cpu':
ensure => 'present',
command => 'check-cpu.sh -w 75 -c 90',
interval => 60,
subscriptions => ['linux'],
}
The backend system would collect all sensu_check
resources.
Sensu_check <<||>>
Hiera resources
All the types provided by this module can have their resources defined via Hiera. A type such as sensu_check
would be defined via sensu::backend::checks
.
The following example adds an asset, filter, handler and checks via Hiera:
sensu::backend::assets:
sensu-email-handler:
ensure: present
url: 'https://github.com/sensu/sensu-email-handler/releases/download/0.1.0/sensu-email-handler_0.1.0_linux_amd64.tar.gz'
sha512: '755c7a673d94997ab9613ec5969666e808f8b4a8eec1ba998ee7071606c96946ca2947de5189b24ac34a962713d156619453ff7ea43c95dae62bf0fcbe766f2e'
filters:
- "entity.system.os == 'linux'"
- "entity.system.arch == 'amd64'"
sensu::backend::filters:
hourly:
ensure: present
action: allow
expressions:
- 'event.check.occurrences == 1 || event.check.occurrences % (3600 / event.check.interval) == 0'
sensu::backend::handlers:
email:
ensure: present
type: pipe
command: "sensu-email-handler -f root@localhost -t user@example.com -s localhost -i"
timeout: 10
runtime_assets:
- sensu-email-handler
filters:
- is_incident
- not_silenced
- hourly
sensu::backend::checks:
check-cpu:
ensure: present
command: check-cpu.sh -w 75 -c 90
interval: 60
subscriptions:
- linux
handlers:
- email
publish: true
check-disks:
ensure: present
command: "/opt/sensu-plugins-ruby/embedded/bin/check-disk-usage.rb -t '(xfs|ext4)'"
subscriptions:
- linux
handlers:
- email
interval: 1800
publish: true
Resource purging
All the types provided by this module support purging except sensu_config
.
At this time sensu_asset
can not be purged, see Limitations.
This example will remove all unmanaged Sensu checks:
resources { 'sensu_check':
purge => true,
}
Sensu backend cluster
A sensu-backend
cluster can be defined for fresh installs by defining the necessary config_hash
values.
The following examples are using Hiera and assume the sensu::backend
class is included.
# data/fqdn/sensu-backend1.example.com.yaml
---
sensu::backend::config_hash:
etcd-advertise-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-peer-urls: 'http://0.0.0.0:2380'
etcd-initial-cluster: 'backend1=http://192.168.0.1:2380,backend2=http://192.168.0.2:2380'
etcd-initial-advertise-peer-urls: "http://%{facts.ipaddress}:2380"
etcd-initial-cluster-state: 'new'
etcd-initial-cluster-token: ''
etcd-name: 'backend1'
# data/fqdn/sensu-backend2.example.com.yaml
---
sensu::backend::config_hash:
etcd-advertise-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-peer-urls: 'http://0.0.0.0:2380'
etcd-initial-cluster: 'backend1=http://192.168.0.1:2380,backend2=http://192.168.0.2:2380'
etcd-initial-advertise-peer-urls: "http://%{facts.ipaddress}:2380"
etcd-initial-cluster-state: 'new'
etcd-initial-cluster-token: ''
etcd-name: 'backend2'
Adding backend members to an existing cluster
Adding new members to an existing cluster requires two steps.
First, add the member to the catalog on one of the existing cluster backends with the sensu_cluster_member
type.
sensu_cluster_member { 'backend3':
peer_urls => ['http://192.168.0.3:2380'],
}
Second, configure and start sensu-backend
to interact with the existing cluster.
The output from Puppet when a new sensu_cluster_member
is applied will print some of the values needed.
# data/fqdn/sensu-backend3.example.com.yaml
---
sensu::backend::config_hash:
etcd-advertise-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-client-urls: "http://%{facts.ipaddress}:2379"
etcd-listen-peer-urls: 'http://0.0.0.0:2380'
etcd-initial-cluster: 'backend1=http://192.168.0.1:2380,backend2=http://192.168.0.2:2380,backend3=http://192.168.0.3:2380'
etcd-initial-advertise-peer-urls: "http://%{facts.ipaddress}:2380"
etcd-initial-cluster-state: 'existing'
etcd-initial-cluster-token: ''
etcd-name: 'backend3'
The first step will not fully add the node to the cluster until the second step is performed.
Large Environment Considerations
If the backend system has a large number of resources it may be necessary to query resources using chunk size added in Sensu Go 5.8.
class { '::sensu::backend':
sensuctl_chunk_size => 100,
}
Reference
Facts
sensu_agent
The sensu_agent
fact returns the Sensu agent version information by the sensu-agent
binary.
facter -p sensu_agent
{
version => "5.1.0",
build => "b2ea9fcdb21e236e6e9a7de12225a6d90c786c57",
built => "2018-12-18T21:31:11+0000"
}
sensu_backend
The sensu_backend
fact returns the Sensu backend version information by the sensu-backend
binary.
facter -p sensu_backend
{
version => "5.1.0",
build => "b2ea9fcdb21e236e6e9a7de12225a6d90c786c57",
built => "2018-12-18T21:31:11+0000"
}
sensuctl
The sensuctl
fact returns the sensuctl version information by the sensuctl
binary.
facter -p sensuctl
{
version => "5.1.0",
build => "b2ea9fcdb21e236e6e9a7de12225a6d90c786c57",
built => "2018-12-18T21:31:11+0000"
}
Limitations
The Sensu v2 support is designed so that all resources managed by sensuctl
are defined on the sensu-backend
host.
This module does not support adding sensuctl
resources on a host other than the sensu-backend
host.
The type sensu_asset
does not at this time support ensure => absent
due to a limitation with sensuctl, see sensu-go#988.
The type sensu_user
does not at this time support ensure => absent
due to a limitation with sensuctl, see sensu-go#2540.
Notes regarding support
This module is built for use with Puppet versions 5 and 6 and the ruby
versions associated with those releases. See .travis.yml
for an exact
matrix of Puppet releases and ruby versions.
This module targets the latest release of the current major Puppet version and the previous major version. Platform support will be removed when a platform is no longer supported by Puppet, Sensu or the platform maintainer has signaled that it is end of life (EOL).
Though Amazon does not announce end of life (EOL) for its releases, it does encourage you to use the latest releases. This module will support the current release and the previous release. Since AWS does not release Vagrant boxes and the intent of those platforms is to run in AWS, we will not maintain Vagrant systems for local development for Amazon Linux.
Supported Platforms
- EL 6
- EL 7
- Debian 8
- Debian 9
- Ubuntu 16.04 LTS
- Ubuntu 18.04 LTS
- Amazon 2018.03
- Amazon 2
Development
See CONTRIBUTING.md
License
See LICENSE file.
Reference
Table of Contents
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 userssensuctl_config
: Abstract type to configure other types
Data types
Sensu::Backend_URL
: Sensu Backend URL's require protocol of ws:// or wss://. A port is also required. There is logic in sensu::agent class to add the protocol so
Classes
sensu
This is the main Sensu class
Parameters
The following parameters are available in the sensu
class.
version
Data type: String
Version of Sensu to install. Defaults to installed
to support
Windows MSI packaging and to avoid surprising upgrades.
Default value: 'installed'
etc_dir
Data type: Stdlib::Absolutepath
Absolute path to the Sensu etc directory.
Default value: '/etc/sensu'
ssl_dir
Data type: Stdlib::Absolutepath
Absolute path to the Sensu ssl directory.
Default value: '/etc/sensu/ssl'
user
Data type: String
User used by sensu services
Default value: 'sensu'
group
Data type: String
User group used by sensu services
Default value: 'sensu'
etc_dir_purge
Data type: Boolean
Boolean to determine if the etc_dir should be purged such that only Puppet managed files are present.
Default value: true
ssl_dir_purge
Data type: Boolean
Boolean to determine if the ssl_dir should be purged such that only Puppet managed files are present.
Default value: true
manage_repo
Data type: Boolean
Boolean to determine if software repository for Sensu should be managed.
Default value: true
use_ssl
Data type: Boolean
Sensu backend service uses SSL
Default value: true
ssl_ca_source
Data type: Optional[String]
Source of SSL CA used by sensu services
Default value: $facts['puppet_localcacert']
sensu::agent
Class to manage the Sensu agent.
Examples
class { 'sensu::agent':
backends => ['sensu-backend.example.com:8081'],
config_hash => {
'subscriptions => ['linux', 'apache-servers'],
},
}
Parameters
The following parameters are available in the sensu::agent
class.
version
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
package_source
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
package_download_path
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
package_name
Data type: String
Name of Sensu agent package.
Default value: 'sensu-go-agent'
service_name
Data type: String
Name of the Sensu agent service.
Default value: 'sensu-agent'
service_ensure
Data type: String
Sensu agent service ensure value.
Default value: 'running'
service_enable
Data type: Boolean
Sensu agent service enable value.
Default value: true
config_hash
Data type: Hash
Sensu agent configuration hash used to define agent.yml.
Default value: {}
backends
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']
show_diff
Data type: Boolean
Sets show_diff parameter for agent.yml configuration file
Default value: true
log_file
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
sensu::backend
Class to manage the Sensu backend.
Examples
class { 'sensu::backend':
password => 'secret',
}
Parameters
The following parameters are available in the sensu::backend
class.
version
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
package_name
Data type: String
Name of Sensu backend package.
Default value: 'sensu-go-backend'
cli_package_name
Data type: String
Name of Sensu CLI package.
Default value: 'sensu-go-cli'
service_name
Data type: String
Name of the Sensu backend service.
Default value: 'sensu-backend'
service_ensure
Data type: String
Sensu backend service ensure value.
Default value: 'running'
service_enable
Data type: Boolean
Sensu backend service enable value.
Default value: true
state_dir
Data type: Stdlib::Absolutepath
Sensu backend state directory path.
Default value: '/var/lib/sensu/sensu-backend'
config_hash
Data type: Hash
Sensu backend configuration hash used to define backend.yml.
Default value: {}
url_host
Data type: String
Sensu backend host used to configure sensuctl and verify API access.
Default value: $trusted['certname']
url_port
Data type: Stdlib::Port
Sensu backend port used to configure sensuctl and verify API access.
Default value: 8080
ssl_cert_source
Data type: Optional[String]
The SSL certificate source
Default value: $facts['puppet_hostcert']
ssl_key_source
Data type: Optional[String]
The SSL private key source
Default value: $facts['puppet_hostprivkey']
password
Data type: String
Sensu backend admin password used to confiure sensuctl.
Default value: 'P@ssw0rd!'
old_password
Data type: Optional[String]
Sensu backend admin old password needed when changing password.
Default value: undef
agent_password
Data type: String
The sensu agent password
Default value: 'P@ssw0rd!'
agent_old_password
Data type: Optional[String]
The sensu agent old password needed when changing agent_password
Default value: undef
include_default_resources
Data type: Boolean
Sets if default sensu resources should be included
Default value: true
show_diff
Data type: Boolean
Sets show_diff parameter for backend.yml configuration file
Default value: true
license_source
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
license_content
Data type: Optional[String]
The content of sensu-go enterprise license Do not define with license_source
Default value: undef
manage_tessen
Data type: Boolean
Boolean that determines if Tessen is managed
Default value: true
tessen_ensure
Data type: Enum['present','absent']
Determine if Tessen is opt-in (present) or opt-out (absent)
Default value: 'present'
ad_auths
Data type: Hash
Hash of sensu_ad_auth resources
Default value: {}
assets
Data type: Hash
Hash of sensu_asset resources
Default value: {}
checks
Data type: Hash
Hash of sensu_check resources
Default value: {}
cluster_members
Data type: Hash
Hash of sensu_cluster_member resources
Default value: {}
cluster_role_bindings
Data type: Hash
Hash of sensu_cluster_role_binding resources
Default value: {}
cluster_roles
Data type: Hash
Hash of sensu_cluster_role resources
Default value: {}
configs
Data type: Hash
Hash of sensu_config resources
Default value: {}
entities
Data type: Hash
Hash of sensu_entitie resources
Default value: {}
events
Data type: Hash
Hash of sensu_event resources
Default value: {}
filters
Data type: Hash
Hash of sensu_filter resources
Default value: {}
handlers
Data type: Hash
Hash of sensu_handler resources
Default value: {}
hooks
Data type: Hash
Hash of sensu_hook resources
Default value: {}
ldap_auths
Data type: Hash
Hash of sensu_ldap_auth resources
Default value: {}
mutators
Data type: Hash
Hash of sensu_mutator resources
Default value: {}
namespaces
Data type: Hash
Hash of sensu_namespace resources
Default value: {}
role_bindings
Data type: Hash
Hash of sensu_role_binding resources
Default value: {}
roles
Data type: Hash
Hash of sensu_role resources
Default value: {}
silencings
Data type: Hash
Hash of sensu_silenced resources
Default value: {}
users
Data type: Hash
Hash of sensu_user resources
Default value: {}
sensuctl_chunk_size
Data type: Optional[Integer]
Chunk size to use when listing sensuctl resources
Default value: undef
sensu::plugins
Class to manage the Sensu plugins.
Examples
class { 'sensu::plugins':
plugins => ['disk-checks'],
extensions => ['graphite'],
}
class { 'sensu::plugins':
plugins => {
'disk-checks' => { 'version' => 'latest' },
},
extensions => {
'graphite' => { 'version' => 'latest' },
},
}
Parameters
The following parameters are available in the sensu::plugins
class.
manage_repo
Data type: Optional[Boolean]
Determines if plugin repo should be managed.
Defaults to value for sensu::manage_repo
.
Default value: undef
package_ensure
Data type: String
Ensure property for sensu plugins package.
Default value: 'installed'
package_name
Data type: String
Name of the Sensu plugins ruby package.
Default value: 'sensu-plugins-ruby'
dependencies
Data type: Array
Package dependencies needed to install plugins and extensions. Default is OS dependent.
Default value: []
plugins
Data type: Variant[Array, Hash]
Plugins to install
Default value: []
extensions
Data type: Variant[Array, Hash]
Extensions to install
Default value: []
Resource types
sensu_ad_auth
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Exec[sensu-add-license]
Examples
Add an Active Directory auth
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',
}
},
}
Properties
The following properties are available in the sensu_ad_auth
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
servers
AD servers Defaults:
- insecure: false
- security: tls
- trusted_ca_file: ""
- client_cert_file: ""
- client_key_file: ""
server_binding
AD server bindings
server_group_search
Search configuration for groups. Defaults:
- attribute: member
- name_attribute: cn
- object_class: group
server_user_search
Search configuration for users. Defaults:
- attribute: sAMAccountName
- name_attribute: displayName
- object_class: person
groups_prefix
The prefix added to all AD groups.
username_prefix
The prefix added to all AD usernames.
Parameters
The following parameters are available in the sensu_ad_auth
type.
name
namevar
The name of the AD auth.
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 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.
Examples
Verify API connectivity to localhost:8080
sensu_api_validator { 'sensu':
sensu_api_server => 'localhost',
sensu_api_ort => 8080,
}
Properties
The following properties are available in the sensu_api_validator
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the sensu_api_validator
type.
name
namevar
An arbitrary name used as the identity of the resource.
sensu_api_server
The DNS name or IP address of the server where sensu_api should be running.
Default value: localhost
sensu_api_port
The port that the sensu_api server should be listening on.
Default value: 8080
use_ssl
Whether the connection will be attemped using https
Default value: false
test_url
URL to use for testing if the Sensu backend is up
Default value: /health
timeout
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
sensu_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.
Examples
Create an asset
sensu_asset { 'test':
ensure => 'present',
url => 'http://example.com/asset/example.tar',
sha512 => '4f926bf4328fbad2b9cac873d117f771914f4b837c9c85584c38ccf55a3ef3c2e8d154812246e5dda4a87450576b2c58ad9ab40c9e2edc31b288d066b195b21b',
filters => ["entity.system.os == 'linux'"],
}
Properties
The following properties are available in the sensu_asset
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
url
The URL location of the asset.
sha512
The checksum of the asset
filters
Valid values: /.*/, absent
A set of filters used by the agent to determine of the asset should be installed.
headers
HTTP headers to appy to asset retrieval requests.
namespace
The Sensu RBAC namespace that this asset belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_asset
type.
name
namevar
The name of the asset.
sensu_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_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.
Examples
Create a check
sensu_check { 'test':
ensure => 'present',
command => 'check-http.rb',
subscriptions => ['demo'],
handlers => ['email'],
interval => 60,
}
Create a check that has a hook
sensu_check { 'test':
ensure => 'present',
command => 'check-cpu.sh -w 75 -c 90',
subscriptions => ['linux'],
check_hooks => [
{ 'critical' => ['ps'] },
{ 'warning' => ['ps'] },
],
interval => 60,
}
Properties
The following properties are available in the sensu_check
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
command
The check command to be executed.
subscriptions
An array of Sensu entity subscriptions that check requests will be sent to.
handlers
An array of Sensu event handlers (names) to use for events created by the check.
interval
Valid values: /^[0-9]+$/, absent
The frequency in seconds the check is executed.
cron
Valid values: /.*/, absent
When the check should be executed, using the Cron syntax.
publish
Valid values: true
, false
If check requests are published for the check.
Default value: true
timeout
Valid values: /^[0-9]+$/, absent
The check execution duration timeout in seconds (hard stop).
ttl
Valid values: /^[0-9]+$/, absent
The time to live (TTL) in seconds until check results are considered stale.
stdin
Valid values: true
, false
If the Sensu agent writes JSON serialized Sensu entity and check data to the command process' STDIN
Default value: false
low_flap_threshold
Valid values: /^[0-9]+$/, absent
The flap detection low threshold (% state change) for the check
high_flap_threshold
Valid values: /^[0-9]+$/, absent
The flap detection high threshold (% state change) for the check
runtime_assets
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
check_hooks
An array of check response types with respective arrays of Sensu hook names.
proxy_entity_name
Valid values: /^[\w.-]+$/, absent
The entity name, used to create a proxy entity for an external resource (i.e., a network switch).
round_robin
Valid values: true
, false
If the check should be executed on a single entity within a subscription in a round-robin fashion.
proxy_requests_entity_attributes
Sensu entity attributes to match entities in the registry, using Sensu Query Expressions
proxy_requests_splay
Valid values: true
, false
If proxy check requests should be splayed
proxy_requests_splay_coverage
The splay coverage percentage use for proxy check request splay calculation.
silenced
Valid values: true
, false
If the event is to be silenced.
env_vars
Valid values: /.*/, absent
An array of environment variables to use with command execution.
output_metric_format
Valid values: nagios_perfdata, graphite_plaintext, influxdb_line, opentsdb_line, absent
The metric format generated by the check command.
output_metric_handlers
Valid values: /.*/, absent
An array of Sensu handlers to use for events created by the check.
max_output_size
Maximum size, in bytes, of stored check outputs.
discard_output
Valid values: true
, false
Discard check output after extracting metrics.
namespace
The Sensu RBAC namespace that this check belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_check
type.
name
namevar
The name of the check.
sensu_cluster_member
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Examples
Add a cluster member
sensu_cluster_member { 'backend2':
ensure => 'present',
peer_urls => ['http://192.168.52.12:2380'],
}
Properties
The following properties are available in the sensu_cluster_member
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
peer_urls
Array of cluster peer URLs
Parameters
The following parameters are available in the sensu_cluster_member
type.
name
namevar
The name of the cluster member.
id
Cluster member ID - read-only
sensu_cluster_role
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Examples
Add a cluster role
sensu_cluster_role { 'test':
ensure => 'present',
rules => [{'verbs' => ['get','list'], 'resources' => ['checks'], 'resource_names' => ['']}],
}
Properties
The following properties are available in the sensu_cluster_role
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
rules
The rulesets that a role applies.
Parameters
The following parameters are available in the sensu_cluster_role
type.
name
namevar
The name of the role.
sensu_cluster_role_binding
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.
Examples
Add a cluster role binding
sensu_cluster_role_binding { 'test':
ensure => 'present',
role_ref => 'test-role',
subjects => [
{ 'type' => 'User', 'name' => 'test-user' }
],
}
Properties
The following properties are available in the sensu_cluster_role_binding
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
role_ref
References a cluster role.
subjects
The users or groups being assigned.
Parameters
The following parameters are available in the sensu_cluster_role_binding
type.
name
namevar
The name of the role binding.
sensu_config
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Examples
Manage a config
sensu_config { 'format':
value => 'json',
}
Properties
The following properties are available in the sensu_config
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
value
The value of the config.
Parameters
The following parameters are available in the sensu_config
type.
name
namevar
The name of the config.
sensu_configure
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_api_validator[sensu]
file
- Puppet will autorequirefile
resources defined intrusted_ca_file
property.
Properties
The following properties are available in the sensu_configure
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
url
sensu-backend URL
trusted_ca_file
Path to trusted CA
Default value: /etc/sensu/ssl/ca.crt
Parameters
The following parameters are available in the sensu_configure
type.
name
namevar
The name of the resource.
username
Username to use with sensuctl configure
password
Password to use with sensuctl configure
bootstrap_password
Password to use when bootstrapping sensuctl
Default value: P@ssw0rd!
sensu_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_handler
- Puppet will autorequiesensu_handler
resource defined inderegistration_handler
property.
Examples
Create an entity
sensu_entity { 'test':
ensure => 'present',
entity_class => 'proxy',
}
Properties
The following properties are available in the sensu_entity
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
entity_class
The entity type
subscriptions
A list of subscription names for the entity
system
System information about the entity, such as operating system and platform.
last_seen
Timestamp the entity was last seen, in epoch time.
deregister
Valid values: true
, false
If the entity should be removed when it stops sending keepalive messages.
Default value: false
deregistration_handler
The name of the handler to be called when an entity is deregistered.
redact
List of items to redact from log messages.
namespace
The Sensu RBAC namespace that this entity belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_entity
type.
name
namevar
The unique name of the entity
sensu_event
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.
Examples
Resolve an event
sensu_event { 'test for sensu-agent':
ensure => 'resolve'
}
Delete an event
sensu_event { 'test for sensu-agent':
ensure => 'absent'
}
Properties
The following properties are available in the sensu_event
type.
ensure
Valid values: present, resolve, absent, delete
Aliases: "delete"=>"absent"
The basic property that the resource should be in.
Parameters
The following parameters are available in the sensu_event
type.
name
namevar
Event name. Can take form of ' for '.
entity
The name of the entity the event should match
check
The name of the check the event should match
namespace
The Sensu RBAC namespace that this event belongs to.
Default value: default
sensu_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_asset
- Puppet will autorequiresensu_asset
resources defined inruntime_assets
property.
Examples
Create a filter
sensu_filter { 'test':
ensure => 'present',
action => 'allow',
expressions => ["event.entity.labels.environment == 'production'"],
}
Properties
The following properties are available in the sensu_filter
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
action
Valid values: allow, deny
Action to take with the event if the filter expressions match.
expressions
Filter expressions to be compared with event data.
runtime_assets
Valid values: /.*/, absent
Assets to be applied to the filter’s execution context.
namespace
The Sensu RBAC namespace that this filter belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_filter
type.
name
namevar
The name of the filter.
sensu_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_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.
Examples
Create a handler
sensu_handler { 'test':
ensure => 'present',
type => 'pipe',
command => 'notify.rb'
}
Properties
The following properties are available in the sensu_handler
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
type
Valid values: pipe, tcp, udp, set
The handler type.
filters
Valid values: /.*/, absent
An array of Sensu event filters (names) to use when filtering events for the handler.
mutator
Valid values: /.*/, absent
The Sensu event mutator (name) to use to mutate event data for the handler.
timeout
Valid values: /^[0-9]+$/, absent
The handler execution duration timeout in seconds (hard stop)
command
Valid values: /.*/, absent
The handler command to be executed.
env_vars
Valid values: /.*/, absent
An array of environment variables to use with command execution.
socket_host
The socket host address (IP or hostname) to connect to.
socket_port
The socket port to connect to.
handlers
Valid values: /.*/, absent
An array of Sensu event handlers (names) to use for events using the handler set.
runtime_assets
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
namespace
The Sensu RBAC namespace that this handler belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_handler
type.
name
namevar
The name of the handler.
sensu_hook
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.
Examples
Create a hook
sensu_hook { 'test':
ensure => 'present',
command => 'ps aux',
}
Properties
The following properties are available in the sensu_hook
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
command
The hook command to be executed.
timeout
The hook execution duration timeout in seconds (hard stop)
Default value: 60
stdin
Valid values: true
, false
If the Sensu agent writes JSON serialized Sensu entity and check data to the command process’ STDIN.
Default value: false
namespace
The Sensu RBAC namespace that this hook belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_hook
type.
name
namevar
The name of the hook.
sensu_ldap_auth
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Exec[sensu-add-license]
Examples
Add a LDAP auth
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',
}
},
}
Properties
The following properties are available in the sensu_ldap_auth
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
servers
LDAP servers Defaults:
- insecure: false
- security: tls
- trusted_ca_file: ""
- client_cert_file: ""
- client_key_file: ""
server_binding
LDAP server bindings
server_group_search
Search configuration for groups. Defaults:
- attribute: member
- name_attribute: cn
- object_class: groupOfNames
server_user_search
Search configuration for users. Defaults:
- attribute: uid
- name_attribute: cn
- object_class: person
groups_prefix
The prefix added to all LDAP groups.
username_prefix
The prefix added to all LDAP usernames.
Parameters
The following parameters are available in the sensu_ldap_auth
type.
name
namevar
The name of the LDAP auth.
sensu_mutator
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.
Examples
Create a mutator
sensu_mutator { 'example':
ensure => 'present',
command => 'example-mutator.rb',
}
Properties
The following properties are available in the sensu_mutator
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
command
The mutator command to be executed.
timeout
Valid values: /^[0-9]+$/, absent
The mutator execution duration timeout in seconds (hard stop)
runtime_assets
Valid values: /.*/, absent
An array of Sensu assets (names), required at runtime for the execution of the command
env_vars
Valid values: /.*/, absent
An array of environment variables to use with command execution.
namespace
The Sensu RBAC namespace that this mutator belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_mutator
type.
name
namevar
The name of the mutator.
sensu_namespace
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Examples
Add an namespace
sensu_namespace { 'test':
ensure => 'present',
}
Properties
The following properties are available in the sensu_namespace
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the sensu_namespace
type.
name
namevar
The name of the namespace.
sensu_plugin
Autorequires:
Package[sensu-plugins-ruby]
Examples
Install a sensu plugin
sensu_plugin { 'disk-checks':
ensure => 'present',
}
Install specific version of a sensu plugin
sensu_plugin { 'disk-checks':
ensure => 'present',
version => '4.0.0',
}
Install latest version of a sensu plugin
sensu_plugin { 'disk-checks':
ensure => 'present',
version => 'latest',
}
Properties
The following properties are available in the sensu_plugin
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
version
Valid values: latest, /[0-9.]+/
Specific version to install, or latest
Parameters
The following parameters are available in the sensu_plugin
type.
name
namevar
Plugin or extension name
extension
Valid values: true
, false
Sets to install an extension instead of a plugin
Default value: false
source
Install Sensu plugins and extensions from a custom SOURCE
clean
Valid values: true
, false
Clean up (remove) other installed versions of the plugin(s) and/or extension(s)
Default value: true
proxy
Install Sensu plugins and extensions via a PROXY URL
sensu_role
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.
Examples
Add a role
sensu_role { 'test':
ensure => 'present',
rules => [{'verbs' => ['get','list'], 'resources' => ['checks'], 'resource_names' => ['']}],
}
Properties
The following properties are available in the sensu_role
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
namespace
Namespace the role is restricted to.
Default value: default
rules
The rulesets that a role applies.
Parameters
The following parameters are available in the sensu_role
type.
name
namevar
The name of the role.
sensu_role_binding
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.
Examples
Add a role binding
sensu_role_binding { 'test':
ensure => 'present',
role_ref => 'test-role',
subjects => [
{ 'type' => 'User', 'name' => 'test-user' }
],
}
Properties
The following properties are available in the sensu_role_binding
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
namespace
Namespace the role binding is restricted to.
Default value: default
role_ref
References a role.
subjects
The users or groups being assigned.
Parameters
The following parameters are available in the sensu_role_binding
type.
name
namevar
The name of the role binding.
sensu_silenced
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.
Examples
Create a silencing for all checks with subscription entity:sensu_agent
sensu_silenced { 'test':
ensure => 'present',
subscription => 'entity:sensu_agent',
}
Define silencing using composite name where subscription=entity:sensu_agent
and check=*
.
sensu_silenced { 'entity:sensu_agent:*':
ensure => 'present',
}
Define silencing using composite name where subscription=linux
and check=check-http
.
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',
}
Properties
The following properties are available in the sensu_silenced
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
begin
Time at which silence entry goes into effect, in epoch.
expire
Number of seconds until this entry should be deleted.
Default value: -1
expire_on_resolve
Valid values: true
, false
If the entry should be deleted when a check begins return OK status (resolves).
Default value: false
creator
Valid values: /.*/, absent
Person/application/entity responsible for creating the entry.
reason
Valid values: /.*/, absent
Explanation for the creation of this entry.
namespace
The Sensu RBAC namespace that this silenced belongs to.
Default value: default
labels
Custom attributes to include with event data, which can be queried like regular attributes.
annotations
Arbitrary, non-identifying metadata to include with event data.
Parameters
The following parameters are available in the sensu_silenced
type.
name
namevar
Silenced name
check
The name of the check the entry should match
subscription
The name of the subscription the entry should match
sensu_user
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensu_configure[puppet]
Sensu_api_validator[sensu]
Examples
Create a user
sensu_user { 'test':
ensure => 'present',
password => 'supersecret',
groups => ['users'],
}
Change a user's password
sensu_user { 'test'
ensure => 'present',
password => 'newpassword',
old_password => 'supersecret',
groups => ['users'],
}
Properties
The following properties are available in the sensu_user
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
password
The user's password.
groups
Groups to which the user belongs.
disabled
Valid values: true
, false
The state of the user’s account.
Default value: false
Parameters
The following parameters are available in the sensu_user
type.
name
namevar
The name of the user.
old_password
The user's old password, needed in order to change a user's password
configure
Valid values: true
, false
Run sensuctl configure for this user
Default value: false
configure_url
URL to use with 'sensuctl configure'
Default value: http://127.0.0.1:8080
sensuctl_config
Abstract type to configure other types
Parameters
The following parameters are available in the sensuctl_config
type.
name
namevar
The name of the resource.
chunk_size
sensuctl chunk-size
Data types
Sensu::Backend_URL
Sensu Backend URL's require protocol of ws:// or wss://. A port is also required. There is logic in sensu::agent class to add the protocol so it's optional.
Alias of Variant[Pattern[/^[^\s:]+:\d+$/], Pattern[/^ws:\/\/[^\s:]+:\d+$/], Pattern[/^wss:\/\/[^\s:]++:\d+$/]]
Change Log
v3.4.1 (2019-07-19)
Merged pull requests:
- Add acceptance tests that use puppetserver #1123 (treydock)
- Fix to support Puppetserver 5 #1122 (treydock)
v3.4.0 (2019-07-11)
Merged pull requests:
- Add headers property to sensu_assets #1119 (treydock)
- Update several usage examples to match Sensu Go docs #1117 (treydock)
- Add ability to run acceptance tests against Sensu-Go CI builds #1115 (treydock)
- Support listing sensuctl resources using chunk-size #1114 (treydock)
- Regenerate backend test cert to include additional SANs #1113 (treydock)
- Support Sensu Go 5.6 #1105 (treydock)
v3.3.0 (2019-05-18)
Merged pull requests:
- (GH-1111) Remove Ubuntu 14.04 LTS as it is end of life (EOL) #1112 (ghoneycutt)
- Fix repo path for EL vagrant #1110 (treydock)
- Fix cluster tests to work with Sensu Go 5.7 #1109 (treydock)
- Add Windows support for Sensu Go agent #1108 (treydock)
v3.2.0 (2019-05-06)
v3.1.0 (2019-04-19)
Merged pull requests:
- Prep 3.1.0 release #1103 (treydock)
- Support opting out of tessen phone home #1101 (treydock)
- Do not raise errors if custom puppet facts are undefined #1100 (treydock)
- Hiera resources #1097 (treydock)
- Fix Puppet Strings documentation URL #1096 (treydock)
* This Change Log was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.25.1 < 6.0.0)
Copyright (c) 2013 James Turnbull, Jeremy Carroll, Justin Lambert, Tim Sharpe Copyright (C) 2017-2019 Garrett Honeycutt <code@garretthoneycutt.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.