cisco.nd.nd_epoch (0.5.0) — module

Query epoch data from Cisco Nexus Dashboard Insights (NDI)

| "added in version" 0.3.0 of cisco.nd"

Authors: Akini Ross (@akinross)

preview | supported by community

Install collection

Install with ansible-galaxy collection install cisco.nd:==0.5.0


Add to requirements.yml

  collections:
    - name: cisco.nd
      version: 0.5.0

Description

Query epoch data from Cisco Nexus Dashboard Insights (NDI).

M(cisco.nd.nd_epoch) can only be used with python 3.7 and higher.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the latest epoch id
  cisco.nd.nd_epoch:
    insights_group: igName
    site: siteName
    period: latest
  register: query_results
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the epoch id from period
  cisco.nd.nd_epoch:
    insights_group: igName
    site: siteName
    period: last_week
  register: period_last_week
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all epoch ids from last week
  cisco.nd.nd_epoch:
    insights_group: igName
    site: siteName
    period: last_week
    range: true
  register: period_last_week
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get 3 epoch ids from last week closest to latest
  cisco.nd.nd_epoch:
    insights_group: igName
    site: siteName
    period: last_week
    range: true
    max_epochs: 3
  register: period_last_week
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get all epoch ids from date range
  cisco.nd.nd_epoch:
    insights_group: igName
    site: siteName
    from_date: 2023-01-01T10:00:00
    to_date: 2023-01-02T14:00:00
    range: true
  register: period_last_week

Inputs

    
host:
    aliases:
    - hostname
    description:
    - IP Address or hostname of the Nexus Dashboard (ND) host.
    - If the value is not specified in the task, the value of environment variable C(ND_HOST)
      will be used instead.
    type: str

port:
    description:
    - Port number to be used for the REST connection.
    - The default value depends on parameter `use_ssl`.
    - If the value is not specified in the task, the value of environment variable C(ND_PORT)
      will be used instead.
    type: int

site:
    description:
    - Names of the Assurance Entity.
    required: true
    type: str

range:
    default: false
    description:
    - Return a range of epoch IDs or just 1.
    type: bool

period:
    choices:
    - latest
    - last_15_min
    - last_hour
    - last_2_hours
    - last_6_hours
    - last_day
    - last_week
    description:
    - Epoch period.
    type: str

timeout:
    default: 30
    description:
    - The socket level timeout in seconds.
    - If the value is not specified in the task, the value of environment variable C(ND_TIMEOUT)
      will be used instead.
    type: int

to_date:
    description:
    - String representing the date and time in ISO 8601 format "YYYY-MM-DDTHH:MM:SS".
    - Minimum required input is "YYYY-MM-DD".
    type: str

use_ssl:
    description:
    - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
    - If the value is not specified in the task, the value of environment variable C(ND_USE_SSL)
      will be used instead.
    type: bool

password:
    description:
    - The password to use for authentication.
    - If the value is not specified in the task, the value of environment variables C(ND_PASSWORD)
      or C(ANSIBLE_NET_PASSWORD) will be used instead.
    type: str

username:
    description:
    - The username to use for authentication.
    - If the value is not specified in the task, the value of environment variables C(ND_USERNAME)
      or C(ANSIBLE_NET_USERNAME) will be used instead.
    type: str

from_date:
    description:
    - String representing the date and time in ISO 8601 format "YYYY-MM-DDTHH:MM:SS".
    - Minimum required input is "YYYY-MM-DD".
    type: str

use_proxy:
    description:
    - If C(no), it will not use a proxy, even if one is defined in an environment variable
      on the target hosts.
    - If the value is not specified in the task, the value of environment variable C(ND_USE_PROXY)
      will be used instead.
    type: bool

max_epochs:
    description:
    - When range is selected, max amount epoch IDs to be returned.
    type: int

login_domain:
    description:
    - The login domain name to use for authentication.
    - The default value is DefaultAuth.
    - If the value is not specified in the task, the value of environment variable C(ND_LOGIN_DOMAIN)
      will be used instead.
    type: str

output_level:
    choices:
    - debug
    - info
    - normal
    default: normal
    description:
    - Influence the output of this ND module.
    - C(normal) means the standard output, incl. C(current) dict
    - C(info) adds informational output, incl. C(previous), C(proposed) and C(sent) dicts
    - C(debug) adds debugging output, incl. C(filter_string), C(method), C(response),
      C(status) and C(url) information
    - If the value is not specified in the task, the value of environment variable C(ND_OUTPUT_LEVEL)
      will be used instead.
    type: str

insights_group:
    aliases:
    - fab_name
    - ig_name
    description:
    - The name of the insights group.
    required: true
    type: str

validate_certs:
    description:
    - If C(no), SSL certificates will not be validated.
    - This should only set to C(no) when used on personally controlled sites using self-signed
      certificates.
    - If the value is not specified in the task, the value of environment variable C(ND_VALIDATE_CERTS)
      will be used instead.
    type: bool