sensu.sensu_go.sensu_go_silence (0.7.6) — module

Manages Sensu silences

| "added in version" 0.1.0 of sensu.sensu_go"

Authors: Paul Arthur (@flowerysong)

preview | supported by community

Install collection

Install with ansible-galaxy collection install sensu.sensu_go:==0.7.6


Add to requirements.yml

  collections:
    - name: sensu.sensu_go
      version: 0.7.6

Description

For more information, refer to the Sensu documentation: U(https://docs.sensu.io/sensu-go/latest/reference/silences/)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Silence a specific check
  sensu_go_silence:
    name: Class_mx:check-disk
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Silence all checks on a specific host
  sensu_go_silence:
    name: entity:punk-zenfusho.mx.x.mail.umich.edu:*

Inputs

    
auth:
    description:
    - Authentication parameters. Can define each of them with ENV as well.
    suboptions:
      namespace:
        default: default
        description:
        - RBAC namespace to operate in. If this is not set the value of the SENSU_NAMESPACE
          environment variable will be checked.
        type: str
      password:
        default: P@ssw0rd!
        description:
        - The Sensu user's password. If this is not set the value of the SENSU_PASSWORD
          environment variable will be checked.
        type: str
      url:
        default: http://localhost:8080
        description:
        - Location of the Sensu backend API. If this is not set the value of the SENSU_URL
          environment variable will be checked.
        type: str
      user:
        default: admin
        description:
        - The username to use for connecting to the Sensu API. If this is not set the
          value of the SENSU_USER environment variable will be checked.
        type: str
    type: dict

name:
    description:
    - Silence name, in the form 'subscription:check_name'.
    required: true
    type: str

begin:
    description:
    - Unix epoch time when the silence should take effect.
    type: int

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Target state of the Sensu object.
    type: str

expire:
    default: -1
    description:
    - Number of seconds until the silence expires
    type: int

labels:
    description:
    - Custom metadata fields that can be accessed within Sensu, as key/value pairs.
    type: dict

reason:
    description:
    - Reason for silencing.
    type: str

annotations:
    description:
    - Custom metadata fields with fewer restrictions, as key/value pairs.
    - These are preserved by Sensu but not accessible as tokens or identifiers, and are
      mainly intended for use with external tools.
    type: dict

expire_on_resolve:
    default: false
    description:
    - Remove the silence entry when a check returns OK.
    type: bool