cisco.catalystcenter.site_health_info module -- Information module for Site Health

Note

This module is part of the cisco.catalystcenter collection (version 2.2.1).

To install it, use: ansible-galaxy collection install cisco.catalystcenter. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cisco.catalystcenter.site_health_info.

New in cisco.catalystcenter 3.1.0

Synopsis

  • Get all Site Health.

  • Returns Overall Health information for all sites.

Note

This module has a corresponding action plugin.

Requirements

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

  • catalystcentersdk >= 3.1.3.0.0

  • python >= 3.5

Parameters

Parameter

Comments

catc_api_port

integer

The Cisco Catalyst Center port.

Default: :ansible-option-default:`443`

catc_debug

boolean

Flag for Cisco Catalyst Center SDK to enable debugging.

Choices:

catc_host

string / required

The Cisco Catalyst Center hostname.

catc_password

string

The Cisco Catalyst Center password to authenticate.

catc_username

string

The Cisco Catalyst Center username to authenticate.

Default: :ansible-option-default:`"admin"`

catc_verify

boolean

Flag to enable or disable SSL certificate verification.

Choices:

catc_version

string

Informs the SDK which version of Cisco Catalyst Center to use.

Default: :ansible-option-default:`"2.3.7.6"`

headers

dictionary

Additional headers.

limit

float

Limit query parameter. Max number of data entries in the returned data set 1,50. Default is 25.

offset

float

Offset query parameter. Offset of the first returned data set entry (Multiple of 'limit' + 1).

siteType

string

SiteType query parameter. Site type AREA or BUILDING (case insensitive).

timestamp

float

Timestamp query parameter. Epoch time(in milliseconds) when the Site Hierarchy data is required.

validate_response_schema

boolean

Flag for Cisco Catalyst Center SDK to enable the validation of request bodies against a JSON schema.

Choices:

Notes

Note

  • SDK Method used are sites.Sites.get_site_health,

  • Paths used are get /dna/intent/api/v1/site-health,

  • Supports check_mode

  • The plugin runs on the control node and does not use any ansible connection plugins,

  • but instead uses the embedded connection manager from Cisco CATALYST SDK

See Also

See also

Cisco DNA Center documentation for Sites GetSiteHealth

Complete reference of the GetSiteHealth API.

Examples

---
- name: Get all Site Health
  cisco.catalystcenter.site_health_info:
    catc_host: "{{catc_host}}"
    catc_username: "{{catc_username}}"
    catc_password: "{{catc_password}}"
    catc_verify: "{{catc_verify}}"
    catc_api_port: "{{catc_api_port}}"
    catc_version: "{{catc_version}}"
    catc_debug: "{{catc_debug}}"
    headers: "{{my_headers | from_json}}"
    siteType: string
    offset: 0
    limit: 0
    timestamp: 0
  register: result

Return Values

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

Key

Description

dnac_response

list / elements=dictionary

A dictionary or list with the response returned by the Cisco CATALYST Python SDK

Returned: always

Sample: :ansible-rv-sample-value:`"[\\n {\\n \\"siteName\\": \\"string\\",\\n \\"siteId\\": \\"string\\",\\n \\"parentSiteId\\": \\"string\\",\\n \\"parentSiteName\\": \\"string\\",\\n \\"siteType\\": \\"string\\",\\n \\"latitude\\": 0,\\n \\"longitude\\": 0,\\n \\"healthyNetworkDevicePercentage\\": 0,\\n \\"healthyClientsPercentage\\": 0,\\n \\"clientHealthWired\\": 0,\\n \\"clientHealthWireless\\": 0,\\n \\"numberOfClients\\": 0,\\n \\"numberOfNetworkDevice\\": 0,\\n \\"networkHealthAverage\\": 0,\\n \\"networkHealthAccess\\": 0,\\n \\"networkHealthCore\\": 0,\\n \\"networkHealthDistribution\\": 0,\\n \\"networkHealthRouter\\": 0,\\n \\"networkHealthWireless\\": 0,\\n \\"networkHealthAP\\": 0,\\n \\"networkHealthWLC\\": 0,\\n \\"networkHealthSwitch\\": 0,\\n \\"networkHealthOthers\\": 0,\\n \\"numberOfWiredClients\\": 0,\\n \\"numberOfWirelessClients\\": 0,\\n \\"totalNumberOfConnectedWiredClients\\": 0,\\n \\"totalNumberOfActiveWirelessClients\\": 0,\\n \\"wiredGoodClients\\": 0,\\n \\"wirelessGoodClients\\": 0,\\n \\"overallGoodDevices\\": 0,\\n \\"accessGoodCount\\": 0,\\n \\"accessTotalCount\\": 0,\\n \\"coreGoodCount\\": 0,\\n \\"coreTotalCount\\": 0,\\n \\"distributionGoodCount\\": 0,\\n \\"distributionTotalCount\\": 0,\\n \\"routerGoodCount\\": 0,\\n \\"routerTotalCount\\": 0,\\n \\"wirelessDeviceGoodCount\\": 0,\\n \\"wirelessDeviceTotalCount\\": 0,\\n \\"apDeviceGoodCount\\": 0,\\n \\"apDeviceTotalCount\\": 0,\\n \\"wlcDeviceGoodCount\\": 0,\\n \\"wlcDeviceTotalCount\\": 0,\\n \\"switchDeviceGoodCount\\": 0,\\n \\"switchDeviceTotalCount\\": 0,\\n \\"applicationHealth\\": 0,\\n \\"applicationHealthInfo\\": [\\n {\\n \\"trafficClass\\": \\"string\\",\\n \\"bytesCount\\": 0,\\n \\"healthScore\\": 0\\n }\\n ],\\n \\"applicationGoodCount\\": 0,\\n \\"applicationTotalCount\\": 0,\\n \\"applicationBytesTotalCount\\": 0,\\n \\"dnacInfo\\": {\\n \\"uuid\\": \\"string\\",\\n \\"ip\\": \\"string\\",\\n \\"status\\": \\"string\\"\\n },\\n \\"usage\\": 0,\\n \\"applicationHealthStats\\": {\\n \\"appTotalCount\\": 0,\\n \\"businessRelevantAppCount\\": {\\n \\"poor\\": 0,\\n \\"fair\\": 0,\\n \\"good\\": 0\\n },\\n \\"businessIrrelevantAppCount\\": {\\n \\"poor\\": 0,\\n \\"fair\\": 0,\\n \\"good\\": 0\\n },\\n \\"defaultHealthAppCount\\": {\\n \\"poor\\": 0,\\n \\"fair\\": 0,\\n \\"good\\": 0\\n }\\n }\\n }\\n]\\n"`

Authors

  • Rafael Campos (@racampos)