4 releases

Uses old Rust 2015

0.2.1 May 31, 2017
0.2.0 May 18, 2017
0.1.2 May 18, 2017
0.1.1 May 18, 2017

#90 in #push

MIT license

13KB
386 lines

ltg_push crates.io travis-ci.org

Push log files' updates to Telegram

Use

  1. Install Rust
  2. Clone this
  3. cargo build --release
  4. Write config
  5. Get chat ID
    1. Create bot
    2. Send any message to bot
    3. ltg_push <custom path to config file> getChatID
    4. Put received chat id to config
  6. ltg_push <custom path to config file>

Config

telegram:
    bot: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 # bot token
    chat_id: 123456789 # chat id (see Use.5)
files: # paths to watching files
  - path: /var/some/log
    match: "critical" # push updates only with this regex
  - path: /var/awesome/other_log

Systemd service

  1. Copy ltg_push.service to /etc/systemd/system
  2. systemctl daemon-reload
  3. Copy ltg_push to /usr/bin
  4. Copy config to /etc/ltg_push.yml

Dependencies

~9–18MB
~285K SLoC