Skip to content

Commit

Permalink
fixed healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Oct 17, 2024
1 parent 79b8f68 commit b48a1dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## tip

* BUGFIX: fixed healthcheck

## v0.6.0

* FEATURE: add `limit` param for the `/field_values` request. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/75).
Expand Down
3 changes: 1 addition & 2 deletions pkg/plugin/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"fmt"
"io"
"net/http"
"path"
"strings"
"sync"

Expand Down Expand Up @@ -145,7 +144,7 @@ func (d *Datasource) query(ctx context.Context, _ backend.PluginContext, query b
// datasource configuration page which allows users to verify that
// a datasource is working as expected.
func (d *Datasource) CheckHealth(ctx context.Context, _ *backend.CheckHealthRequest) (*backend.CheckHealthResult, error) {
r, err := http.NewRequestWithContext(ctx, http.MethodGet, path.Join(d.settings.URL, health), nil)
r, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("%s%s", strings.TrimRight(d.settings.URL, "/"), health), nil)
if err != nil {
return newHealthCheckErrorf("could not create request"), nil
}
Expand Down

0 comments on commit b48a1dd

Please sign in to comment.