oracle.oci.oci_logging_unified_agent_configuration – Manage an UnifiedAgentConfiguration resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.11.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_logging_unified_agent_configuration.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete an UnifiedAgentConfiguration resource in Oracle Cloud Infrastructure

  • For state=present, create unified agent configuration registration.

  • This resource has the following action operations in the oracle.oci.oci_logging_unified_agent_configuration_actions module: change_compartment.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
The OCID of the compartment that the resource belongs to.
Required for create using state=present.
Required for update when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
Required for delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
defined_tags
dictionary
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: `{"Operations": {"CostCenter": "42"}}`
This parameter is updatable.
description
string
Description for this resource.
This parameter is updatable.
display_name
string
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
Required for update using state=present with unified_agent_configuration_id present.
Required for create, delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.

aliases: name
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: `{"Department": "Finance"}`
This parameter is updatable.
group_association
dictionary
This parameter is updatable.
group_list
list / elements=string
list of group/dynamic group ids associated with this configuration.
is_enabled
boolean
    Choices:
  • no
  • yes
Whether or not this resource is currently enabled.
Required for create using state=present, update using state=present with unified_agent_configuration_id present.
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
service_configuration
dictionary
Required for create using state=present, update using state=present with unified_agent_configuration_id present.
configuration_type
string / required
    Choices:
  • LOGGING
Type of Unified Agent service configuration.
destination
dictionary
log_object_id
string / required
The OCID of the resource.
sources
list / elements=dictionary
channels
list / elements=string
Applicable when source_type is 'WINDOWS_EVENT_LOG'
name
string / required
unique name for the source
parser
dictionary
Applicable when source_type is 'LOG_TAIL'
delimiter
string
Applicable when parser_type is one of ['TSV', 'CSV']
expression
string
Applicable when parser_type is 'REGEXP'
field_time_key
string
Specify time field for the event time. If the event doesn't have this field, the current time is used.
format
list / elements=string
Applicable when parser_type is 'MULTILINE'
format_firstline
string
Applicable when parser_type is 'MULTILINE'
grok_failure_key
string
Applicable when parser_type is one of ['GROK', 'MULTILINE_GROK']
grok_name_key
string
Applicable when parser_type is one of ['GROK', 'MULTILINE_GROK']
is_estimate_current_event
boolean
    Choices:
  • no
  • yes
If true, use Fluent::EventTime.now(current time) as a timestamp when time_key is specified.
is_keep_time_key
boolean
    Choices:
  • no
  • yes
If true, keep time field in the record.
is_null_empty_string
boolean
    Choices:
  • no
  • yes
If true, an empty string field is replaced with nil.
is_support_colonless_ident
boolean
    Choices:
  • no
  • yes
Applicable when parser_type is 'SYSLOG'
is_with_priority
boolean
    Choices:
  • no
  • yes
Applicable when parser_type is 'SYSLOG'
keys
list / elements=string
Applicable when parser_type is one of ['TSV', 'CSV']
message_format
string
    Choices:
  • RFC3164
  • RFC5424
  • AUTO
Applicable when parser_type is 'SYSLOG'
message_key
string
Applicable when parser_type is 'NONE'
multi_line_start_regexp
string
Applicable when parser_type is 'MULTILINE_GROK'
null_value_pattern
string
Specify the null value pattern.
parser_type
string / required
    Choices:
  • MULTILINE_GROK
  • JSON
  • GROK
  • NONE
  • SYSLOG
  • AUDITD
  • APACHE2
  • REGEXP
  • MULTILINE
  • TSV
  • APACHE_ERROR
  • MSGPACK
  • CSV
Type of fluent parser.
patterns
list / elements=dictionary
Applicable when parser_type is one of ['GROK', 'MULTILINE_GROK']
field_time_format
string
Process value using the specified format. This is available only when time_type is a string.
Applicable when parser_type is 'MULTILINE_GROK'
field_time_key
string
Specify the time field for the event time. If the event doesn't have this field, the current time is used.
Applicable when parser_type is 'MULTILINE_GROK'
field_time_zone
string
Use the specified time zone. The time value can be parsed or formatted in the specified time zone.
Applicable when parser_type is 'MULTILINE_GROK'
name
string
The name key to tag this grok pattern.
Applicable when parser_type is 'MULTILINE_GROK'
pattern
string / required
The grok pattern.
Required when parser_type is 'MULTILINE_GROK'
rfc5424_time_format
string
Applicable when parser_type is 'SYSLOG'
syslog_parser_type
string
    Choices:
  • STRING
  • REGEXP
Applicable when parser_type is 'SYSLOG'
time_format
string
Applicable when parser_type is one of ['REGEXP', 'SYSLOG', 'JSON']
time_type
string
    Choices:
  • FLOAT
  • UNIXTIME
  • STRING
Applicable when parser_type is 'JSON'
timeout_in_milliseconds
integer
Specify the timeout for parse processing. This is mainly for detecting an incorrect regexp pattern.
types
dictionary
Specify types for converting a field into another type.
paths
list / elements=string
Applicable when source_type is 'LOG_TAIL'
source_type
string / required
    Choices:
  • WINDOWS_EVENT_LOG
  • LOG_TAIL
Unified schema logging source type.
state
string
    Choices:
  • present ←
  • absent
The state of the UnifiedAgentConfiguration.
Use state=present to create or update an UnifiedAgentConfiguration.
Use state=absent to delete an UnifiedAgentConfiguration.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
unified_agent_configuration_id
string
The OCID of the Unified Agent configuration.
Required for update using state=present when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.
Required for delete using state=absent when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: id
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Create unified_agent_configuration
  oci_logging_unified_agent_configuration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    is_enabled: true
    service_configuration:
      # required
      configuration_type: LOGGING

      # optional
      sources:
      - # required
        name: name_example
        source_type: WINDOWS_EVENT_LOG

        # optional
        channels: [ "channels_example" ]
      destination:
        # required
        log_object_id: "ocid1.logobject.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    freeform_tags: {'Department': 'Finance'}
    description: description_example
    group_association:
      # optional
      group_list: [ "group_list_example" ]

- name: Update unified_agent_configuration
  oci_logging_unified_agent_configuration:
    # required
    display_name: display_name_example
    is_enabled: true
    service_configuration:
      # required
      configuration_type: LOGGING

      # optional
      sources:
      - # required
        name: name_example
        source_type: WINDOWS_EVENT_LOG

        # optional
        channels: [ "channels_example" ]
      destination:
        # required
        log_object_id: "ocid1.logobject.oc1..xxxxxxEXAMPLExxxxxx"
    unified_agent_configuration_id: "ocid1.unifiedagentconfiguration.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    freeform_tags: {'Department': 'Finance'}
    description: description_example
    group_association:
      # optional
      group_list: [ "group_list_example" ]

- name: Update unified_agent_configuration using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_logging_unified_agent_configuration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example

    # optional
    is_enabled: true
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    freeform_tags: {'Department': 'Finance'}
    description: description_example
    service_configuration:
      # required
      configuration_type: LOGGING

      # optional
      sources:
      - # required
        name: name_example
        source_type: WINDOWS_EVENT_LOG

        # optional
        channels: [ "channels_example" ]
      destination:
        # required
        log_object_id: "ocid1.logobject.oc1..xxxxxxEXAMPLExxxxxx"
    group_association:
      # optional
      group_list: [ "group_list_example" ]

- name: Delete unified_agent_configuration
  oci_logging_unified_agent_configuration:
    # required
    unified_agent_configuration_id: "ocid1.unifiedagentconfiguration.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

- name: Delete unified_agent_configuration using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_logging_unified_agent_configuration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    state: absent

Return Values

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

Key Returned Description
unified_agent_configuration
complex
on success
Details of the UnifiedAgentConfiguration resource acted upon by the current operation

Sample:
{'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'configuration_state': 'VALID', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'description': 'description_example', 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'group_association': {'group_list': []}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_enabled': True, 'lifecycle_state': 'CREATING', 'service_configuration': {'configuration_type': 'LOGGING', 'destination': {'log_object_id': 'ocid1.logobject.oc1..xxxxxxEXAMPLExxxxxx'}, 'sources': [{'channels': [], 'name': 'name_example', 'parser': {'delimiter': 'delimiter_example', 'expression': 'expression_example', 'field_time_key': 'field_time_key_example', 'format': [], 'format_firstline': 'format_firstline_example', 'grok_failure_key': 'grok_failure_key_example', 'grok_name_key': 'grok_name_key_example', 'is_estimate_current_event': True, 'is_keep_time_key': True, 'is_null_empty_string': True, 'is_support_colonless_ident': True, 'is_with_priority': True, 'keys': [], 'message_format': 'RFC3164', 'message_key': 'message_key_example', 'multi_line_start_regexp': 'multi_line_start_regexp_example', 'null_value_pattern': 'null_value_pattern_example', 'parser_type': 'AUDITD', 'patterns': [{'field_time_format': 'field_time_format_example', 'field_time_key': 'field_time_key_example', 'field_time_zone': 'field_time_zone_example', 'name': 'name_example', 'pattern': 'pattern_example'}], 'rfc5424_time_format': 'rfc5424_time_format_example', 'syslog_parser_type': 'STRING', 'time_format': 'time_format_example', 'time_type': 'FLOAT', 'timeout_in_milliseconds': 56, 'types': {}}, 'paths': [], 'source_type': 'LOG_TAIL'}]}, 'time_created': '2013-10-20T19:20:30+01:00', 'time_last_modified': '2013-10-20T19:20:30+01:00'}
 
compartment_id
string
on success
The OCID of the compartment that the resource belongs to.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
configuration_state
string
on success
State of unified agent service configuration.

Sample:
VALID
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: `{"Operations": {"CostCenter": "42"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
description
string
on success
Description for this resource.

Sample:
description_example
 
display_name
string
on success
The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.

Sample:
display_name_example
 
freeform_tags
dictionary
on success
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: `{"Department": "Finance"}`

Sample:
{'Department': 'Finance'}
 
group_association
complex
on success

   
group_list
list / elements=string
on success
list of group/dynamic group ids associated with this configuration.

 
id
string
on success
The OCID of the resource.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_enabled
boolean
on success
Whether or not this resource is currently enabled.

Sample:
True
 
lifecycle_state
string
on success
The pipeline state.

Sample:
CREATING
 
service_configuration
complex
on success

   
configuration_type
string
on success
Type of Unified Agent service configuration.

Sample:
LOGGING
   
destination
complex
on success

     
log_object_id
string
on success
The OCID of the resource.

Sample:
ocid1.logobject.oc1..xxxxxxEXAMPLExxxxxx
   
sources
complex
on success

     
channels
list / elements=string
on success

     
name
string
on success
unique name for the source

Sample:
name_example
     
parser
complex
on success

       
delimiter
string
on success

Sample:
delimiter_example
       
expression
string
on success

Sample:
expression_example
       
field_time_key
string
on success
Specify time field for the event time. If the event doesn't have this field, the current time is used.

Sample:
field_time_key_example
       
format
list / elements=string
on success

       
format_firstline
string
on success

Sample:
format_firstline_example
       
grok_failure_key
string
on success

Sample:
grok_failure_key_example
       
grok_name_key
string
on success

Sample:
grok_name_key_example
       
is_estimate_current_event
boolean
on success
If true, use Fluent::EventTime.now(current time) as a timestamp when time_key is specified.

Sample:
True
       
is_keep_time_key
boolean
on success
If true, keep time field in the record.

Sample:
True
       
is_null_empty_string
boolean
on success
If true, an empty string field is replaced with nil.

Sample:
True
       
is_support_colonless_ident
boolean
on success

Sample:
True
       
is_with_priority
boolean
on success

Sample:
True
       
keys
list / elements=string
on success

       
message_format
string
on success

Sample:
RFC3164
       
message_key
string
on success

Sample:
message_key_example
       
multi_line_start_regexp
string
on success

Sample:
multi_line_start_regexp_example
       
null_value_pattern
string
on success
Specify the null value pattern.

Sample:
null_value_pattern_example
       
parser_type
string
on success
Type of fluent parser.

Sample:
AUDITD
       
patterns
complex
on success

         
field_time_format
string
on success
Process value using the specified format. This is available only when time_type is a string.

Sample:
field_time_format_example
         
field_time_key
string
on success
Specify the time field for the event time. If the event doesn't have this field, the current time is used.

Sample:
field_time_key_example
         
field_time_zone
string
on success
Use the specified time zone. The time value can be parsed or formatted in the specified time zone.

Sample:
field_time_zone_example
         
name
string
on success
The name key to tag this grok pattern.

Sample:
name_example
         
pattern
string
on success
The grok pattern.

Sample:
pattern_example
       
rfc5424_time_format
string
on success

Sample:
rfc5424_time_format_example
       
syslog_parser_type
string
on success

Sample:
STRING
       
time_format
string
on success

Sample:
time_format_example
       
time_type
string
on success

Sample:
FLOAT
       
timeout_in_milliseconds
integer
on success
Specify the timeout for parse processing. This is mainly for detecting an incorrect regexp pattern.

Sample:
56
       
types
dictionary
on success
Specify types for converting a field into another type.

     
paths
list / elements=string
on success

     
source_type
string
on success
Unified schema logging source type.

Sample:
LOG_TAIL
 
time_created
string
on success
Time the resource was created.

Sample:
2013-10-20T19:20:30+01:00
 
time_last_modified
string
on success
Time the resource was last modified.

Sample:
2013-10-20T19:20:30+01:00


Authors

  • Oracle (@oracle)