DavidBaezDbz / bashsql

Bash moinitor for MSSql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqlmonitor.sh

Started ๐Ÿš€

Script in bash. Checks an array of instance of MS Sql Server to verify Errores, Locks, Capacity, Database.

Use for encrypt pasword https://github.com/DavidBaezDbz/encriptPassword

Use a script for the windows https://github.com/metal3d/bashsimplecurses

Examples

    bash sqlmonitor.sh 

Checks every 5 seconds without creating tests and don't validate the prerequisites.

Prerequisites ๐Ÿ“‹

The script validate the existense of the software:

  1. sqlcmd

SQLCMD

Install postfix, it's important to install and configure POSTFIX after do you try to send the email.

    sudo apt update
    sudo apt-get install postfix

Review the next page, works for me. https://tonyteaches.tech/postfix-gmail-smtp-on-ubuntu/

Second password for you account gmail https://www.youtube.com/watch?v=J4CtP1MBtOE

WSL

Install wsl2 on your windows 11

  1. Run Windows Terminal as administrator.
    wsl --install
  1. Install a GNU/Linux distribution from those available in the Microsoft application store.

Ubuntu 20.04

The tests were on this version

  1. Restart our computer to be able to start the Ubuntu installation.

  2. Running the Ubuntu application and follow the steps

Microsoft Documentation

WSL-NOTIFY-SEND

Install wsl-notify-send

wsl-notify-send provides a Windows executable that is intended to be a replacement for the Linux notify-send utility.

https://github.com/stuartleeks/wsl-notify-send

Instalaciรณn ๐Ÿ”ง

Clone my repository and enjoy.

git clone git@github.com:DavidBaezDbz/bashsql.git

Give permison to the bash

chmod a+x sqlmonitor.sh

or execute whit bash command

bash sqlmonitor.sh 

Checks every 5 seconds

And the las step, is fill the file email and websitecheck

sqlcheck

127.0.0.1|Local|Local (127.0.0.1 Docker)|MonitorBash

Example

bash sqlmonitor.sh 

Checks every 5 Seconds

Test โš™๏ธ

Example 1

Execute the bash

    bash sqlmonitor.sh 

Checks every 5 seconds

IF YOU HAVE PROBLEMS WITH THE SQLCMD

Wiki ๐Ÿ“–

You can find out much more about how to use this project in our Wiki

Version ๐Ÿ“Œ

In the fiture a will use SemVer for versioning. For all available versions, see the tags en este repositorio.

Authors โœ’๏ธ๐Ÿ–‡๏ธ๐Ÿ› ๏ธ

License ๐Ÿ“„

Working on this - see the file LICENSE.md for details

Expressions of Gratitude ๐ŸŽ

  • Tell others about this project ๐Ÿ“ข
  • Invite for a beer ๐Ÿบ or a coffee โ˜• to someone on the team..
  • Publicly thanks ๐Ÿค“.
  • Anything you want.

About

Bash moinitor for MSSql


Languages

Language:Shell 96.2%Language:TSQL 3.8%