{"id":21731412,"url":"https://github.com/thisuxhq/metron","last_synced_at":"2025-04-13T00:26:38.510Z","repository":{"id":250217720,"uuid":"832879243","full_name":"thisuxhq/metron","owner":"thisuxhq","description":"Metron is a Rust-based server monitoring tool that sends server metrics to a Discord channel via a webhook. It provides insights into CPU usage, memory usage, disk usage, network traffic, and system load.","archived":false,"fork":false,"pushed_at":"2024-07-26T16:20:30.000Z","size":100,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T18:21:45.811Z","etag":null,"topics":["devops","discord","discord-bot","metron","network-monitoring","rust","rust-lang","server","server-metrics","servermonitor","thisux"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/thisuxhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-07-23T23:09:23.000Z","updated_at":"2025-02-04T02:41:19.000Z","dependencies_parsed_at":"2024-11-26T04:47:49.794Z","dependency_job_id":null,"html_url":"https://github.com/thisuxhq/metron","commit_stats":null,"previous_names":["thisuxhq/metrics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisuxhq%2Fmetron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisuxhq%2Fmetron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisuxhq%2Fmetron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisuxhq%2Fmetron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisuxhq","download_url":"https://codeload.github.com/thisuxhq/metron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650568,"owners_count":21139665,"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":["devops","discord","discord-bot","metron","network-monitoring","rust","rust-lang","server","server-metrics","servermonitor","thisux"],"created_at":"2024-11-26T04:25:47.785Z","updated_at":"2025-04-13T00:26:38.490Z","avatar_url":"https://github.com/thisuxhq.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metron\n\n**Metron** is a Rust-based server monitoring tool that sends server metrics to a Discord channel via a webhook. It provides insights into CPU usage, memory usage, disk usage, network traffic, and system load.\n\n\u003c!-- show image --\u003e\n![Metron](/assets/metron.jpeg)\n\n## Features\n\n- 📊 **CPU Usage**: Monitor CPU usage.\n- 🧠 **Memory Usage**: Track RAM usage and available memory.\n- 💾 **Disk Usage**: Check disk space used and available.\n- 🌐 **Network Traffic**: Measure data sent and received.\n- 📈 **System Load**: Report server load averages.\n  \n## Why Rust?\n\nWe chose Rust for Metron because of its excellent performance and reliability. Here are some key reasons:\n\n- 🧠 **Memory Efficiency**: Metron uses minimal memory, peaking at just 9.1MB.\n- ⚡ **CPU Usage**: The service efficiently utilizes CPU, consuming only about 2.737 seconds of CPU time.\n\nRust's performance, safety, and efficiency make it an ideal choice for building a reliable and fast server monitoring tool like Metron.\n\n\n## Prerequisites\n\n- A Hetzner server or any Linux-based server.\n- Rust installed on the server.\n- `systemd` for service management.\n- A Discord webhook URL for sending metrics.\n\n## Installation\n\n### 1. Install Rust\n\nIf Rust is not installed, use these commands:\n\n```sh\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\nsource $HOME/.cargo/env\n```\n\n### 2. Clone the Repository\n\nClone this repository to your server:\n\n```sh\ngit clone https://github.com/THISUXHQ/metron.git\ncd metron\n```\n\n### 3. Build the Project\n\nBuild the Rust project:\n\n```sh\ncargo build --release\n```\n\n### 4. Configure the Service\n\nCreate and set up the `metron.service` file:\n\n```sh\nsudo nano /etc/systemd/system/metron.service\n```\n\nAdd this content, replacing placeholders with your actual paths and username:\n\n```ini\n[Unit]\nDescription=Server Metrics Monitor\nAfter=network.target\n\n[Service]\nExecStart=/home/yourusername/metron/target/release/metron\nRestart=always\nUser=yourusername\nEnvironment=RUST_LOG=info\n\n[Install]\nWantedBy=multi-user.target\n```\n\n### 5. Enable and Start the Service\n\nReload `systemd`, enable, and start the service:\n\n```sh\nsudo systemctl daemon-reload\nsudo systemctl enable metron.service\nsudo systemctl start metron.service\n```\n\n### 6. Verify the Service\n\nCheck if the service is running:\n\n```sh\nsudo systemctl status metron.service\n```\n\nSee real-time logs:\n\n```sh\njournalctl -u metron.service -f\n```\n\n### 7. Stopping the Service\n\nTo stop the service, use:\n\n```sh\nsudo systemctl stop metron.service\n```\n\n### 8. Disabling the Service\n\nTo stop it from starting at boot:\n\n```sh\nsudo systemctl disable metron.service\n```\n\n## Configuration\n\nEdit the `src/main.rs` file to set your Discord webhook URL:\n\n```rust\nlet webhook_url = \"YOUR_DISCORD_WEBHOOK_URL\"; // Replace with your Discord webhook URL\n```\n\n## Contributing\n\nFeel free to open issues and submit pull requests. We welcome contributions!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/THISUXHQ/metron?tab=MIT-1-ov-file) file for details.\n\n## Contact\n\nFor questions or feedback, email [sanju](mailto:work@sanju.sh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisuxhq%2Fmetron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisuxhq%2Fmetron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisuxhq%2Fmetron/lists"}