The sample Microsoft Windows PowerShell script listed in this repository demonstrates how to automate checking the network availability of a targeted system and send an email alert if the system is unresponsive. This can be useful for scenarios that require quickly pre-checking a system's network availability before performing further automation or where a standalone network monitoring platform is unavailable.
The sample PowerShell script named systems_check.ps1 demonstrates how to perform the following primary actions:
- Obtain information on targeted systems from a specified system XML file.
- Check availability of targeted systems by attempting to ping the device on the network.
- Send an email alert to specified parties if the ping attempt failed on the targeted system.
The sample XML file named system1.xml demonstrates how to setup targeted system information for the systems_check.ps1 script. In the sample system1.xml file, the following information has been provided for three clustered server nodes that will be monitored:
- Cluster Name
- Data Center Location
- Connected Top of the Rack (TOR) Switch
- Server Node Name
- Server Hardware Serial Number
- Server IP Address
- Microsoft Windows PowerShell.
- A reachable SMTP Server.
- [Optional] Task Scheduler on Microsoft Windows or a similar equivalent for creating a scheduled task/job to run the systems availability check on a set interval.
A modified version of the systems_check.ps1 script is part of the automation used to support and enable the following Cisco Data Center product demonstrations on Cisco dCloud:
- Cisco HyperFlex Edge with Intersight v1
- Cisco Unified Computing System 4.0 v1
- Cisco UCS Management with Intersight v1
- Cisco UCS 4.0 with Kubernetes - (KUBaM) v1
- Cisco UCS Central 2.0 v1
- Cisco UCS Central 2.0 Lab v1
- Cisco UCS Programmability and Automation Lab v1
Cisco dCloud is available at https://dcloud.cisco.com, where product demonstrations and labs can be found in the Catalog.
Ugo Emekauwa