-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPREREQUISISTES.TXT
122 lines (111 loc) · 4.42 KB
/
PREREQUISISTES.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
list
apt-get install python-pip
apt install python-backports.functools-lru-cache
pip install pyhdb
pip install prettytable
# Run tests
pip install pytest mock
py.test <program.py>
-- on tenant with admin account
CREATE USER TECH_MONI PASSWORD "UltraComplexPassword2020!"; -- Technical user for Python program
ALTER USER TECH_MONI DISABLE PASSWORD LIFETIME;
GRANT MONITORING to TECH_MONI;
GRANT ABAP_READ to TECH_MONI;
cat /usr/local/nagios/libexec/check_saphana_health.sh
python /usr/local/nagios/libexec/check_saphana_health.py $@
cat /usr/local/nagios/etc/resource.cfg
# SAP HANA - sap_hana_server - HDB
$USER7$=TECH_MONI
$USER8$=UltraComplexPassword2020!
cat /usr/local/nagios/etc/objects/commands.cfg
define command{
command_name check_saphana_health
command_line $USER1$/check_saphana_health.sh --hostname=$ARG1$ --username=$ARG2$ --password=$ARG3$ --sqlport=$ARG4$ --mode=$ARG5$
}
cat /usr/local/nagios/etc/objects/linux.cfg
######################
# backup_data, backup_log , version, cpu, memory, mem_host, services, services_all, license_usage, db_data, db_log, db_trace, alert
define service {
service_description app_hana_database_backup_data
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!backup_data
}
define service {
service_description app_hana_database_backup_log
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!backup_log
}
define service {
service_description app_hana_database_version
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!version
}
define service {
service_description app_hana_database_cpu
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!cpu
}
define service {
service_description app_hana_database_memory
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!memory
}
define service {
service_description app_hana_database_mem_host
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!mem_host
}
define service {
service_description app_hana_database_services
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!services
}
define service {
service_description app_hana_database_services_all
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!services_all
}
define service {
service_description app_hana_database_license_usage
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!license_usage
}
define service {
service_description app_hana_database_db_data
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!db_data
}
define service {
service_description app_hana_database_db_log
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!db_log
}
define service {
service_description app_hana_database_db_trace
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!db_trace
}
define service {
service_description app_hana_database_alert
host_name sap_hana_server
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!alert
}
define service {
service_description app_hana_database_sid
host_name hodes
use generic-service
check_command check_saphana_health!$HOSTADDRESS$!$USER7$!$USER8$!30044!sid
}