forked from zampat/icinga2-monitoring-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2021c-ss_win_mssql-server.sh
71 lines (59 loc) · 1.28 KB
/
2021c-ss_win_mssql-server.sh
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
###
# Create Service Set: "Windows_MSSQL-Server"
###
# Service Template for Service Set
RES=`icingacli director serviceset exists "Windows_MSSQL-Server"`
if [[ $RES =~ "does not exist" ]]
then
icingacli director serviceset create --json '
{
"object_name": "Windows_MSSQL-Server",
"object_type": "template",
"vars": {
}
}
'
####
# Service Objects: MSSQL Connections, MSSQL_Transactions/sec
####
icingacli director service create --json '
{
"disabled": false,
"imports": [
"MSSQL_Connections"
],
"object_name": "MSSQL Connections",
"object_type": "object",
"service_set": "Windows_MSSQL-Server",
"use_agent": true
}
'
icingacli director service create --json '
{
"disabled": false,
"imports": [
"MSSQL_Transactions/sec"
],
"object_name": "MSSQL_Transactions/sec",
"object_type": "object",
"service_set": "Windows_MSSQL-Server",
"use_agent": true
}
'
icingacli director service create --json '
{
"disabled": false,
"imports": [
"Agent_Win_Service"
],
"object_name": "MSSQL Services",
"object_type": "object",
"service_set": "Windows_MSSQL-Server",
"vars": {
"service_win_service": [
"MSSQLSERVER, SQLWriter, MSSQLFDLauncher"
]
}
}
'
fi