tribe29.checkmk.discovery (0.23.0) — module

Discover services in Checkmk.

| "added in version" 0.0.1 of tribe29.checkmk"

Authors: Robin Gierse (@robin-tribe29)

Install collection

Install with ansible-galaxy collection install tribe29.checkmk:==0.23.0


Add to requirements.yml

  collections:
    - name: tribe29.checkmk
      version: 0.23.0

Description

Discovery services within Checkmk.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create a single host.
- name: "Add newly discovered services on host."
  tribe29.checkmk.discovery:
    server_url: "http://localhost/"
    site: "my_site"
    automation_user: "automation"
    automation_secret: "$SECRET"
    host_name: "my_host"
    state: "new"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Add newly discovered services, update labels and remove vanished services on host."
  tribe29.checkmk.discovery:
    server_url: "http://localhost/"
    site: "my_site"
    automation_user: "automation"
    automation_secret: "$SECRET"
    host_name: "my_host"
    state: "fix_all"

Inputs

    
site:
    description: The site you want to connect to.
    required: true
    type: str

state:
    choices:
    - new
    - remove
    - fix_all
    - refresh
    - only_host_labels
    default: new
    description: The action to perform during discovery.
    type: str

host_name:
    description: The host who's services you want to manage.
    required: true
    type: str

server_url:
    description: The base url of your Checkmk server.
    required: true
    type: str

validate_certs:
    default: true
    description: Whether to validate the SSL certificate of the Checkmk server.
    type: bool

automation_user:
    description: The automation user you want to use. It has to be an 'Automation' user,
      not a normal one.
    required: true
    type: str

automation_secret:
    description: The secret to authenticate your automation user.
    required: true
    type: str

Outputs

http_code:
  description: The HTTP code the Checkmk API returns.
  returned: always
  sample: '200'
  type: int
message:
  description: The output message that the module generates.
  returned: always
  sample: Host created.
  type: str