logicmonitor / logicmonitor.integration / 2.0.3 / module / lm_info Gather information about LogicMonitor objects (e.g. collectors, collector groups, devices, device groups, etc.). | "added in version" 1.0.0 of logicmonitor.integration" Authors: Carlos Alvarenga (@cealvar)logicmonitor.integration.lm_info (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 collects information about devices, collectors, devices and device groups associated with your LogicMonitor account.
# Get all collectors - name: Get collectors hosts: localhost tasks: - name: Running module lm_info: target: collector company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get collector - name: Get collector hosts: localhost tasks: - name: Running module lm_info: target: collector company: batman access_id: "id123" access_key: "key123" description: "localhost" register: output - name: Output debug: msg: '{{ output }}'
# Get all collector groups - name: Get collector groups hosts: localhost tasks: - name: Running module lm_info: target: collector_group company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get collector group - name: Get collector group hosts: localhost tasks: - name: Running module lm_info: target: collector_group company: batman access_id: "id123" access_key: "key123" name: "collector group" register: output - name: Output debug: msg: '{{ output }}'
# Get all devices - name: Get devices hosts: localhost tasks: - name: Running module lm_info: target: device company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get device - name: Get device hosts: localhost tasks: - name: Running module lm_info: target: device company: batman access_id: "id123" access_key: "key123" hostname: 127.0.0.1 register: output - name: Output debug: msg: '{{ output }}'
# Get all device groups - name: Get device groups hosts: localhost tasks: - name: Running module lm_info: target: device_group company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get device group - name: Get device group hosts: localhost tasks: - name: Running module lm_info: target: device_group company: batman access_id: "id123" access_key: "key123" full_path: "Devices by Type/Collectors" register: output - name: Output debug: msg: '{{ output }}'
# Get alert rules - name: Get alert rules hosts: localhost tasks: - name: Running module lm_info: target: alert_rule company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get alert rule - name: Get alert rule hosts: localhost tasks: - name: Running module lm_info: target: alert_rule company: batman access_id: "id123" access_key: "key123" id: 16 register: output - name: Output debug: msg: '{{ output }}'
# Get escalation chains - name: Get escalation chains hosts: localhost tasks: - name: Running module lm_info: target: escalation_chain company: batman access_id: "id123" access_key: "key123" register: output - name: Output debug: msg: '{{ output }}'
# Get escalation chain - name: escalation chain hosts: localhost tasks: - name: Running module lm_info: target: escalation_chain company: batman access_id: "id123" access_key: "key123" id: 16 register: output - name: Output debug: msg: '{{ output }}'
id: description: - ID of the collector, device, device group, escalation chain, etc to target. type: int name: description: - Name of the collector group, alert rule, escalation chain, etc to target. type: str size: default: 250 description: - The number of resources/results to display (max is 1000). type: int target: choices: - collector - collector_group - device - device_group - alert_rule - escalation_chain description: - The type of LogicMonitor object you wish to query. 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 hostname: description: - Name (hostname) of the device to target. 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 full_path: description: - Full path of the device group to target. - Root group full_path should be denoted by empty string "" or "/". 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 the collector to target. type: str display_name: description: - Display name of the device to target. type: str
data: description: The dictionary containing information about all collectors associated with your account returned: always sample: isMin: false items: - {} searchId: null total: 1 type: dict