Resource Type: sensu_asset
Summary
Manages Sensu assetsOverview
Autorequires:
Package[sensu-go-cli]
Service[sensu-backend]
Sensuctl_configure[puppet]
Sensu_api_validator[sensu]
Sensu_user[admin]
sensu_namespace
- Puppet will autorequiresensu_namespace
resource defined innamespace
property.
Examples:
Create an asset with multiple builds
sensu_asset { 'test':
ensure => 'present',
builds => [
{
"url" => "https://assets.bonsai.sensu.io/981307deb10ebf1f1433a80da5504c3c53d5c44f/sensu-go-cpu-check_0.0.3_linux_amd64.tar.gz",
"sha512" => "487ab34b37da8ce76d2657b62d37b35fbbb240c3546dd463fa0c37dc58a72b786ef0ca396a0a12c8d006ac7fa21923e0e9ae63419a4d56aec41fccb574c1a5d3",
"filters" => [
"entity.system.os == 'linux'",
"entity.system.arch == 'amd64'"
],
"headers" => {
"Authorization" => "Bearer $TOKEN",
"X-Forwarded-For" => "client1, proxy1, proxy2",
}
},
{
"url" => "https://assets.bonsai.sensu.io/981307deb10ebf1f1433a80da5504c3c53d5c44f/sensu-go-cpu-check_0.0.3_linux_armv7.tar.gz",
"sha512" => "70df8b7e9aa36cf942b972e1781af04815fa560441fcdea1d1538374066a4603fc5566737bfd6c7ffa18314edb858a9f93330a57d430deeb7fd6f75670a8c68b",
"filters" => [
"entity.system.os == 'linux'",
"entity.system.arch == 'arm'",
"entity.system.arm_version == 7"
],
"headers" => {
"Authorization" => "Bearer $TOKEN",
"X-Forwarded-For" => "client1, proxy1, proxy2",
}
},
{
"url" => "https://assets.bonsai.sensu.io/981307deb10ebf1f1433a80da5504c3c53d5c44f/sensu-go-cpu-check_0.0.3_windows_amd64.tar.gz",
"sha512" => "10d6411e5c8bd61349897cf8868087189e9ba59c3c206257e1ebc1300706539cf37524ac976d0ed9c8099bdddc50efadacf4f3c89b04a1a8bf5db581f19c157f",
"filters" => [
"entity.system.os == 'windows'",
"entity.system.arch == 'amd64'"
],
"headers" => {
"Authorization" => "Bearer $TOKEN",
"X-Forwarded-For" => "client1, proxy1, proxy2",
}
}
],
}
Create an asset with composite name in dev
namespace
sensu_asset { 'test in dev':
ensure => 'present',
builds => ...
}
Properties
-
annotations
Arbitrary, non-identifying metadata to include with event data.
-
builds
A list of asset builds used to define multiple artifacts which provide the named asset.
Keys:
- url: required
- sha512: required
- filters: optional Array
- headers: optional Hash
-
ensure
(defaults to: present)
The basic property that the resource should be in.
Supported values:- present
- absent
-
headers
HTTP headers to appy to asset retrieval requests.
-
labels
Custom attributes to include with event data, which can be queried like regular attributes.
-
namespace
(defaults to: default)
The Sensu RBAC namespace that this asset belongs to.
Parameters
-
bonsai
Private property used by sensu_bonsai_asset type
Supported values:- true
- false
-
name (namevar)
The name of the asset. The name supports composite names that can define the namespace. An example composite name to define resource named
test
in namespacedev
:test in dev
-
provider
The specific backend to use for this
sensu_asset
resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. -
resource_name
The name of the asset.