Boil the spaghetti in the salted water until al dente, while cutting the sausage and onions into cubes.
First fry the sausage in a pan for about 5 minutes, then add the onions and fry for another 5 minutes. Deglaze with ketchup and water. Drain the spaghetti, fold into the sauce and serve.