Answer
All the diagonal entries must be nonzero.
Work Step by Step
A square upper triangular $n\times n$ matrix is in echelon form.
To be invertible, it must be row equivalent to $I_{n}$ (Th.8.b).
To be row equivalent to $I_{n}$, it must have n pivot positions (Th.8.c)..
To have n pivots, it must have all nonzero entries on the diagonal
All the diagonal entries must be nonzero.