diff --git a/README.md b/README.md index ab61550..1dce11b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,18 @@ A set of modules to manage SignalFX metadata. +## Included content + + +### Modules +Name | Description +--- | --- +[tremble.signalfx.dimension](https://github.com/tremble/tremble-signalfx/blob/main/docs/tremble.signalfx.dimension_module.rst)|manages SignalFX dimension metadata +[tremble.signalfx.event](https://github.com/tremble/tremble-signalfx/blob/main/docs/tremble.signalfx.event_module.rst)|sends SignalFX events +[tremble.signalfx.session](https://github.com/tremble/tremble-signalfx/blob/main/docs/tremble.signalfx.session_module.rst)|log into the SignalFX API + + + ## Code of Conduct We follow the [Ansible Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) in all our interactions within this project. @@ -43,11 +55,16 @@ The process of decision making in this collection is based on discussing and fin Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it! - +## Ansible version compatibility -Ansible 2.12 +This collection has been tested against following Ansible versions: **>=2.9.10**. + +Plugins and modules within a collection may be tested with only specific Ansible versions. +A collection may contain metadata that identifies these versions. +PEP440 is the schema used to describe the versions of Ansible. + ---> ## External requirements This collection depends on the SignalFX Python client library: https://github.com/signalfx/signalfx-python @@ -116,3 +133,4 @@ See the [changelog](https://github.com/ansible-collections/REPONAMEHERE/tree/mai GNU General Public License v3.0 or later. See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. + diff --git a/docs/tremble.signalfx.dimension_module.rst b/docs/tremble.signalfx.dimension_module.rst new file mode 100644 index 0000000..31a1520 --- /dev/null +++ b/docs/tremble.signalfx.dimension_module.rst @@ -0,0 +1,436 @@ +.. _tremble.signalfx.dimension_module: + + +************************** +tremble.signalfx.dimension +************************** + +**manages SignalFX dimension metadata** + + +Version added: 0.1.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manages SignalFX dimenstion metadata. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.6 +- signalfx +- requests + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auth_token + +
+ string + / required +
+
+ +
The SignalFX authentication token.
+
+
+ custom_properties + +
+ dictionary +
+
+ +
Custom properties to add or update for the specified dimension key and value.
+

aliases: properties
+
+
+ description + +
+ string +
+
+ +
Description of the dimension.
+
+
+ key + +
+ string + / required +
+
+ +
Name of the dimension to update.
+

aliases: name
+
+
+ purge_properties + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Whether to remove existing properties that aren't passed in the properties parameter.
+
+
+ purge_tags + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Whether to remove existing tags that aren't passed in the tags parameter.
+
+
+ realm + +
+ string +
+
+ Default:
"us0"
+
+
The SignalFX realm to use.
+
+
+ tags + +
+ list + / elements=string +
+
+ +
Tags to add or update for the specified dimension key and value.
+
+
+ value + +
+ string + / required +
+
+ +
Value of the dimension to update.
+
+
+ + + + +Examples +-------- + +.. code-block:: yaml + + # Set the 'project_name' custom property on the 'project_id:{{ project_id }}' dimension. + - dimension: + key: project_id + value: '{{ project_id }}' + properties: + project_name: '{{ project_name }}' + realm: us1 + auth_token: 'abc123456789def' + + # Remove all custom properties from the 'project_id:{{ project_id }}' dimension. + - dimension: + key: project_id + value: '{{ project_id }}' + properties: {} + purge_properties: True + realm: us1 + auth_token: 'abc123456789def' + + # Add a tag to the 'project_id:{{ project_id }}' dimension. + - dimension: + key: project_id + value: '{{ project_id }}' + tags: + - MyExampleTag + realm: us1 + auth_token: 'abc123456789def' + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ dimension + +
+ dictionary +
+
On success +
A dictionary describing the dimension.
+
+
  +
+ created + +
+ integer +
+
On success +
The time that the dimension was created (Unix time).
+
+
Sample:
+
1612972485414
+
  +
+ creator + +
+ string +
+
On success +
The ID of the user that created the dimension.
+
+
Sample:
+
ABCDEF12345
+
  +
+ custom_properties + +
+ dictionary +
+
On success +
A dictionary representing the custom properties for the dimension.
+
+
Sample:
+
{'project_name': 'My Project Name'}
+
  +
+ description + +
+ string +
+
On success +
Dimension description (up to 1024 UTF8 characters).
+
+
Sample:
+
My Dimension
+
  +
+ key + +
+ string +
+
On success +
Dimension name.
+
+
Sample:
+
some_dimension
+
  +
+ last_updated + +
+ integer +
+
On success +
The time that the dimension was last updated (Unix time).
+
+
Sample:
+
1641302231514
+
  +
+ last_updated_by + +
+ string +
+
On success +
The ID of the user that last updated the dimension.
+
+
Sample:
+
ABCDEF12345
+
  +
+ tags + +
+ list + / elements=string +
+
On success +
A list of the tags for the dimension.
+
+
Sample:
+
['tag1', 'tag2']
+
  +
+ value + +
+ string +
+
On success +
Dimension value.
+
+
Sample:
+
MyValue
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Mark Chappell (@tremble) diff --git a/docs/tremble.signalfx.event_module.rst b/docs/tremble.signalfx.event_module.rst new file mode 100644 index 0000000..9d53942 --- /dev/null +++ b/docs/tremble.signalfx.event_module.rst @@ -0,0 +1,319 @@ +.. _tremble.signalfx.event_module: + + +********************** +tremble.signalfx.event +********************** + +**sends SignalFX events** + + +Version added: 0.1.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Sends SignalFX events. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.6 +- signalfx +- requests + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auth_token + +
+ string + / required +
+
+ +
The SignalFX authentication token.
+
+
+ category + +
+ string +
+
+
    Choices: +
  • USER_DEFINED ←
  • +
  • ALERT
  • +
  • AUDIT
  • +
  • JOB
  • +
  • COLLECTD
  • +
  • SERVICE_DISCOVERY
  • +
  • EXCEPTION
  • +
+
+
A category that describes the event.
+
+
+ dimensions + +
+ dictionary +
+
+ +
Dimensions for the event.
+
+
+ event_type + +
+ string + / required +
+
+ +
A name for the event.
+

aliases: name
+
+
+ properties + +
+ dictionary +
+
+ +
Properties for the event.
+
+
+ realm + +
+ string +
+
+ Default:
"us0"
+
+
The SignalFX realm to use.
+
+
+ timestamp + +
+ integer +
+
+ +
The time at which the event happened (UNIX time).
+
+
+ + + + +Examples +-------- + +.. code-block:: yaml + + # Send a simple "ExampleTestEvent" event with no metadata + - event: + event_type: ExampleTestEvent + realm: us1 + auth_token: "ABCDE12345" + + # Send an event with dimenstions attached + - event: + event_type: ExampleTestEvent + dimensions: + application_code: SMPL-001 + hostname: "{{ ansible_fqdn }}" + realm: us1 + auth_token: "ABCDE12345" + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ event + +
+ dictionary +
+
On success +
A dictionary describing the event sent.
+
+
  +
+ category + +
+ string +
+
On success +
A category that describes the event.
+
+
Sample:
+
USER_DEFINED
+
  +
+ custom_properties + +
+ dictionary +
+
When custom properties were set. +
A dictionary representing the custom properties for the event.
+
+
Sample:
+
{'project_name': 'My Project Name'}
+
  +
+ dimensions + +
+ dictionary +
+
When dimensions were set. +
A dictionary representing the dimensions for the event.
+
+
Sample:
+
{'project_id': '123456789'}
+
  +
+ event_type + +
+ string +
+
On success +
A name for the event.
+
+
Sample:
+
ExampleTestEvent
+
  +
+ timestamp + +
+ integer +
+
When a timestamp was explicitly sent. +
The time at which the event happened (UNIX time).
+
+
Sample:
+
1641304973451
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Mark Chappell (@tremble) diff --git a/docs/tremble.signalfx.session_module.rst b/docs/tremble.signalfx.session_module.rst new file mode 100644 index 0000000..671529e --- /dev/null +++ b/docs/tremble.signalfx.session_module.rst @@ -0,0 +1,141 @@ +.. _tremble.signalfx.session_module: + + +************************ +tremble.signalfx.session +************************ + +**log into the SignalFX API** + + +Version added: 0.1.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Logs into the SignalFX API and generates a session token. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ email + +
+ string + / required +
+
+ +
The email address of the user.
+
+
+ password + +
+ string + / required +
+
+ +
The password of the user
+
+
+ realm + +
+ string +
+
+ Default:
"us0"
+
+
The SignalFX realm to use.
+
+
+ + + + +Examples +-------- + +.. code-block:: yaml + + # Login using an email/password + - session: + realm: us1 + email: somebody@example.com + password: Not-A-Real-Password + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + +
KeyReturnedDescription
+
+ token + +
+ string +
+
On success +
A SignalFX Session token.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Mark Chappell (@tremble) diff --git a/galaxy.yml b/galaxy.yml index d5206de..2881fb1 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -2,7 +2,7 @@ namespace: tremble name: signalfx -version: 0.1.2 +version: 0.1.3 readme: README.md authors: - Mark Chappell (github.com/tremble)