Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suntzu93/system_monitor
https://github.com/suntzu93/system_monitor
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/suntzu93/system_monitor
- Owner: suntzu93
- Created: 2024-05-17T22:19:24.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-19T23:06:55.000Z (6 months ago)
- Last Synced: 2024-08-10T17:11:18.257Z (5 months ago)
- Language: Shell
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-celestia - https://github.com/suntzu93/system_monitor
README
**This script will monitor CPU, Memory , Disk space and network.**
```
System monitor set threshold is 85% for all , if above threshole then send alert to telegram bot.*
Bridge monitor will send notification via telegram when block height not increase after 1 minute.*
Valiadtor monitor will send notification via telegram when block height not increase after 1 minute.
```Add telegram config in .env :
```
BOT_TOKEN="xxx"
CHAT_ID=xxx
```To get chat_id :
```
Send a message to telegram bot.Get the list of updates for your BOT:
https://api.telegram.org/bot/getUpdates
```How to run :
```
cd $HOME
wget https://raw.githubusercontent.com/suntzu93/system_monitor/main/system_monitor.sh
chmod +x system_monitor.sh
# Add to crontab , script will run each minutesCRON_JOB="* * * * * $HOME/system_monitor.sh >> /var/log/system_monitor.log 2>&1"
(crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab -# run on bridge node server
wget https://raw.githubusercontent.com/suntzu93/system_monitor/main/bridge_monitor.sh
chmod +x bridge_monitor.shCRON_JOB_BRIDGE="* * * * * $HOME/bridge_monitor.sh >> /var/log/bridge_monitor.log 2>&1"
(crontab -l 2>/dev/null; echo "$CRON_JOB_BRIDGE") | crontab -# run on validator node server
wget https://raw.githubusercontent.com/suntzu93/system_monitor/main/validator_monitor.sh
chmod +x validator_monitor.shCRON_JOB_VALIDATOR="* * * * * $HOME/validator_monitor.sh >> /var/log/validator_monitor.log 2>&1"
(crontab -l 2>/dev/null; echo "$CRON_JOB_VALIDATOR") | crontab -```