1 unstable release
0.1.1 | Dec 1, 2024 |
---|
#1015 in Development tools
145 downloads per month
48KB
1K
SLoC
📊📲 telog
📊📲 telog is an aggregate logs from multiple sources and send real-time notifications to Telegram for efficient monitoring.
🛠️ Building
If you need to build Telog manually, follow these steps:
- Clone the repository:
git clone git@github.com:trinhminhtriet/telog.git
-
Choose the features you want:
bin_core
- Required for all log sourcesls_counter
- Counter log sourcels_filesystem
- Filesystem log sourcels_journald
- Journald log sourcels_docker
- Docker log source
-
Build the project with the selected features:
cargo build --release --features=bin_core,ls_filesystem
Making .deb
package 📦
- Install
cargo-deb
:
cargo install cargo-deb
-
Edit
package.metadata.deb.features
inCargo.toml
. -
Build the package:
cargo deb
- Use the generated package:
target/debian/telog_..._amd64.deb
Making .rpm
package 📦
- Install
cargo-generate-rpm
:
cargo install cargo-generate-rpm
- Build the project:
cargo build --release --features=bin_core,...
- Strip debug symbols:
strip -s target/release/telog
- Build the package:
cargo generate-rpm
- Use the generated package:
target/generate-rpm/telog-...x86_64.rpm
🗑️ Uninstallation
Running the below command will globally uninstall the telog
binary.
cargo uninstall telog
Remove the project repo
rm -rf /path/to/git/clone/telog
🚀 Usage
-
Create a Telegram bot via @BotFather 🤖
-
Download the latest Telog release from GitHub 📥
-
Install it:
- For
.deb
based Linux:
sudo dpkg -i telog-...amd64.deb
- For
.rpm
based Linux:
sudo rpm -i telog-...x86_64.rpm
-
Find out the chat ID with your bot (see chat_id.md for details) 🆔
-
Change the configuration file (
/etc/telog.yaml
in Linux) (see config.md for details) ⚙️ -
Run Telog:
sudo systemctl start telog
- Add it to autostart:
sudo systemctl enable telog
🤝 How to contribute
We welcome contributions!
- Fork this repository;
- Create a branch with your feature:
git checkout -b my-feature
; - Commit your changes:
git commit -m "feat: my new feature"
; - Push to your branch:
git push origin my-feature
.
Once your pull request has been merged, you can delete your branch.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~4–18MB
~257K SLoC