Skip to content

Commit

Permalink
explicit message for 404
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Mar 12, 2024
1 parent 957fd72 commit f7c38d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/crowdsec/lpmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ func (m *MetricsProvider) Run(ctx context.Context, myTomb *tomb.Tomb) error {
case errors.Is(err, context.DeadlineExceeded):
m.logger.Warnf("timeout sending lp metrics")
continue
case err != nil && resp != nil && resp.Response.StatusCode == http.StatusNotFound:
m.logger.Warnf("metrics endpoint not found, older LAPI?")
continue
case err != nil:
m.logger.Warnf("failed to send lp metrics: %s", err)
continue
Expand Down

0 comments on commit f7c38d2

Please sign in to comment.