Ceballos struck in the 10th minute and restored the defending champions' advantage two minutes before halftime.
But Ceballos soon eased the pressure on the visitors with the opener, wriggling out of a challenge with Ibai Gomez in the area to slide a finish inside the left-hand post.
Ceballos' pair of well-taken finishes before half-time took Madrid back to winning ways, although they had to survive Alaves hitting the woodwork twice.
New Zealand Starts Counting Votes in Too-Close-To-Call Election
The charismatic Jacinda Ardern, who revitalised the main opposition Labour Party, also failed to muster sufficient numbers. Ardern and English were expected to maintain fiscal prudence, but to differ on monetary policy, trade and immigration.
Manu Garcia responded by ending Alaves' long scoring drought.
Barcelona loanee Munir crossed the ball in for Garcia and the Alaves skipper made no mistake directing a close-range header past Navas off the underside of the bar. After being able to pass the escort Ely, Dani Ceballos fired hard that cannot be reached Pacheco goalkeeper.
Cristiano Ronaldo hit the goal-frame twice in the second half as the Madrid forward seeks his first goal in the league after he was suspended for the first four rounds for pushing a referee.
Ronaldo's afternoon ended with Pacheco tipping his angled strike around the post, but Madrid nonetheless held on for the three points.
Wisconsin, 20 other U.S. states targeted by Russian hackers in 2016 election
Trump also won Pennsylvania, becoming the first Republican presidential candidate to do so since 1988. Meanwhile, the state is moving ahead with implementing a new election security plan by early 2018.
Madrid was also without the injured Karim Benzema and Marcelo, while Gareth Bale was left on the bench. Real has two wins, two draws and a loss in its first five games, leaving the side in eighth place in the La Liga table, seven points behind leaders Barcelona.
Ronaldo then swung a volley towards goal from a corner, but his effort flew just over Pacheco's crossbar.
Trump's jabs set up first big US-Iran talks of his presidency
Trump delivered a doomsday warning to North Korea in his United Nations address on Tuesday and mocked its young leader. He later told reporters that he had decided what to do about the agreement but would not reveal what he had decided.