Half-time: Cardiff 2 Brentford 0
Brentford’s five-match unbeaten run looked under threat at the break after goals from Tony Watt and Kenwyne Jones put the home side in command.
Cardiff were on top early on, with Jones heading straight at Bees keeper David Button and Anthony Pilkington’s header clipping the top of the crossbar.
At the other end, an Alan Judge free-kick was held by Bluebirds keeper David Marshall but just as Brentford had started to settle, they fell behind on 20 minutes.
Craig Noone saw a shot blocked but former Celtic striker Watt reacted to slot in the rebound.
Cardiff, who have only lost once at home all season and sat seventh at the start of the evening, doubled the lead on 34 minutes.
John Swift was dispossessed on halfway and, as Brentford looked for a free-kick, Pilkington led a quick counter, Watt then fed Jones and after Button failed to hold his shot, the ex-Sunderland and Stoke man netted at the second time of asking.
Brentford were disappointing in the first half but had a chance to halve the deficit as Lasse Vibe headed a Jake Bidwell cross wide.
Brentford: Button; Yennaris, O’Connell, Tarkowski, Button; Diagouraga, Kerschbaumer; Woods, Judge, Swift; Vibe.
Subs: Bonham, Colin, Dean, Saunders, McEachran, Jota, Hofmann.