Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madfxr/servbot
Linux Server Monitoring with Telegram Bot
https://github.com/madfxr/servbot
bot linux monitoring php sysadmin telegram
Last synced: 2 months ago
JSON representation
Linux Server Monitoring with Telegram Bot
- Host: GitHub
- URL: https://github.com/madfxr/servbot
- Owner: madfxr
- Created: 2018-09-24T12:19:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T01:45:16.000Z (5 months ago)
- Last Synced: 2024-08-19T02:53:24.693Z (5 months ago)
- Topics: bot, linux, monitoring, php, sysadmin, telegram
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linux Server Monitoring with Telegram Bot
## Requirements
- Git
- Nginx
- PHP-FPM
- PHP
- BIND
- Certbot
- Telegram## Installation
- Configure the Web Server and SSL: ``https://certbot.eff.org/lets-encrypt/centosrhel7-nginx``
- Cloning PHP source code: ``https://github.com/madfxr/servbot.git``
- Chat in Telegram with ``@BotFather (https://t.me/BotFather)`` and create a new bot
- Get your API token (example: ``613961047:AZFWy0k603kLssujSIkKacmKuxxxTnq8Wl4``)
- In php file line 2, change ```` with your API token (example: ``613961047:AZFWy0k603kLssujSIkKacmKuxxxTnq8Wl4``)
- Upload the ``index.php`` file to your Web Server with SSL support
- Then access the following URL: ``https://api.telegram.org/bot/setWebhook?url=https://domain.tld/index.php`` in the web browser to set the webhook (example: ``https://api.telegram.org/bot613961047:AZFWy0k603kLssujSIkKacmKuxxxTnq8Wl4/setWebhook?url=https://domain.tld/index.php``
- Chat in Telegram with ``@BotFather (https://t.me/BotFather)`` and edit ``@yourBotName`` commands:```
df - Report file system disk space usage
free - Display amount of free and used memory in the system
ps - Report a snapshot of the current processes
top - Report a snapshot of the current processes
namedstatus - Show Internet domain name server service status
nginxstatus - Show HTTP and reverse proxy server, mail proxy server service status
phpfpmstatus - Show PHP FastCGI Process Manager service status
sshdstatus - Show OpenSSH SSH service status
date - Print or set the system date and time
uptime - Tell how long the system has been running
id - Print real and effective user and group IDs
ls - List directory contents
pwd - Print name of current/working directory
last - Show a listing of last logged in users
w - Show who is logged on and what they are doing
phpversion - Show PHP version number
sysinfo - Print system operation information
uname - Print system information
nc - Arbitrary TCP and UDP connections and listens
ping - Send ICMP ECHO_REQUEST to network hosts
telnet - User interface to the TELNET protocol
traceroute - Print the route packets trace to network host
curl - Transfer data from or to a server
dig - DNS lookup utility
whois - Client for the whois directory service
```- Enjoy!
## Notes
- SERVBot is still tried on CentOS 7 x86_64 only
- If you are using another operating system, feel free to make changes to an existing PHP source code