Skip to content

DavidBaezDbz/bashsql

Repository files navigation

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 [email protected]: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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published