Skip to content

ansible-collections/logicmonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Name Description
logicmonitor.integration.lm_info Gather information about LogicMonitor objects (i.e. collectors, collector groups, devices, device groups)
logicmonitor.integration.lm_collector Manage LogicMonitor collectors (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_collector_group Manage LogicMonitor collector groups (i.e. add, update, remove)
logicmonitor.integration.lm_otel_collector Manage LogicMonitor otel collectors (i.e. add, remove)
logicmonitor.integration.lm_device Manage LogicMonitor devices (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_device_group Manage LogicMonitor device groups (i.e. add, update, remove, sdt)
logicmonitor.integration.lm_alert_rule Manage LogicMonitor alert rules (i.e. add, update, remove)
logicmonitor.integration.lm_escalation_chain Manage LogicMonitor escalation chains (i.e. add, update, remove)
logicmonitor.integration.lm_datasource Manage LogicMonitor device datasources (i.e. sdt)
logicmonitor.integration.lm_website_check Manage LogicMonitor website checks (i.e. sdt a ping or web check)

EventSources

Name Description
logicmonitor.integration.webhook Recieve 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.

About

Repo to house LogicMonitor Collection

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages