update monitor, sapcontrol as configurable path
This commit is contained in:
@@ -11,6 +11,8 @@ NTFY_TOPIC_URL="https://ntfy.technopunk.space/sap"
|
|||||||
NTFY_TOKEN="your_ntfy_token_here"
|
NTFY_TOKEN="your_ntfy_token_here"
|
||||||
|
|
||||||
# --- HANA Connection Settings ---
|
# --- HANA Connection Settings ---
|
||||||
|
# Full path to the sapcontrol executable
|
||||||
|
SAPCONTROL_PATH="/usr/sap/NDB/HDB00/exe/sapcontrol"
|
||||||
# Full path to the hdbsql executable
|
# Full path to the hdbsql executable
|
||||||
HDBSQL_PATH="/usr/sap/hdbclient/hdbsql"
|
HDBSQL_PATH="/usr/sap/hdbclient/hdbsql"
|
||||||
# HANA user key for authentication
|
# HANA user key for authentication
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Version: 1.0.3
|
# Version: 1.0.4
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# SAP HANA Monitoring Script
|
# SAP HANA Monitoring Script
|
||||||
#
|
#
|
||||||
@@ -40,7 +40,13 @@ send_notification() {
|
|||||||
|
|
||||||
# --- HANA Process Status ---
|
# --- HANA Process Status ---
|
||||||
echo "⚙️ Checking HANA process status..."
|
echo "⚙️ Checking HANA process status..."
|
||||||
non_green_processes=$(sapcontrol -nr "${HANA_INSTANCE_NR}" -function GetProcessList | tail -n +6 | grep -v 'GREEN')
|
if [ ! -x "$SAPCONTROL_PATH" ]; then
|
||||||
|
echo "❌ Error: sapcontrol not found or not executable at ${SAPCONTROL_PATH}"
|
||||||
|
send_notification "HANA Monitor Error" "❌ Error: sapcontrol not found or not executable at ${SAPCONTROL_PATH}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
non_green_processes=$("${SAPCONTROL_PATH}" -nr "${HANA_INSTANCE_NR}" -function GetProcessList | tail -n +6 | grep -v 'GREEN')
|
||||||
|
|
||||||
if [ -n "$non_green_processes" ]; then
|
if [ -n "$non_green_processes" ]; then
|
||||||
echo "🚨 Alert: One or more HANA processes are not running!"
|
echo "🚨 Alert: One or more HANA processes are not running!"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ declare -A SCRIPT_PACKAGES
|
|||||||
# The version should match the "# Version: x.x.x" line in the main script file.
|
# The version should match the "# Version: x.x.x" line in the main script file.
|
||||||
SCRIPT_PACKAGES["Aurora Suite"]="1.1.0|https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.conf"
|
SCRIPT_PACKAGES["Aurora Suite"]="1.1.0|https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.conf"
|
||||||
SCRIPT_PACKAGES["Backup Suite"]="1.0.5|https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.conf"
|
SCRIPT_PACKAGES["Backup Suite"]="1.0.5|https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.conf"
|
||||||
SCRIPT_PACKAGES["Monitor Suite"]="1.0.3|https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.conf"
|
SCRIPT_PACKAGES["Monitor Suite"]="1.0.4|https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.conf"
|
||||||
SCRIPT_PACKAGES["Key Manager"]="1.2.1|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hdb_keymanager.sh"
|
SCRIPT_PACKAGES["Key Manager"]="1.2.1|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hdb_keymanager.sh"
|
||||||
SCRIPT_PACKAGES["File Cleaner"]="1.1.0|https://git.technopunk.space/tomi/Scripts/raw/branch/main/clean.sh"
|
SCRIPT_PACKAGES["File Cleaner"]="1.1.0|https://git.technopunk.space/tomi/Scripts/raw/branch/main/clean.sh"
|
||||||
SCRIPT_PACKAGES["HANA Tool"]="1.4.2|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh"
|
SCRIPT_PACKAGES["HANA Tool"]="1.4.2|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user