#telegram #notifications #monitoring #logging #utility

bin+lib telog

Aggregate logs from various sources and send real-time notifications to Telegram for easy monitoring

1 unstable release

0.1.1 Dec 1, 2024

#1015 in Development tools

Download history 63/week @ 2024-11-25 73/week @ 2024-12-02 9/week @ 2024-12-09

145 downloads per month

MIT and maybe LGPL-2.1-or-later WITH GCC-exception-2.0

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:

  1. Clone the repository:
git clone git@github.com:trinhminhtriet/telog.git
  1. Choose the features you want:

    • bin_core - Required for all log sources
    • ls_counter - Counter log source
    • ls_filesystem - Filesystem log source
    • ls_journald - Journald log source
    • ls_docker - Docker log source
  2. Build the project with the selected features:

cargo build --release --features=bin_core,ls_filesystem

Making .deb package 📦

  1. Install cargo-deb:
cargo install cargo-deb
  1. Edit package.metadata.deb.features in Cargo.toml.

  2. Build the package:

cargo deb
  1. Use the generated package:
target/debian/telog_..._amd64.deb

Making .rpm package 📦

  1. Install cargo-generate-rpm:
cargo install cargo-generate-rpm
  1. Build the project:
cargo build --release --features=bin_core,...
  1. Strip debug symbols:
strip -s target/release/telog
  1. Build the package:
cargo generate-rpm
  1. 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

  1. Create a Telegram bot via @BotFather 🤖

  2. Download the latest Telog release from GitHub 📥

  3. Install it:

  • For .deb based Linux:
sudo dpkg -i telog-...amd64.deb
  • For .rpm based Linux:
sudo rpm -i telog-...x86_64.rpm
  1. Find out the chat ID with your bot (see chat_id.md for details) 🆔

  2. Change the configuration file (/etc/telog.yaml in Linux) (see config.md for details) ⚙️

  3. Run Telog:

sudo systemctl start telog
  1. 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