diff --git a/http/telegraf.go b/http/telegraf.go index f1b42d2215..7fef7a813d 100644 --- a/http/telegraf.go +++ b/http/telegraf.go @@ -485,7 +485,15 @@ func (s *TelegrafService) CreateTelegrafConfig(ctx context.Context, tc *platform // UpdateTelegrafConfig updates a single telegraf config. // Returns the new telegraf config after update. func (s *TelegrafService) UpdateTelegrafConfig(ctx context.Context, id platform.ID, tc *platform.TelegrafConfig, userID platform.ID) (*platform.TelegrafConfig, error) { - panic("not implemented") + var teleResp platform.TelegrafConfig + err := s.client. + PutJSON(tc, prefixTelegraf, id.String()). + DecodeJSON(&teleResp). + Do(ctx) + if err != nil { + return nil, err + } + return &teleResp, nil } // DeleteTelegrafConfig removes a telegraf config by ID.