Skip to content

593304/database_monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python script for regularly checking the status of the database or the values in it. After a given timeout or connection error the script will send an e-mail.

Already implemented functionality:

  • E-mail sending
  • Checking the database connection
    • At 50% of the timeout trying to restart the service
    • After the timeout reached sending an e-mail
  • Checking the sensors connection
    • At 50% of the timeout trying to restart the bluetooth service
    • After the timeout reached sending an e-mail

Update 1

Refactored code and added Sensors class for value checking.

Database schema for the script:

CREATE TABLE monitoring.email_alert_sent (
    id BIGSERIAL PRIMARY KEY,
    name VARCHAR(128),
    type VARCHAR(128),
    valid BOOL,
    timestamp TIMESTAMP
)

Already implemented functionality:

  • E-mail sending
  • Checking the database connection
    • At 50% of the timeout trying to restart the service
    • After the timeout reached sending an e-mail
  • Checking the sensors connection
    • At 50% of the timeout trying to restart the bluetooth service
    • After the timeout reached sending an e-mail
  • Checking the sensors values
    • Battery level

Update 2

Finished battery status checking and added fully working e-mail notifications

Already implemented functionality:

  • E-mail sending
  • Checking the database connection
    • At 50% of the timeout trying to restart the service
    • After the timeout reached sending an e-mail
  • Checking the sensors connection
    • At 50% of the timeout trying to restart the bluetooth service
    • After the timeout reached sending an e-mail
  • Checking the sensors values
    • Battery level and sending e-mail if necessary

Update 3

Finished temperature and humidity status checking and added fully working e-mail notifications

Already implemented functionality:

  • E-mail sending
  • Checking the database connection
    • At 50% of the timeout trying to restart the service
    • After the timeout reached sending an e-mail
  • Checking the sensors connection
    • At 50% of the timeout trying to restart the bluetooth service
    • After the timeout reached sending an e-mail
  • Checking the sensors values
    • Battery level and sending e-mail if necessary
    • Temperature level and sending e-mail if necessary
    • Humidity level and sending e-mail if necessary

Update 4

Added RPI system status checking with fully working e-mail notifications

Already implemented functionality:

  • E-mail sending
  • Checking the database connection
    • At 50% of the timeout trying to restart the service
    • After the timeout reached sending an e-mail
  • Checking the sensors connection
    • At 50% of the timeout trying to restart the bluetooth service
    • After the timeout reached sending an e-mail
  • Checking the sensors values
    • Battery level and sending e-mail if necessary
    • Temperature level and sending e-mail if necessary
    • Humidity level and sending e-mail if necessary
  • Checking RPI system values
    • CPU temperature, usage and sending e-mail if necessary
    • Memory usage and sending e-mail if necessary
    • SD card usage and sending e-mail if necessary
    • External HDDs partitions usage and sending e-mail if necessary

Update 5

Added cooldown rate for sensor monitoring

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages