fix(monitor): Correct hdbsql command in backup monitoring
Fixes an issue in 'monitor.sh' where the HANA backup monitoring used incorrect variable names ('HANA_USERKEY' instead of 'HANA_USER_KEY') and did not explicitly use the configured 'HDBSQL_PATH' for the 'hdbsql' command. Updates script version to 1.1.1.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Version: 1.1.0
|
||||
# Version: 1.1.1
|
||||
# =============================================================================
|
||||
# SAP HANA Monitoring Script
|
||||
#
|
||||
@@ -126,7 +126,7 @@ fi
|
||||
echo "ℹ️ Checking last successful data backup status..."
|
||||
|
||||
# Query to get the start time of the most recent successful complete data backup
|
||||
last_backup_date=$(hdbsql -U "$HANA_USERKEY" -j -a -x \
|
||||
last_backup_date=$("$HDBSQL_PATH" -U "$HANA_USER_KEY" -j -a -x \
|
||||
"SELECT TOP 1 SYS_START_TIME FROM M_BACKUP_CATALOG WHERE ENTRY_TYPE_NAME = 'complete data backup' AND STATE_NAME = 'successful' ORDER BY SYS_START_TIME DESC" 2>/dev/null | tr -d "\"" | sed 's/\..*//') # sed removes fractional seconds
|
||||
|
||||
if [[ -z "$last_backup_date" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user