If needed, rinse lentils. Add them to a small saucepan and cover with water by at least an inch. Bring the lentils to a simmer and cook for about 15 minutes, or until lentils are soft.
Meanwhile, cook the diced onion in a medium skillet with a couple teaspoons of olive oil. Use medium heat and cook until translucent and soft, about 5 minutes.
When the lentils and onions are both soft, drain the lentils and add them to the skillet. Add the ketchup, vinegar and brown sugar. Stir and cook until heated through. Adjust seasonings to your desired taste and texture.
Serve the lentil mixture over rice, potatoes, bread, rolls or whatever you have on hand.