logicmonitor.integration.lm_escalation_chain (2.0.3) — module

LogicMonitor Escalation Chain Ansible module for managing escalation chain.

| "added in version" 1.2.0 of logicmonitor.integration"

Authors: Gunjan Kumar (@gunjan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install logicmonitor.integration:==2.0.3


Add to requirements.yml

  collections:
    - name: logicmonitor.integration
      version: 2.0.3

Description

LogicMonitor is a hosted, full-stack, infrastructure monitoring platform.

This module manages escalation chain within your LogicMonitor account (i.e. add, update, remove).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Example of adding an escalation chain
- name: Add Escalation Chain
  hosts: localhost
  tasks:
    - name: Add LogicMonitor Escalation Chain
      lm_escalation_chain:
        action: add
        company: batman
        access_id: "id123"
        access_key: "key123"
        name: new-chain
        enable_throttling: True
        rate_limit_period: 22
        rate_limit_alerts: 33
        description: added from ansible
        destinations: [
          [
            {"name":"ConnectWise Integration-clone", "user":"john.doe@logicmonitor.com"},
            {"name":"group", "group-name":"test-group"},
            {"name":"arbitrary-email", "address":"john.doe@logicmonitor.com"}
          ],
          [
            {"name":"email","user":"john.doe@logicmonitor.com" },
            {"name":"voice","user":"john.doe@logicmonitor.com" }
           ]
        ]
        cc_destinations: [
          {"name":"arbitrary-email", "address":"john.doe@logicmonitor.com"},
          {"name":"arbitrary-email", "address":"john.doe@google.com"},
          {"name":"Autotask Integration -New", "user":"john.doe@logicmonitor.com"}
        ]
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Example of updating an escalation chain
- name: Update Escalation Chain
  hosts: localhost
  tasks:
    - name: Update LogicMonitor Escalation Chain
      lm_escalation_chain:
        action: update
        company: batman
        access_id: "id123"
        access_key: "key123"
        name: new-chain
        enable_throttling: false
        rate_limit_period: 22
        rate_limit_alerts: 33
        description: added from ansible
        destinations: [
          [
            {"name":"ConnectWise Integration-clone", "user":"john.doe@logicmonitor.com"},
            {"name":"group", "group-name":"test-group"},
            {"name":"arbitrary-email", "address":"john.doe@logicmonitor.com"}
          ],
          [
            {"name":"email","user":"john.doe@logicmonitor.com" },
            {"name":"voice","user":"john.doe@logicmonitor.com" }
           ]
        ]
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Example of removing an escalation chain
- name: Remove Escalation Chain
  hosts: localhost
  tasks:
    - name: Remove LogicMonitor Escalation Chain
      lm_escalation_chain:
        action: remove
        company: batman
        access_id: "id123"
        access_key: "key123"
        name: new-chain

Inputs

    
id:
    description:
    - ID of the escalation chain to target.
    - Required for managing escalation chain (action=update and action=remove) if name
      isn't provided.
    type: int

name:
    description:
    - The name of the escalation chain to target.
    - Required for managing escalation chain (action=add).
    - Required for managing escalation chain (action=update and action=remove) if name
      isn't provided.
    type: str

action:
    choices:
    - add
    - update
    - remove
    description:
    - The action you wish to perform on the escalation chain.
    - Add = Add a escalation chain to your LogicMonitor account.
    - Update = rate limit, destination / recipient etc for a escalation chain in your
      LogicMonitor account.
    - Remove = Remove a escalation chain from your LogicMonitor account.
    required: true
    type: str

company:
    description:
    - The LogicMonitor account company name.
    - A user logging into their account at "batman.logicmonitor.com" would use "batman".
    required: true
    type: str

access_id:
    description:
    - The Access ID API token associated with the user's account that's used to query
      the LogicMonitor API.
    - Please contact your LogicMonitor admin if you need new API tokens created for your
      account.
    required: true
    type: str

access_key:
    description:
    - The Access Key API token associated with the user's account that's used to query
      the LogicMonitor API.
    - Please contact your LogicMonitor admin if you need new API tokens created for your
      account.
    - Must start with the "!unsafe" keyword if the the key starts with a special character
      (e.g. '[', ']', etc.) to prevent playbook issues.
    required: true
    type: str

description:
    description:
    - Description of escalation chain.
    - Optional for managing escalation chain (action=add or action=update).
    type: str

destinations:
    description:
    - Destinations consists of ordered list of stages.
    - Stages consist of one or more recipients that alert notifications will be routed
      to.
    - Required for managing escalation chain (action=add).
    - Optional for managing escalation chain (action=update).
    - Recipient is a JSON object pointing to any one of the following... (1) integration
      - send alerts to integrations (sms, email, pagerduty, autotask, etc...) required
      properties name - name of the integration user - logicmonitor username Note in case
      of email, sms and voice name would be type (ie for email name would be email) (2)
      arbitrary emails - send alert to the given email address required properties name
      - name must be "arbitrary-email" address - email address (3) recipient group - send
      alert to a recipient group required properties name - name must be "group" group-name
      - name of the group
    elements: list
    type: list

force_manage:
    choices:
    - true
    - false
    default: true
    description:
    - A boolean flag to enable/disable the feature to ... (1) update a escalation chain
      when the initial action=add because the chain exists or (2) add a escalation chain
      when the initial action=update because the chain doesn't exist.
    - Optional for managing escalation chain (action=add or action=update).
    type: bool

cc_destinations:
    description:
    - cc destination is a list of recipients
    - Recipients in cc will receive all notifications sent to every stage in the escalation
      chain.
    - Optional for managing escalation chain (action=add or action=update).
    - Recipient is a JSON object pointing to any one of the following... (1) integration
      - send alerts to integrations (sms, email, pagerduty, autotask, etc...) required
      properties name - name of the integration user - logicmonitor username Note in case
      of email, sms and voice name would be type (ie for email name would be email) (2)
      arbitrary emails - send alert to the given email address required properties name
      - name must be "arbitrary-email" address - email address (3) recipient group - send
      alert to a recipient group required properties name - name must be "group" group-name
      - name of the group
    - Optional for managing escalation chain (action=add or action=update).
    elements: dict
    type: list

enable_throttling:
    choices:
    - true
    - false
    description:
    - A boolean flag to enable/disable alert throttling.
    - Required for managing escalation chain (action=add).
    - Optional for managing escalation chain (action=update).
    type: bool

rate_limit_alerts:
    description:
    - The maximum number of alert notifications that can be delivered during the Rate
      Limit Period.
    - Note that re-sent alert notifications count towards this number.
    - Required for managing escalation chain (action=add and action=update) if enable_throttling
      is set to true.
    type: int

rate_limit_period:
    description:
    - The period (minutes) over which max number of alerts (specified in rate_limit_alerts)
      can be sent out.
    - Required for managing escalation chain (action=add and action=update) if enable_throttling
      is set to true.
    type: int

Outputs

action_performed:
  description: a string describing which action was performed
  returned: success
  sample: add
  type: str
addition_info:
  description: any additional detail related to the action
  returned: success
  sample: Escalation Chain updated successfully
  type: str
changed:
  description: a boolean indicating that changes were made to the target
  returned: changed
  sample: true
  type: bool
data:
  description: contain device group details
  returned: success
  sample:
    id: 4
    name: new-chain
  type: dict
failed:
  description: a boolean indicating that execution failed
  returned: failed
  sample: false
  type: bool
success:
  description: flag indicating that execution was successful
  returned: success
  sample: true
  type: bool