Ahmad Brooks photo

Ahmad Brooks, who began his NFL career with the Cincinnati Bengals in 2006, finished his 49ers career with 58 sacks, including 6.5 in postseason play.

GREEN BAY — After an offseason during which they uncharacteristically filled needs with veteran free agents from other clubs, the Green Bay Packers augmented another thin position on Wednesday, agreeing to terms with veteran outside linebacker Ahmad Brooks on a one-year deal.

The news was first reported by NFL Network’s Ian Rapoport, who reported that Brooks got a one-year contract with a $3.5 million base salary as part of a deal that could be worth as much as $5 million.

Brooks, 33, a two-time All-Pro who was released by the San Francisco 49ers on Friday after eight seasons with the team, helps solidify a group that’s facing significant questions due to injuries and ineffective play entering tonight’s preseason finale against the Los Angeles Rams.

Starters Clay Matthews (groin) and Nick Perry (ankle) are not expected to play against the Rams, although their injuries do not appear to be serious and they should be ready for the Sept. 10 regular-season opener against Seattle.

Behind them, top backup Jayrone Elliott has been battling back issues for the past week, second-year man Kyler Fackrell has done little to distinguish himself in camp and rookie fourth-round pick Vince Biegel remains on the physically unable to perform list following offseason foot surgery. Because he wasn’t activated this week, it appears likely he’ll start the year on the in-season PUP list, which would keep him from playing in the first six games.

Adding Brooks, who visited the team Tuesday, should allay some concerns at the position, given his experience and career production.

“Tough. Tough,” linebackers coach Winston Moss replied Tuesday when asked what kind of player Brooks is. “Physically imposing. A rusher. Can play very, very well versus the run. Can play stout versus the tight end.

“He can do everything that we would ask him to do in our scheme. He can play to the tight end side, he can play to the open-end side. He can play the outside linebacker, he can play the elephant. If he were to be placed on our roster — however that decision goes down — he could come right in and fit right in.”

That’s exactly what’s happened this summer with the two tight ends the Packers signed during the offseason (Martellus Bennett, Lance Kendricks) and veteran guard Jahri Evans, who like Brooks is an older player who filled a glaring need at right guard after Pro Bowler T.J. Lang left as a free agent.

The 6-foot-3, 259-pound Brooks, who began his NFL career with the Cincinnati Bengals in 2006, finished his 49ers career with 58 sacks, including 6.5 in postseason play.

“Ahmad can still do things,” first-year 49ers coach Kyle Shanahan told reporters after Brooks’ release last week. “I think everyone knows that and he’s going to help somebody this year. But it really comes down to the final 53. And I’m starting to get a better feel for what that is now. … And it’s really been nothing against Ahmad.

“Once we really came to the conclusion he wasn’t going to be a part of our final 53, we weren’t going to keep him around just to let him know nine days from now. We know there’s a lot of teams that will be interested in him. So, we gave him that opportunity to go out and find them.”