W3cubDocs

/Ansible

circonus_annotation - create an annotation in circonus

New in version 2.0.

Synopsis

  • Create an annotation event with a given category, title and description. Optionally start, end or durations can be provided

Requirements (on host that executes module)

  • requests (either >= 2.0.0 for Python 3, or >= 1.0.0 for Python 2)

Options

parameter required default choices comments
api_key
yes
Circonus API key
category
yes
Annotation Category
description
yes
Description of annotation
duration
no
Duration in seconds of annotation
start
no I(now)
Unix timestamp of event start
stop
no I(now) + I(duration)
Unix timestamp of event end
title
yes
Title of annotation

Examples

# Create a simple annotation event with a source, defaults to start and end time of now
- circonus_annotation:
    api_key: XXXXXXXXXXXXXXXXX
    title: App Config Change
    description: This is a detailed description of the config change
    category: This category groups like annotations
# Create an annotation with a duration of 5 minutes and a default start time of now
- circonus_annotation:
    api_key: XXXXXXXXXXXXXXXXX
    title: App Config Change
    description: This is a detailed description of the config change
    category: This category groups like annotations
    duration: 300
# Create an annotation with a start_time and end_time
- circonus_annotation:
    api_key: XXXXXXXXXXXXXXXXX
    title: App Config Change
    description: This is a detailed description of the config change
    category: This category groups like annotations
    start_time: 1395940006
    end_time: 1395954407

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
annotation
details about the created annotation
success complex
contains:
name description returned type sample
_last_modified_by
last modified by
success string /user/1000
category
category of the created annotation
success string alerts
_last_modified
last modification timestamp
success int 1502236928
title
title of the created annotation
success string WARNING
stop
timestamp, since annotation ends
success string Host is down.
start
timestamp, since annotation applies
success int Host is down.
_cid
annotation identifier
success string /annotation/100000
_created
creation timestamp
success int 1502236928
rel_metrics
Array of metrics related to this annotation, each metrics is a string.
success list ['54321_kbps']
description
description of the created annotation
success string Host is down.

Notes

Note

  • Check mode isn’t supported.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/circonus_annotation_module.html