Resource Type: sensu_hook

Defined in:
lib/puppet/type/sensu_hook.rb
Providers:
sensuctl
sensu_api

Summary

Manages Sensu hooks

Overview

Autorequires:

Examples:

Create a hook

sensu_hook { 'test':
  ensure  => 'present',
  command => 'ps aux',
}

Create a hook with namespace ‘dev` in the name

sensu_hook { 'test in dev':
  ensure  => 'present',
  command => 'ps aux',
}

Properties

  • annotations

    Arbitrary, non-identifying metadata to include with event data.

  • command

    The hook command to be executed.

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • 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 hook belongs to.

  • runtime_assets

    An array of Sensu assets (names), required at runtime for the execution of the command

    Supported values:
    • /.*/
    • absent
  • stdin (defaults to: false)

    If the Sensu agent writes JSON serialized Sensu entity and check data to the command process’ STDIN.

    Supported values:
    • true
    • false
  • timeout (defaults to: 60)

    The hook execution duration timeout in seconds (hard stop)

Parameters

  • name (namevar)

    The name of the hook. The name supports composite names that can define the namespace. An example composite name to define resource named ‘test` in namespace `dev`: `test in dev`

  • provider

    The specific backend to use for this ‘sensu_hook` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • resource_name

    The name of the hook.