- Ansible Network Health Checks Collection provides platform-agnostic roles to perform automated health checks across various network devices.
- The collection includes capabilities for performing network device health, detecting failures, and recommending proactive maintenance.
- Designed for network administrators, automation engineers, and IT professionals, this collection enhances network visibility, operational monitoring, and configuration validation.
- Requires Ansible
- Requires Content Collections
- Testing Requirements
- Users need to include platform-specific collections as per their requirements:
To consume this Validated Content from Automation Hub, add the following to your ansible.cfg
:
To consume this Validated Content from Automation Hub, the following needs to be added to ansible.cfg:
[galaxy]
server_list = automation_hub
[galaxy_server.automation_hub]
url=https://console.redhat.com/api/automation-hub/content/validated/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<SuperSecretToken>
Utilize the current Token, and if the token has expired, obtain the necessary token from the Automation Hub Web UI.
With this configured, simply run the following commands:
ansible-galaxy collection install network.healthchecks
ansible-galaxy collection install network.bgp
CPU Status
:
- Check CPU utilization to identify excessive resource consumption that may lead to performance degradation.
Memory Status
:
- Track memory usage to detect leaks or abnormal consumption that could impact system stability. Ensure optimal memory allocation for smooth network operations.
Environment Status
: Check environmental factors like temperature and power supply to prevent hardware failures. Detect deviations from normal conditions.
File System Status
: Ensure sufficient disk space and check for file system errors that may affect operations. This helps to prevent storage-related failures by monitoring file system health.
Unexpected Crash Files
: This enables users to identify unexpected core dumps and crash logs that indicate system instability. Provide early detection of software or hardware failures for faster troubleshooting.
System Uptime
: This enables users to track system uptime to detect unexpected reboots or device restarts.
Interfaces Status
: This enables users to run health checks on network interfaces
The project uses tox to run ansible-lint
and ansible-test sanity
.
Assuming this repository is checked out in the proper structure,
e.g. collections_root/ansible_collections/network/bgp
, run:
tox -e ansible-lint
tox -e py39-sanity
To run integration tests, ensure that your inventory has a network_bgp
group.
Depending on what test target you are running, comment out the host(s).
[network_hosts]
ios
junos
[ios:vars]
< enter inventory details for this group >
[junos:vars]
< enter inventory details for this group >
ansible-test network-integration -i /path/to/inventory --python 3.9 [target]
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this repository.
Don't know how to start? Refer to the Ansible community guide!
Want to submit code changes? Take a look at the Quick-start development guide.
We also use the following guidelines:
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes are available here.
- Developing network resource modules
- Ansible Networking docs
- Ansible Collection Overview
- Ansible Roles overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community Code of Conduct
GNU General Public License v3.0 or later.
See LICENSE to see the full text.