community.general.logicmonitor_facts (0.2.1) — module

Collect facts about LogicMonitor objects

Authors: Ethan Culler-Mayeno (@ethanculler), Jeff Wozniak (@woz5999)

Install collection

Install with ansible-galaxy collection install community.general:==0.2.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.2.1

Description

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

This module collects facts about hosts and host groups within your LogicMonitor account.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Always run those modules on localhost using delegate_to:localhost, or localaction

- name: query a list of hosts
  logicmonitor_facts:
    target: host
    company: yourcompany
    user: Luigi
    password: ImaLuigi,number1!
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: query a host group
  logicmonitor_facts:
    target: hostgroup
    fullpath: /servers/production
    company: yourcompany
    user: mario
    password: itsame.Mario!
  delegate_to: localhost

Inputs

    
user:
    description:
    - A LogicMonitor user name. The module will authenticate and perform actions on behalf
      of this user.
    required: true

target:
    choices:
    - host
    - hostgroup
    description:
    - The LogicMonitor object you wish to manage.
    required: true

company:
    description:
    - The LogicMonitor account company name. If you would log in to your account at "superheroes.logicmonitor.com"
      you would use "superheroes".
    required: true

fullpath:
    description:
    - The fullpath of the hostgroup object you would like to manage.
    - Recommend running on a single ansible host.
    - Required for management of LogicMonitor host groups (target=hostgroup).

hostname:
    default: hostname -f
    description:
    - The hostname of a host in your LogicMonitor account, or the desired hostname of
      a device to add into monitoring.
    - Required for managing hosts (target=host).

password:
    description:
    - The password for the chosen LogicMonitor User.
    - If an md5 hash is used, the digest flag must be set to true.
    required: true

collector:
    description:
    - The fully qualified domain name of a collector in your LogicMonitor account.
    - This is optional for querying a LogicMonitor host when a displayname is specified.
    - This is required for querying a LogicMonitor host when a displayname is not specified.

displayname:
    default: hostname -f
    description:
    - The display name of a host in your LogicMonitor account or the desired display name
      of a device to add into monitoring.

Outputs

ansible_facts:
  description: LogicMonitor properties set for the specified object
  example: "{\n    \"name\": \"dc\",\n    \"value\": \"1\"\n}, {\n    \"name\": \"\
    type\",\n    \"value\": \"prod\"\n}, {\n    \"name\": \"system.categories\",\n\
    \    \"value\": \"\"\n}, {\n    \"name\": \"snmp.community\",\n    \"value\":\
    \ \"********\"\n}\n"
  returned: success
  type: list