Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sujunmin/mariadbdailycheckscripts
MariaDB Daily Check Scripts in PowerShell and SQL
https://github.com/sujunmin/mariadbdailycheckscripts
daily-tasks database-status mariadb-server powershell sql windows
Last synced: 28 days ago
JSON representation
MariaDB Daily Check Scripts in PowerShell and SQL
- Host: GitHub
- URL: https://github.com/sujunmin/mariadbdailycheckscripts
- Owner: sujunmin
- License: apache-2.0
- Created: 2016-12-16T07:49:51.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T03:21:34.000Z (about 5 years ago)
- Last Synced: 2024-10-11T02:41:48.308Z (28 days ago)
- Topics: daily-tasks, database-status, mariadb-server, powershell, sql, windows
- Language: PowerShell
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MariaDBDailyCheckScripts
MariaDB Daily Check Scripts in PowerShell and SQL for WindowsThis scripts are inspired from [WiseSoft](http://www.wisesoft.co.uk/) [DBA Daily Checks Email Report](http://www.wisesoft.co.uk/articles/dba_daily_checks_email_report.aspx).
# Preparations
- `CREATE DATABASE master`
- execute [`event_history.sql`](https://raw.githubusercontent.com/sujunmin/MariaDBDailyCheckScripts/master/prep/event_history.sql) to make event history table.
- execute [`proc_for_event_history`](https://raw.githubusercontent.com/sujunmin/MariaDBDailyCheckScripts/master/prep/proc_for_event_history.sql) and make sure all event will be called in this procedure.
- Settings
In createreport.ps1
- `Set-Location ""` The scripts root path.
- `$ServerName = ""` MariaDB server name
- `$ServerIP = ""` MariaDB server IP
- `$mysqlexe = ""` Path to mysql.exe
- `$FullBackupPath = ""` Full backup path (If any)
- `$rptuser = ""` Scripts runner username
- `$rptpass = ""` Scripts runner password
- `$NumDays = 3` Get 3 days checks
- `$FreeDiskSpacePercentWarningThreshold = 15` Free disk space below 15% for warning
- `$FreeDiskSpacePercentCriticalThreshold = 10` Free disk space below 10% for critical
- `$MailFrom = ""` Report sender
- `$MailTo = ""` Report rcpts
- `$MailServer = ""` Mail server IPIn DatabaseFiles.sql
- `SET @CriticalThresholdPCT := 95;` More than 95% of Table size for data will be critical
- `SET @WarningThresholdPCT := 90;` More than 90% of Table size for data will be warningIn EventStatus.sql
- `SET @NumDays := 3;` Get 3 days checksIn FailEventStat.sql
- `SET @NumDays := 3;` Get 3 days checksIn Uptime.sql
- `SET @UptimeCritical := 1440;` Less then 1440 min for uptime will be critical
- `SET @UptimeWarning := 2880;` Less then 2880 min for uptime will be warning
# Usage`powershell createreport.ps1`