Since the ceasefire was declared on Nov. 26, in the wake of a five-month-long Israeli army offensive in the poor coastal strip, gunmen have launched about 20 rockets into southern Israel.
Five landed on Tuesday in open areas near the Israeli border town of Sderot, a frequent target.
Asked if Israel would show restraint, Olmert told German reporters on his first visit to Berlin as prime minister: "It is becoming increasingly difficult."
"I am very aware how easily we could slide into total violence," he said. "But we still restrain ourselves and don't respond."
Groups behind the rocket attacks have said they considered recent Israeli raids against militants in the occupied West Bank, where there is no ceasefire, as violations of the truce.
The international community hopes the ceasefire can lead to peace negotiations between Israel and the Palestinians. Peace talks foundered in 2000, just before the start of a Palestinian uprising.
Olmert's visit to Germany, and planned talks in Italy with Prime Minister Romano Prodi on Wednesday, took place as the European Union was planning a new drive to revive peace talks.
'Lebanon overflights a necessity'
Turning to Israel's northern border, the Israeli leader said Israel would continue its flights over Lebanon despite demands from the United Nations to end them.
Israeli aircraft have routinely flown over Lebanon since the conflict ended on Aug. 14 in a UN-sponsored ceasefire.
"It is a necessity to make sure we have intelligence updates," he said. "Sometimes we have intelligence that they (Hizbullah) are smuggling weapons."
Olmert said as a result of the flights on a number of occasions intelligence had been "correct" about weapons smuggling attempts by Hizbullah.
"We do not do this as a matter of principle every day," he said.
Olmert said Hizbullah's freedom of movement and ability to arm itself had "been reduced."
The Israeli prime minister, who had faced flak in Israel over the war that killed 1,200 people in Lebanon and 157 Israelis, said he begged to differ with those who believed that Hizbullah had been strengthened by the war.
Despite its offensive, Israel failed to retrieve two Israeli reservists who were captured by Hizbullah in its July 12 raid.