{"id":28751128,"url":"https://github.com/theoneoh1/ping-energy","last_synced_at":"2026-05-08T00:43:53.978Z","repository":{"id":299420712,"uuid":"1002970665","full_name":"TheOneOh1/ping-energy","owner":"TheOneOh1","description":"Simple bash script to check multiple VM availability using PING","archived":false,"fork":false,"pushed_at":"2025-06-16T12:56:27.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T00:43:25.098Z","etag":null,"topics":["bash","linux","ping","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheOneOh1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T12:27:04.000Z","updated_at":"2026-04-03T11:37:19.000Z","dependencies_parsed_at":"2025-06-16T14:06:20.310Z","dependency_job_id":null,"html_url":"https://github.com/TheOneOh1/ping-energy","commit_stats":null,"previous_names":["theoneoh1/ping-energy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheOneOh1/ping-energy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOneOh1%2Fping-energy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOneOh1%2Fping-energy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOneOh1%2Fping-energy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOneOh1%2Fping-energy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheOneOh1","download_url":"https://codeload.github.com/TheOneOh1/ping-energy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOneOh1%2Fping-energy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32762284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","linux","ping","shell-script"],"created_at":"2025-06-16T22:09:23.496Z","updated_at":"2026-05-08T00:43:53.951Z","avatar_url":"https://github.com/TheOneOh1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ping-energy\nSimple bash script to check multiple VM availability using PING\n\n## Why?\n- All of our organisation's VMs are hosted on-premises. One day, due to a SMPS issue, connection to storage unit, server was lost and all the VMs went down.\n- It was a hassle to check each VM manually. \n- The issue was resolved for the day, however, the very next day, the same issue occurred again but this time it was due to a power outage.\n- Again, I had to manually check each VM to see which ones were up and which ones were down.\n- This led to a lot of wasted time and effort, especially when there are many VMs to check.\n- So, I wrote this script to automate the process of checking VM availability.\n- I know its a simple and stupid script, probably no one except me will ever use this, but I thought it might help someone else in a similar situation.\n\n## Features\n\n- Reads a list of VM hostnames or IP addresses from `VM_hosts.txt`\n- Pings each host to check availability\n- Reports whether each VM is up or down\n\n## Usage\n\n1. Add the IP addresses or hostnames of your VMs to a file named `VM_hosts.txt`, one per line.\n2. Run the script:\n    ```bash\n    bash ping-energy.sh\n    ```\n3. The script will output the status (up/down) for each VM.\n\n## Example `VM_hosts.txt`\n\n```\n192.168.1.10\nserver1.example.com\n10.0.0.5\n```\n\n## Output Example\n\n```\n-----------------------------------------\nHost file found. Initiating check...\n-----------------------------------------\n✓ UP: 192.168.1.10\n✗ DOWN: server1.example.com\n✓ UP: 10.0.0.5\n```\n\n## Requirements\n\n- Bash shell\n- `ping` utility available on your system\n\n## Future Scope\n\nThe following enhancements are planned or suggested for future versions:\n\n- **Parallelization:** Speed up host checks by pinging multiple hosts in parallel.\n- **Logging:** Save results to a log file with timestamps for auditing and troubleshooting.\n- **Summary Report:** Display a summary at the end, showing total hosts checked and how many are UP or DOWN.\n- **Customizable Hosts File:** Allow specifying the hosts file as a command-line argument.\n- **Configurable Ping Options:** Enable users to set the number of pings and timeout via arguments or environment variables.\n- **Host Comment Support:** Ignore lines starting with `#` or blank lines in the hosts file.\n- **Email/Notification Integration:** Optionally send notifications if any host is DOWN.\n- **IPv6 Support:** Add support for IPv6 addresses using `ping6`.\n- **Verbose/Quiet Modes:** Add flags for more or less detailed output.\n- **Dependency Checks:** Ensure required commands like `ping` are available before running.\n- **Web Dashboard:** Visualize host status in a web UI.\n- **Integration with Monitoring Tools:** Export results to monitoring systems like Prometheus or Nagios.\n- **Scheduling:** Support running as a scheduled job (e.g., via cron) and alert on status changes.\n- **Auto-remediation:** Trigger scripts or actions automatically if a host is detected as down.\n\nContributions and suggestions are welcome!\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoneoh1%2Fping-energy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheoneoh1%2Fping-energy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoneoh1%2Fping-energy/lists"}