integration

10Modules4Plugins

Overview

Description

Collection for LogicMonitor Ansible integration

Readme

LogicMonitor Ansible Collection

Code of conduct License

This repository hosts the LogicMonitor Ansible Collection of LogicMonitor's Ansible Integration.

LogicMonitor is a hosted, full-stack, infrastructure monitoring platform. This collection includes the Ansible modules and plugins for interacting with LogicMonitor.

Requirements

  • Ansible version >=2.13.0
  • Python >= 2.7
  • Python requests module >=2.24.0
  • An existing LogicMonitor account
  • API tokens for authentication purposes

Installation

Installing the Collection from Ansible Galaxy

You can install the LogicMonitor collection with the ansible-galaxy CLI:

ansible-galaxy collection install logicmonitor.integration

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

collections:
  - name: logicmonitor.integration

Required Python Libraries

This collection depends upon following third party libraries:

  • requests >= 2.24.0
  • aiohttp
  • asyncio
  • PyYAML

This python module dependencies are not installed by ansible-galaxy. It can be manually installed using pip:

pip install requests

or:

pip install -r requirements.txt

Usage

Playbooks

To use a module from the LogicMonitor collection, please reference the full namespace, collection name, and module name that you want to use:

---
- name: Using LogicMonitor Collection
  hosts: localhost
  tasks:
    - logicmonitor.integration.lm_collector:
        action: sdt
        company: lm
        access_id: "id123"
        access_key: "key123"
        description: localhost

Or you can add the full namespace and collection name in the collections element:

---
- name: Using LogicMonitor Collection
  hosts: localhost
  collections:
    - logicmonitor.integration
  tasks:
    - lm_collector:
        action: sdt
        company: lm
        access_id: "id123"
        access_key: "key123"
        description: localhost

Rulebook

To use a event source from the LogicMonitor collection, please reference the full namespace, collection name, and event source name that you want to use:

---
- name: webhook alert Events
  hosts: localhost
  sources:
    - logicmonitor.integration.webhook:
        hosts: 127.0.0.1
        port: 5000
        vault_pass: '{{vault_pass}}'
        vault_path: '{{vault_path}}'
  rules:
    - name: start collector
      condition: event.payload.type == "agentDownAlert"
      action:
        run_playbook:
          name: logicmonitor.integration.start_lm-collector
    - name: ensure webserver is running
      condition: event.payload.type == "serviceAlert"
      action:
        run_playbook:
          name: logicmonitor.integration.start_webserver

Included content

Modules

NameDescription
logicmonitor.integration.lm_infoGather information about LogicMonitor objects (i.e. collectors, collector groups, devices, device groups)
logicmonitor.integration.lm_collectorManage LogicMonitor collectors (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_collector_groupManage LogicMonitor collector groups (i.e. add, update, remove)
logicmonitor.integration.lm_otel_collectorManage LogicMonitor otel collectors (i.e. add, remove)
logicmonitor.integration.lm_deviceManage LogicMonitor devices (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_device_groupManage LogicMonitor device groups (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_alert_ruleManage LogicMonitor alert rules (i.e. add, update, remove)
logicmonitor.integration.lm_escalation_chainManage LogicMonitor escalation chains (i.e. add, update, remove)
logicmonitor.integration.lm_datasourceManage LogicMonitor device datasources (i.e. sdt)
logicmonitor.integration.lm_website_checkManage LogicMonitor website checks (i.e. sdt a ping or web check)

EventSources

NameDescription
logicmonitor.integration.webhookRecieve alerts/events from logicmonitor

Contributing

You can participate in this project by submitting bugs and feature requests, and helping us verify as they are checked in.

Release Notes

See the changelog

More information

Licensing

BSD (3-clause) License

See LICENSE to see the full text.

Certification

Product
2.4
DocumentationDependencies
No dependencies
There are currently no dependencies for this collection.
View in Automation Hub
Red Hat logoLinkedInYouTubeFacebookTwitter

Platforms

Products & services

Try, buy, sell

Help

About Red Hat Ecosystem Catalog

The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2025 Red Hat