Yedidi Roi Mekimi
The words go back to an old liturgical poet, Reb Yisroel Nejara. He lived in Tzvas, at the same time concurrently with the Arizal.
He composed many beautiful Piyutim (liturgical poems) which are the basis of many Shabbos Zemiros. so these are his words.
The tune is a little bit more recent, the tune goes back about 120 years ago. It was brought to Lubavitch right after the passing of the Rebbe Maharash. It was brought from Chevron by Shneur Zalmen Slonim, a descendant of Rebbetzen Menucha Rochel.
As I mentioned the Niggun reached Lubavitch right after the passing of the Rebbe Maharash. His sons used to sing this song tearfully sort of grieving for their father, and it was a favorite of the Rebbe Rashab.
In the first stanza there's a phrase borrowed from the story of Dovid and Golyas, that Dovid's is older brother Eliyov says to him: מי נטשת מעט הצאן - what are you doing here fighting? You're the shepherd, who's paying attention to the few sheep?
The Frierdiker Rebbe said in the name of his father (Rashab), That there's a double meaning. Who's paying attention to the humility (מעט) of the chasiddim?