A simple monitoring tool to alert about processes hogging CPU and Memory. Supports emails as well as Slack alerts (via webhooks). Also supports persisting the alerts to a PostgreSQL database.
-
Clone this project:
git clone https://github.com/omkar-foss/hogmon.git
-
Copy
settings.py.sample
tosettings.py
and configure it as per your needs. -
To start the monitor, run
./start_monitor.sh
---------------PID 125 Start---------------
Process Name: brave
CPU Consumed: 60.5%
Memory Consumed: 332.7M (4.23%)
Command: /opt/brave.com/brave/brave --enable-crashpad
CPU Overload Duration: 30 sec
Memory Overload Duration: 10 sec
----------------PID 174870 End----------------
I am under heavy load for more than 30 seconds from processes as below:
---------------PID 125 Start---------------
Process Name: brave
CPU Consumed: 60.5%
Memory Consumed: 332.7M (4.23%)
Command: /opt/brave.com/brave/brave --enable-crashpad
CPU Overload Duration: 30 sec
Memory Overload Duration: 10 sec
----------------PID 174870 End----------------
Subject: High Resource Consumption Detected
High Consumption Processes as below:
---------------PID 125 Start---------------
Process Name: brave
CPU Consumed: 60.5%
Memory Consumed: 332.7M (4.23%)
Command: /opt/brave.com/brave/brave --enable-crashpad
CPU Overload Duration: 30 sec
Memory Overload Duration: 10 sec
----------------PID 174870 End----------------