Origin of qui vive
Word Origin for qui vive
1726, in on the qui vive "on the alert," from French qui voulez-vous qui vive? sentinel's challenge, "whom do you wish to live," literally "(long) live who?" In other words, "whose side are you on?" (The answer might be Vive la France, Vive le roi, etc.).
on the qui vive
On the alert, vigilant, as in The police have been warned to be on the qui vive for terrorists. This expression, containing the French words for “[long] live who?” originated as a sentinel's challenge to determine a person's political sympathies. The answer expected of allies was something like vive le roi (“long live the king”). It was taken over into English with its revised meaning in the early 1700s, the first recorded use being in 1726.