Skip to content

A simple monitoring tool to alert about processes hogging CPU and Memory.

License

Notifications You must be signed in to change notification settings

omkar-foss/hogmon

Repository files navigation

hogmon

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.

Usage

  1. Clone this project:

    git clone https://github.com/omkar-foss/hogmon.git
  2. Copy settings.py.sample to settings.py and configure it as per your needs.

  3. To start the monitor, run ./start_monitor.sh

Examples

With STDOUT Logging:

---------------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----------------

In Slack Notifications:

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----------------

In Email Notifications:

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----------------

About

A simple monitoring tool to alert about processes hogging CPU and Memory.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published