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 |
#81 in #push
13KB
386 lines
ltg_push
Push log files' updates to Telegram
Use
- Install Rust
- Clone this
cargo build --release
- Write config
- Get chat ID
- Create bot
- Send any message to bot
ltg_push <custom path to config file> getChatID
- Put received chat id to config
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
- Copy
ltg_push.service
to/etc/systemd/system
systemctl daemon-reload
- Copy
ltg_push
to/usr/bin
- Copy config to
/etc/ltg_push.yml
Dependencies
~9–18MB
~280K SLoC