Skip to content

Commit

Permalink
feat: add opensearch probe and cleaned up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Muni10 committed Jan 25, 2024
1 parent f29f0c5 commit 7f4af14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions charts/templates/blackbox-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ spec:
{{- if .Values.contests.bigquery.enabled }}
- http://contests/bigquery
{{- end }}
{{- if .Values.contests.opensearch.enabled }}
- http://contests/opensearch
{{- end }}
{{- if .Values.contests.kafka.enabled }}
- http://contests/kafka
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions internal/opensearch/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func Handler(ctx context.Context, client *opensearch.Client) func(http.ResponseW
return
}
defer rs.Body.Close()
log.Info("Successfully created document to opensearch: %v", rs)
log.Info("Successfully created document in opensearch")

// Retrieving same document
getRequest := opensearchapi.GetRequest{
Expand All @@ -42,7 +42,7 @@ func Handler(ctx context.Context, client *opensearch.Client) func(http.ResponseW
http.Error(w, fmt.Sprintf("get document: %v", err), http.StatusInternalServerError)
return
}
log.Info("Successfully read document from opensearch: %v", rs)
log.Info("Successfully read document from opensearch")

w.WriteHeader(http.StatusOK)
}
Expand Down

0 comments on commit 7f4af14

Please sign in to comment.