{"id":29539665,"url":"https://github.com/harinineon/devops_project_1","last_synced_at":"2026-04-11T02:33:08.028Z","repository":{"id":303447251,"uuid":"1015524289","full_name":"Harinineon/DevOps_Project_1","owner":"Harinineon","description":"Bash script that tracks and logs AWS EC2 instance health (memory, CPU, disk, network, processes) and pushes logs to GitHub with email alerts using AWS SES. Designed for manual execution with log versioning and automation-ready structure.","archived":false,"fork":false,"pushed_at":"2025-07-07T16:41:03.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T17:59:03.577Z","etag":null,"topics":["automation","aws","aws-ec2","aws-ses","bash-script","devops","devops-tools","git","github","scripting","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/Harinineon.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-07-07T16:22:02.000Z","updated_at":"2025-07-07T16:43:27.000Z","dependencies_parsed_at":"2025-07-07T17:59:07.200Z","dependency_job_id":"facc1331-1e2e-44fc-8cfc-05ce21de8e71","html_url":"https://github.com/Harinineon/DevOps_Project_1","commit_stats":null,"previous_names":["harinineon/devops_project_1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Harinineon/DevOps_Project_1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harinineon%2FDevOps_Project_1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harinineon%2FDevOps_Project_1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harinineon%2FDevOps_Project_1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harinineon%2FDevOps_Project_1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harinineon","download_url":"https://codeload.github.com/Harinineon/DevOps_Project_1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harinineon%2FDevOps_Project_1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265575530,"owners_count":23790784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["automation","aws","aws-ec2","aws-ses","bash-script","devops","devops-tools","git","github","scripting","shell-script"],"created_at":"2025-07-17T07:08:38.780Z","updated_at":"2025-10-25T08:39:51.081Z","avatar_url":"https://github.com/Harinineon.png","language":"Shell","readme":"# 🖥️ EC2 Resource Tracker\n\nA simple yet powerful bash-based monitoring tool that logs system diagnostics (memory, disk, CPU, network, processes, etc.) from an AWS EC2 instance.\nEach time you run the script manually, it:\n- Saves the output to a timestamped log file\n- Commits and pushes the log file to a GitHub repository (https://github.com/Harinineon/EC2_Resource_Tracker.git)\n- Sends an email alert confirming log creation\n\n## 📌 Features\n\n- Logs system health stats in a human-readable format\n- Automatically names logs as \"resource_tracker_\u003cn\u003e.log\" based on the file count\n- Sends an email notification upon each execution\n- Pushes logs to a remote GitHub repository\n\n## 📂 Sample Output Structure\n\nresource_tracker_1.log\nresource_tracker_2.log\n...(In the github repo)\n\nEach log contains:\n\n- Memory usage (free -h)\n- Disk space (df -h)\n- Inode usage (df -i)\n- CPU architecture and stats (lscpu)\n- Network interface info (ip addr)\n- Top processes snapshot (top)\n- Last 10 kernel log entries (dmesg)\n- Timestamps and host info\n\n## 🛠️ Prerequisites\n\nEnsure your EC2 instance has:\n\n- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html) installed and configured (aws configure)\n- Git installed\n- AWS SES verified (sender and receiver emails)\n- Internet access to push logs to GitHub and send emails\n\n## ⚙️ Setup Instructions\n\n### 1. GitHub Repository Setup\n\nbash:\ngit init\ngit remote add origin https://github.com/\u003cyour-username\u003e/\u003cyour-repo\u003e.git\n\n### 2. Upload and Make Script Executable\n\nSave the bash script as \"resource_tracker.sh\" and make it executable:\n\nbash:\nchmod +x resource_tracker.sh\n\n### 3. Configure AWS CLI (if not done already)\n\nbash:\naws configure\n\n### 4. SES Email Setup\n\nEnsure you verify both the sender and recipient emails in AWS SES. I have used the same mail id for both.\n\nIn the script, configure the same\n\n## ▶️ How to Run\n\nRun the script manually:\n\nbash:\n./resource_tracker.sh\n\nA new log file will be created and pushed to GitHub. An email will be sent confirming the action.\n\n## 📖 Explanation of Key Commands Used\n----------------------------------------------------------------------\n| Command             | Purpose                                      |\n|---------------------|----------------------------------------------|\n| free -h             | Displays memory usage in human-readable form |\n| df -h               | Displays disk space usage                    |\n| df -i               | Shows inode availability                     |\n| lscpu               | CPU architecture and stats                   |\n| ip addr             | Shows network interface and IP info          |\n| top -b -n 1         | Snapshot of top processes (batch mode)       |\n| dmesg tail          | Shows last 10 kernel logs                    |\n| aws ses send-email  | Sends an email alert using AWS SES           |\n| git add/commit/push | Commits log and pushes to GitHub             |\n----------------------------------------------------------------------\n\n## 📧 Example Email Sent\n\n\u003e **Subject:** ✅ EC2 Resource Log #1 Created  \n\u003e **Body:** Log #1 was created on ip-X.X.X.X at 2025-07-07 14:00:00\n\n## 🙋‍♂️ Contact\n\nFor queries or contributions, feel free to connect via [LinkedIn](https://www.linkedin.com/in/shree-harini-km?utm_source=share\u0026utm_campaign=share_via\u0026utm_content=profile\u0026utm_medium=android_app) or raise an issue in the GitHub repo.\n\n## 📎 License\n\nThis project is licensed under the [MIT License](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharinineon%2Fdevops_project_1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharinineon%2Fdevops_project_1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharinineon%2Fdevops_project_1/lists"}