Skip to content

ansible-network/network.healthchecks

Repository files navigation

Ansible Network Health Checks

CI OpenSSF Best Practices

About

  • 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.

Requirements

Installation

To consume this Validated Content from Automation Hub, add the following to your ansible.cfg:

Installation

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

Use Cases

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

Testing

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]

Contributing

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:

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release notes

Release notes are available here.

Related information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

This repository contains Network health Checks Collections

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published