salutary
adjective /ˈsæljətri/
  /ˈsæljəteri/
- having a good effect on somebody/something, though often seeming unpleasant
- a salutary lesson/experience/warning
 - The accident was a salutary reminder of the dangers of climbing.
 - This would have a salutary effect upon the health of the family.
 
Extra Examples- The cost of the war should be a salutary warning to other governments.
 - The experience was certainly salutary, but I wouldn't want to repeat it!
 - The fate of the heroine was meant to serve as a salutary lesson to young readers.
 
Oxford Collocations DictionarySalutary is used with these nouns:- effect
 - experience
 - lesson
 - …
 
Word Originlate Middle English (as a noun in the sense ‘remedy’): from French salutaire or Latin salutaris, from salus, salut- ‘health’.