You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if curl_with_retry "$P_URL""GET""""text/html" 1 5;then
160
-
print_info "Basic connectivity OK"
161
-
else
162
-
print_error "Cannot connect to $P_URL - check if server is running"
163
-
exit 1
164
-
fi
165
-
fi
166
-
167
-
# Create comprehensive SQL filters (10 filters)
95
+
# Create SQL filters
168
96
create_sql_filters() {
169
-
print_info "Creating 10 SQL filters..."
170
-
171
97
sql_filters=(
172
98
"error_logs|Monitor all ERROR and FATAL severity events|SELECT * FROM $P_STREAM WHERE severity_text IN ('ERROR', 'FATAL') ORDER BY time_unix_nano DESC LIMIT 100"
173
99
"high_response_time|Identify requests with extended response times|SELECT \"service.name\", \"url.path\", body FROM $P_STREAM WHERE body LIKE '%duration%' ORDER BY time_unix_nano DESC LIMIT 50"
@@ -182,43 +108,28 @@ create_sql_filters() {
182
108
)
183
109
184
110
sql_success_count=0
185
-
filter_number=1
186
111
187
112
forfilter_configin"${sql_filters[@]}";do
188
113
IFS='|'read -r name description query <<<"$filter_config"
[[ "$SILENT"!="true" ]] &&echo"Waiting 3 seconds before creating saved filters..."
215
128
sleep 3
216
129
}
217
130
218
-
# Create comprehensive saved filters (10 filters)
131
+
# Create saved filters
219
132
create_saved_filters() {
220
-
print_info "Creating 10 saved filters..."
221
-
222
133
saved_filters=(
223
134
"service_errors|Monitor service errors and failures|SELECT * FROM $P_STREAM WHERE severity_text IN ('ERROR', 'FATAL') LIMIT 500|Ingestion Time,Data,service.name,severity_text,url.path|service.name"
224
135
"auth_security_events|Authentication and authorization monitoring|SELECT * FROM $P_STREAM WHERE url.path LIKE '%login%' AND severity_text IN ('WARN', 'ERROR', 'FATAL') LIMIT 500|Ingestion Time,Data,service.name,severity_text,source.address,user_agent.original|severity_text"
@@ -233,13 +144,10 @@ create_saved_filters() {
233
144
)
234
145
235
146
saved_success_count=0
236
-
filter_number=1
237
147
238
148
forfilter_configin"${saved_filters[@]}";do
239
149
IFS='|'read -r name description query visible_columns group_by <<<"$filter_config"
0 commit comments