This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
import_sources.json
274 lines (274 loc) · 12.7 KB
/
import_sources.json
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
[
{
"source_name": "ldap_to_icinga sql - users",
"provider_class": "Icinga\\Module\\Director\\Import\\ImportSourceSql",
"key_column": "admin_cn",
"description": "import source for users",
"originalId": "4",
"settings": {
"column_cache": "admin_cn, mail, group_concat(distinct radius_cn)",
"query": "select admin_cn, mail, group_concat(distinct radius_cn) from admin join radius_server on admin.admin_dn = radius_server.radius_manager group by admin_cn;",
"resource": "ldap_to_icinga"
},
"modifiers": [
{
"property_name": "group_concat(distinct radius_cn)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierSplit",
"target_property": null,
"priority": "1",
"description": null,
"settings": {
"delimiter": ",",
"when_empty": "empty_array"
}
}
]
},
{
"source_name": "ldap_to_icinga - monitored servers",
"provider_class": "Icinga\\Module\\Director\\Import\\ImportSourceSql",
"key_column": "radius_cn",
"description": "import source for hosts (based on mon realm)",
"originalId": "5",
"settings": {
"column_cache": "radius_cn, group_concat(distinct inf_realm order by inf_realm), mon_radius_secret, radius_dn, transport, group_concat(distinct mon_realm order by mon_realm), member_type, xml_url, realm_cn",
"query": "select radius_cn, group_concat(distinct inf_realm order by inf_realm), mon_radius_secret, radius_dn, transport, group_concat(distinct mon_realm order by mon_realm), member_type, xml_url, realm_cn from radius_server left join realm on radius_server.mon_realm = realm.realm_dn group by radius_cn order by case member_type when NULL then 1 when 'IdP' then 2 when 'SP' then 3 when 'IdPSP' then 4 end;",
"resource": "ldap_to_icinga"
},
"modifiers": [
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierSplit",
"target_property": null,
"priority": "6",
"description": "transformace na pole v pripade, ze je na serveru monitorovano vice realmu",
"settings": {
"delimiter": "=cz,cn=",
"when_empty": "empty_array"
}
},
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "9",
"description": "extrakce realmu - 1. cast",
"settings": {
"pattern": "\/,.*$\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "10",
"description": "extrakce realmu - 2. cast",
"settings": {
"pattern": "\/cn=\/",
"replacement": ""
}
},
{
"property_name": "radius_cn",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierGetHostByName",
"target_property": "radius_ip",
"priority": "11",
"description": "ziskani ip adresy z dns nazvu",
"settings": {
"on_failure": "null"
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierSplit",
"target_property": null,
"priority": "12",
"description": "transformace na pole v pripade, ze je na serveru vice infrastrukturnich realmu",
"settings": {
"delimiter": "=cz,cn=",
"when_empty": "empty_array"
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "13",
"description": "extrakce inf realmu - 1. cast",
"settings": {
"pattern": "\/,.*$\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "14",
"description": "extrakce inf realmu - 2. cast",
"settings": {
"pattern": "\/cn=\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierJoin",
"target_property": "inf_realms_str",
"priority": "15",
"description": "prevod pole na string",
"settings": {
"glue": ","
}
},
{
"property_name": "inf_realms_str",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierCombine",
"target_property": "operator_names",
"priority": "16",
"description": "kombinaci inf realmu a vsech aliasu ziskame vsechny ocekavane hodnoty atributu Operator-Name",
"settings": {
"pattern": "${inf_realms_str},${realm_cn}"
}
}
]
},
{
"source_name": "ldap_to_icinga - realms",
"provider_class": "Icinga\\Module\\Director\\Import\\ImportSourceSql",
"key_column": "realm_cn",
"description": "import source for realms",
"originalId": "8",
"settings": {
"column_cache": "realm_cn, realm_dn, member_type",
"query": "select realm_cn, realm_dn, member_type from realm group by realm_cn ;",
"resource": "ldap_to_icinga"
},
"modifiers": [
{
"property_name": "realm_cn",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "1",
"description": "ponechavame pouze primarni realm",
"settings": {
"delimiter": ",",
"pattern": "\/,.*$\/",
"replacement": "",
"when_empty": "empty_array"
}
}
]
},
{
"source_name": "ldap_to_icinga - infrastructure servers",
"provider_class": "Icinga\\Module\\Director\\Import\\ImportSourceSql",
"key_column": "radius_cn",
"description": "import source for hosts (based on inf realm)",
"originalId": "9",
"settings": {
"column_cache": "radius_cn, group_concat(distinct inf_realm order by inf_realm), mon_radius_secret, radius_dn, transport, group_concat(distinct mon_realm order by mon_realm), member_type, xml_url",
"query": "select radius_cn, group_concat(distinct inf_realm order by inf_realm), mon_radius_secret, radius_dn, transport, group_concat(distinct mon_realm order by mon_realm), member_type, xml_url from radius_server join realm on radius_server.inf_realm = realm.realm_dn group by radius_cn order by case member_type when NULL then 1 when 'IdP' then 2 when 'SP' then 3 when 'IdPSP' then 4 end;",
"resource": "ldap_to_icinga"
},
"modifiers": [
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierSplit",
"target_property": null,
"priority": "6",
"description": "transformace na pole v pripade, ze je na serveru monitorovano vice realmu",
"settings": {
"delimiter": "=cz,cn=",
"when_empty": "empty_array"
}
},
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "9",
"description": "extrakce realmu - 1. cast",
"settings": {
"pattern": "\/,.*$\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct mon_realm order by mon_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "10",
"description": "extrakce realmu - 2. cast",
"settings": {
"pattern": "\/cn=\/",
"replacement": ""
}
},
{
"property_name": "radius_cn",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierGetHostByName",
"target_property": "radius_ip",
"priority": "11",
"description": "ziskani ip adresy z dns nazvu",
"settings": {
"on_failure": "null"
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierSplit",
"target_property": null,
"priority": "12",
"description": "transformace na pole v pripade, ze je na serveru vice infrastrukturnich realmu",
"settings": {
"delimiter": "=cz,cn=",
"when_empty": "empty_array"
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "13",
"description": "extrakce inf realmu - 1. cast",
"settings": {
"pattern": "\/,.*$\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierRegexReplace",
"target_property": null,
"priority": "14",
"description": "extrakce inf realmu - 2. cast",
"settings": {
"pattern": "\/cn=\/",
"replacement": ""
}
},
{
"property_name": "group_concat(distinct inf_realm order by inf_realm)",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierJoin",
"target_property": "inf_realms_str",
"priority": "15",
"description": "prevod pole na string",
"settings": {
"glue": ","
}
},
{
"property_name": "inf_realms_str",
"provider_class": "Icinga\\Module\\Director\\PropertyModifier\\PropertyModifierCombine",
"target_property": "operator_names",
"priority": "16",
"description": "kombinaci inf realmu a vsech aliasu ziskame vsechny ocekavane hodnoty atributu Operator-Name",
"settings": {
"pattern": "${inf_realms_str},${realm_cn}"
}
}
]
}
]