logicmonitor / logicmonitor.integration / 2.0.3 / module / lm_datasource LogicMonitor Datasource Ansible module for managing device datasources. | "added in version" 1.0.0 of logicmonitor.integration" Authors: Carlos Alvarenga (@cealvar) preview | supported by communitylogicmonitor.integration.lm_datasource (2.0.3) — module
Install with ansible-galaxy collection install logicmonitor.integration:==2.0.3
collections: - name: logicmonitor.integration version: 2.0.3
LogicMonitor is a hosted, full-stack, infrastructure monitoring platform.
This module manages device datasources within your LogicMonitor account (i.e. sdt).
# Example of putting a device datasource in SDT - name: SDT Datasource hosts: localhost tasks: - name: Place LogicMonitor datasource into Scheduled downtime (default is 30 min.) logicmonitor: action: sdt company: batman access_id: "id123" access_key: "key123" name: "ping" device_display_name: "127.0.0.1_collector_1" start_time: "1/1/2022 15:00" duration: 60
id: description: - ID of the device datasource to target. - Required for action=sdt if datasource name isn't provided. type: int name: description: - Name of the device datasource to target. - Required for action=sdt if datasource id isn't provided. type: str action: choices: - sdt description: - The action you wish to perform on the device group. - SDT = Schedule downtime for a device datasource in your LogicMonitor account. required: true type: str comment: description: - The note/comment to add to an SDT action. - Optional for action=sdt. 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 duration: default: 30 description: - The duration (minutes) of the Scheduled Down Time (SDT). - Optional for action=sdt. type: int end_time: description: - The time that the Scheduled Down Time (SDT) should end. - Format must be 'yyyy-MM-dd HH:mm' or "yyyy-MM-dd HH:mm z" where z is "am" or "pm". The former is used for a 24-hr clock while the latter is for a 12-hr clock. - If end time is provided it will be used otherwise duration would be used (duration defaults to 30 min). - Optional for action=sdt. 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 device_id: description: - ID of device (containing datasource) to target. - Required for action=sdt if the following are true ... (1) id of datasource isn't provided (2) name of datasource is provided (3) device_display_name isn't provided (4) device_hostname isn't provided. type: int 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 start_time: description: - The time that the Scheduled Down Time (SDT) should begin. - Format must be "yyyy-MM-dd HH:mm" or "yyyy-MM-dd HH:mm z" where z is "am" or "pm". The former is used for a 24-hr clock while the latter is for a 12-hr clock. - Optional for action=sdt. - Defaults to the time action is executed. - Required in case start time differ from the execution time of action. type: str device_hostname: description: - hostname (name) of device (containing datasource) to target. - Required for action=sdt if the following are true ... (1) id of datasource isn't provided (2) name of datasource is provided (4) device_id isn't provided (3) device_display_name isn't provided. type: str device_display_name: description: - display name of device (containing datasource) to target. - Required for action=sdt if the following are true ... (1) id of datasource isn't provided (2) name of datasource is provided (3) device_id isn't provided (4) device_hostname isn't provided. - Required for device SDT if both device ID and name aren't provided. type: str
action_performed: description: a string describing which action was performed returned: success sample: std type: str addition_info: description: any additional detail related to the action returned: success sample: Datasource SDT successful type: str changed: description: a boolean indicating that changes were made to the target returned: changed sample: true type: bool data: description: contain datasource or sdt details returned: success sample: datasource_id: 4 datasource_name: Host Status duration: 5 end_time: 2022-09-20 16:55:07 IST start_time: 2022-09-20 16:50:07 IST std_id: S_25 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