Ex-CIA chief David Petraeus has agreed to testify to Congress about the attack on the US consulate in Libya that left four Americans dead

It is not clear when lawmakers will hear from the retired four-star general, who abruptly resigned last week amid a sex scandal.

Senate Intelligence Committee Chairperson Dianne Feinstein said Petraeus was willing to testify about the 11 September attack in Benghazi, but the timing had not yet been decided.

US lawmakers are demanding to know more about the timeline of the FBI's probe into Petraeus' affair with his biographer, Paula Broadwell.

US Defense Secretary Leon Panetta, speaking in Perth, Australia, warned against jumping to conclusions over the actions of another military figure, Marine General John Allen, a day after placing him under investigation in connection with the Petraeus scandal.

The top US commander in Afghanistan, who denies any wrongdoing, is being investigated for potentially inappropriate communications with a woman at the centre of the Petraeus case, Jill Kelley.

Secretary Panetta defended his decision to refer the case to the Pentagon's inspector general and for suspending Allen's nomination to another top position in the US military, saying it was a prudent step "until we determine what the facts are."

He praised Allen's work commanding the Afghan war effort, a position he retains despite the probe.

Secretary of State Hillary Clinton acknowledged that allies had raised questions about the Allen case but said there was "no concern whatsoever being expressed to us" about the mission in Afghanistan.

The scandal complicates President Barack Obama's efforts to reorganise his national security team following his re-election.

The White House said it still had faith in Allen, but acknowledged that its plans to transfer him to Europe, where he would head US and allied forces, have been suspended.

Obama also has to find a replacement for Petraeus at the CIA at a time when the president is vetting candidates to head the state and defense departments.