- v1.0.0:
- Initial release
- Overview
- Prerequisites
- Installation
- Usage
- Commands
- Links of Interest
- Contributing
- License
- About
- Donation
This project is aimed at creating a Telegram bot using Node.js to monitor system resources and display traffic statistics using vnstat, sysinfo, NODE command like -peer-id or -node-info. It also captures output from a tmux session and sends it as a message to the user. So you can check the console output directly in your telegram chat.
Before getting started, make sure you have the following:
- Obtain a Telegram bot token from Botfather bot in the Telegram app.
- Install vnstat (
sudo apt install vnstat
). - Install tmux (
sudo apt install tmux
). - Node.js installed (
sudo apt install node
). - Your node terminal should be launched in a tmux session named "frame" (tmux new -s frame).
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install dependencies by running
npm install
. - Create a
.env
file at the root of the project with the following content:ReplaceBOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN
YOUR_TELEGRAM_BOT_TOKEN
with the token obtained from Botfather.
-
Launch a tmux session named frame in your terminal:
tmux new -s frame
- Launch your QUILL NODE from /ceremonyclient/node/:
./poor_mans_cd.sh
- Quit this tmux session CTRL B, D:
CTRL B, D
-
Launch a new tmux session named telegram in your terminal from /telegram-bot-check-node-quill/:
tmux new -s telegram
-
Run the bot script:
node script-vnstat-node-bot.js
-
You can detach from the tmux session by pressing
CTRL + B
, thenD
. -
To reattach to the tmux session later, run:
tmux attach -t frame
-
Then it is time to speak with your bot on telegram and cheach out the /start command
-
Then you can edit your bot with BotFather in order to edit the commands:
output - Console output 5 lines.
peerid - Get Peer ID.
nodeinfo - Infos Node / Balance / Max Frame / Version / Peer Score.
vnstat - Infos Network.
sysinfo - Infos System Monitor.
start - Command list.
about - Contact.
donation - Donation Addresses.
-
vnstat:
- Website: vnstat.net
- GitHub Repository: github.com/vergoh/vnstat
- Description: vnStat is a network traffic monitor for Linux and BSD. It keeps a log of network traffic for the selected interfaces and provides statistics about them.
-
tmux:
- Website: github.com/tmux/tmux
- Description: tmux is a terminal multiplexer that allows users to access multiple separate terminal sessions inside a single terminal window or remote terminal session. It is especially useful for remote administration and managing multiple tasks simultaneously.
-
Telegram API:
- Documentation: core.telegram.org/bots/api
- Description: Telegram offers a comprehensive API that allows developers to create bots, integrate Telegram into their applications, and build custom solutions. It provides methods for sending and receiving messages, managing users and groups, and much more.
-
Node.js:
- Official Website: nodejs.org
- GitHub: github.com/nodejs/node
- Description: Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It's designed to build scalable network applications and is known for its event-driven, non-blocking I/O model. With Node.js, developers can write server-side code using JavaScript, enabling full-stack development with a single language. It has a rich ecosystem of libraries and frameworks, making it popular for web and backend development.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Dev: user137
- Email: [email protected]
- Telegram: https://t.me/staiph
- Address EVM: 0xCa429941000E55675e7a9B662DBa49b05bBFCc86
- Address BTC: bc1q9yxd77s7jljc0qmu9yyu2gw2m2untv9q0qrc2u
- kaspa:qpat8a9kw2drsmuy09q27xy8h279p3hhj6xx2zv07cun0nwmdsysxkgqv7paj
Thank you for using telegram-bot-check-node-quill