{"id":28858033,"url":"https://github.com/itsalexik/corewatch","last_synced_at":"2026-05-06T06:32:15.569Z","repository":{"id":296875944,"uuid":"994793365","full_name":"ItsAlexIK/CoreWatch","owner":"ItsAlexIK","description":"Real-time Raspberry Pi system stats in Discord via embeds – CPU, RAM, disk, uptime \u0026 more.","archived":false,"fork":false,"pushed_at":"2025-09-06T19:53:27.000Z","size":226,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T21:35:16.727Z","etag":null,"topics":["discord-bot","discordjs","hardware-monitoring","linux-monitoring","nodejs","performance-monitor","raspberry-pi","real-time-status","system-monitoring","systeminformation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItsAlexIK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T13:44:54.000Z","updated_at":"2025-09-06T19:53:30.000Z","dependencies_parsed_at":"2025-06-03T04:16:49.865Z","dependency_job_id":"81889fbf-acba-4fc8-8a4a-449b7cd4aac8","html_url":"https://github.com/ItsAlexIK/CoreWatch","commit_stats":null,"previous_names":["itsalexik/corewatch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ItsAlexIK/CoreWatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsAlexIK%2FCoreWatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsAlexIK%2FCoreWatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsAlexIK%2FCoreWatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsAlexIK%2FCoreWatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsAlexIK","download_url":"https://codeload.github.com/ItsAlexIK/CoreWatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsAlexIK%2FCoreWatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277483295,"owners_count":25825560,"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","status":"online","status_checked_at":"2025-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["discord-bot","discordjs","hardware-monitoring","linux-monitoring","nodejs","performance-monitor","raspberry-pi","real-time-status","system-monitoring","systeminformation"],"created_at":"2025-06-20T02:04:31.429Z","updated_at":"2026-05-06T06:32:15.559Z","avatar_url":"https://github.com/ItsAlexIK.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🖥️ Discord System Monitor Bot\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Build and Publish Docker Image](https://github.com/ItsAlexIK/CoreWatch/actions/workflows/docker-publish.yml/badge.svg?branch=main)](https://github.com/ItsAlexIK/CoreWatch/actions/workflows/docker-publish.yml)\n\nA lightweight Discord bot designed to monitor system stats from a Raspberry Pi 5 (or any Linux-based machine). The bot periodically sends a live system status update to a selected Discord channel, including CPU load, memory usage, temperature, disk usage, and uptime.\n\n## ✨ Features\n\n- Live system stats updated in real time\n- Details include:\n  - 🧠 RAM usage\n  - 🔥 CPU temperature\n  - ⚙️ CPU usage\n  - 💾 Disk space used\n  - ⏱️ System uptime\n  - `/htop` command to display an interactive process list directly in Discord (like the Linux `htop`)\n  - `/pidinfo` command to display detailed PID information (PID, PPID, user, CPU %, MEM %, uptime, command)\n\n ![Status](.github/assets/status.png)\n\n## 💻 `/htop` Command\n\nUse the `/htop` command to view a live list of the most resource-intensive processes on your machine.\n\n- Shows unique processes sorted by CPU usage\n- Displays:\n  - 🔹 PID\n  - 🖥️ CPU usage\n  - 📊 Memory usage\n- Includes interactive buttons to navigate between pages\n- Output is styled to be Discord-friendly and readable\n\n![Active processes](.github/assets/htop-preview.png)\n## 🔍 `/pidinfo` Command\n\nUse the `/pidinfo` command to inspect a specific process by PID.\n\n- Displays:\n  - 🔹 PID\n  - 🔗 PPID\n  - 👤 User\n  - 🖥️ CPU usage\n  - 📊 Memory usage\n  - ⏱️ Uptime\n  - 📝 Command\n\n\n![PID Info](.github/assets/pidinfo.png)\n\n## 🛡️ Permission Restriction for `/htop` and `/pidinfo` Commands\n\nThe `/htop` command is restricted to a specific Discord user ID for security reasons. Only the designated user can run this command to view system processes.\n\nTo specify who can run the command, set the environment variables `ALLOWED_USER_ID` and/or `ALLOWED_ROLE_ID` in your .env file (logical OR if both are set).\n\n## 📦 Requirements\n\n- Node.js 18 or higher\n- A Discord bot token\n- A Raspberry Pi 5 (or any Linux system with `/proc` access)\n\n## 🔧 Setup\n\n### Option A: Docker (prebuilt image)\n\n```bash\n# Pull the latest image\ndocker pull ghcr.io/itsalexik/corewatch:latest\n\n# Run with required environment variables (set your real values)\ndocker run -d --name corewatch --restart unless-stopped \\\n  --pid=host \\\n  -v /proc:/proc:ro \\\n  -e DISCORD_TOKEN=your_discord_bot_token \\\n  -e DISCORD_CHANNEL_ID=your_channel_id \\\n  -e DISCORD_GUILD_ID=your_guild_id \\\n  -e DISCORD_CLIENT_ID=your_client_id \\\n  -e ALLOWED_USER_ID=allowed_user_id_optional \\\n  -e ALLOWED_ROLE_ID=allowed_role_id_optional \\\n  ghcr.io/itsalexik/corewatch:latest\n```\n\n### Option B: Docker (build locally)\n\n```bash\ngit clone https://github.com/ItsAlexIK/CoreWatch\ncd CoreWatch\ndocker build -t corewatch .\n\ndocker run -d --name corewatch --restart unless-stopped \\\n  --pid=host \\\n  -v /proc:/proc:ro \\\n  -e DISCORD_TOKEN=your_discord_bot_token \\\n  -e DISCORD_CHANNEL_ID=your_channel_id \\\n  -e DISCORD_GUILD_ID=your_guild_id \\\n  -e DISCORD_CLIENT_ID=your_client_id \\\n  -e ALLOWED_USER_ID=allowed_user_id_optional \\\n  -e ALLOWED_ROLE_ID=allowed_role_id_optional \\\n  corewatch\n```\n\n### Option C: Run from source\n\n```bash\ngit clone https://github.com/ItsAlexIK/CoreWatch.git\ncd CoreWatch\nnpm install\n\n# Copy env template and fill in your values\ncp .env.example .env\n# Open .env and fill in your values\n\n# Start the bot\nnode index.js\n```\n\n## 🚀 Auto-run at Startup (from source)\n\nSet the bot to start automatically on boot.\n\n1. Create the service file  \n```\nsudo nano /etc/systemd/system/corewatch.service\n```\n\n2. Paste and adjust (set WorkingDirectory, ExecStart path to your Node binary if different, and User)\n```\n[Unit]\nDescription=CoreWatch Discord Bot\nAfter=network.target\n\n[Service]\nWorkingDirectory=/root/CoreWatch\nExecStart=/usr/bin/node index.js\nRestart=always\nUser=root\nEnvironment=NODE_ENV=production\n\n[Install]\nWantedBy=multi-user.target\n```\n\n3. Enable and start the service\n```\nsudo systemctl daemon-reload\nsudo systemctl enable corewatch.service\nsudo systemctl start corewatch.service\n```\n\n4. Verify it is running\n```\nsystemctl status corewatch.service\n```\n\n5. View logs (Ctrl+C to exit)\n```\njournalctl -u corewatch.service -f\n```\n\nTo stop:\n```\nsudo systemctl stop corewatch.service\n```\n\nTo restart after changes:\n```\nsudo systemctl restart corewatch.service\n```\n\n\n## 📬 Connect \n\n- [Discord](https://discord.com/users/551023598203043840)\n- [GitHub](https://github.com/ItsAlexIK)\n\n---\n\n\u003e Made with ❤️ by ItsAlexIK \u0026 Kf637\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsalexik%2Fcorewatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsalexik%2Fcorewatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsalexik%2Fcorewatch/lists"}