Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/praveen1664/python-database-notifier
This is a tool to monitor your database
https://github.com/praveen1664/python-database-notifier
nosql python shell sql
Last synced: about 1 month ago
JSON representation
This is a tool to monitor your database
- Host: GitHub
- URL: https://github.com/praveen1664/python-database-notifier
- Owner: praveen1664
- Created: 2022-08-24T12:04:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-24T12:17:48.000Z (over 2 years ago)
- Last Synced: 2024-04-16T05:03:55.998Z (9 months ago)
- Topics: nosql, python, shell, sql
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### What is this?
We can use this script to retrieve data from database, and set conditions to appropriately give alerts instead of manually checking databaseInstallation:
Run Following:
``
python3 -m pip install mysql-connector-python
python3 -m pip install pyyaml
``## To run cron job on Mac:
1. Give Cron Job to run automatically on Mac:
Follow the steps here to update System Preferences > Security & Privacy > Privacy > Full Disk Access > Add Cron Path (/usr/sbin/cron)
https://blog.bejarano.io/fixing-cron-jobs-in-mojave/
2. Run Following:
crontab -e
The above will open up cron scheduler, We can edit by clicking "i"Based on the frequency We want to run the script (take any command):
Replace the PythonPath with where Wer python3 packages are installed, this is needed because in order for python3 to know Wer modules it needs to know the site-package path
Run Every Minute:
* * * * * PYTHONPATH=/usr/local/lib/python3.9/site-packages python3 /Users/praveen1664/Documents/DataCore/Code/Support/DatabaseCheck.py
Exit and save the file - Click Esc - ":wq"
3. If We run into errors, We can check cron job logs by going to following:
/private/var/mail/