logicmonitor.integration.lm_otel_collector (2.0.3) — module

LogicMonitor Otel Collector Ansible module for managing lm otel collectors

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

Authors: Anubhav Singh (@arthuragnar)

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 collectors within your LogicMonitor account (i.e. add, remove).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Example of adding a collector
- name: Add Collector
  hosts: localhost
  environment:
    OPTS_SILENT: "true"
  become: yes
  tasks:
    - name: Add LogicMonitor collector
      lm_otel_collector:
        action: add
        company: batman
        access_id: "id123"
        access_key: "key123"
        description: "localhost"
        install_path: "/usr/local/logicmonitor" #optional
        version: 1.0.0.6
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Example of removing a collector
- name: Remove Collector
  hosts: localhost
  become: yes
  tasks:
    - name: Remove LogicMonitor collector
      lm_otel_collector:
        action: remove
        company: batman
        access_id: "id123"
        access_key: "key123"
        install_path: "/usr/local/logicmonitor"

Inputs

    
id:
    description:
    - ID of the otel collector.
    - Optional for action=add (only used when installing an existing otel collector).
    type: int

action:
    choices:
    - add
    - remove
    description:
    - The action you wish to perform on the otel collector.
    - Add = Install existing otel collector on a Linux machine or add a new otel collector
      to your LogicMonitor account & install it.
    - Remove = Remove a collector from your LogicMonitor account & uninstall it from Linux
      machine.
    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

version:
    description:
    - The version of the otel collector to download & install. By default latest otel
      collector will be installed.
    - Optional for action=add
    type: str

platform:
    default: linux
    description:
    - The operating system of the platform where playbook will be executed.
    - This field is only relevant for testing purposes.
    - This field should not be provided when using product since collector installation
      is only supported on Linux machines.
    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:
    default: ansible_otel
    description:
    - Name of the lmotel collector
    type: str

install_path:
    default: /usr/local/logicmonitor
    description:
    - The full path of the directory where the otel collector  should be installed or
      is installed.
    - Optional for action=add & action=remove
    type: str

Outputs

success:
  description: flag indicating that execution was successful
  returned: success
  sample: true
  type: bool