Sefer Chofetz Chaim hilchos rechilus chapter 9 halacha 3,4

 If you hear someone say I am going to beat so and so up, or curse him out or embarrass him, then you have to ascertain whether he’s being serious or just making baseless threats. If he has a track record of following through with his threats, then you should inform the would-be victim to take proper precautions to protect himself. Or even if you see that this time, he means business then you can tell. But this is only if you have tried to rebuke the angry person beforehand or appease him so that he will calm down and decide not to hurt the person he is angry with. If it works, then you have fulfilled the mitzvah of rebuke bringing peace among people. However, if the rebuke does not work or you see it will not work then you’ll have to tell the would-be victim.

 However, if you see that by telling the would-be victim won’t just take precautions, but he will go and attack his would be threat then you can’t tell him because you are just ensuing a fight not resolving it.

The reason why you should try to rebuke first in this case is because the person is just angry and he just needs to calm down, of course if you think he’ll calm down but hurt the other guy anyways then you have to warn the other guy but that’s only if the angry person is known to follow through with threats even after he calms down. The reason why we said earlier by hiring the person who is a thief or the like that there is no reason to rebuke, is because for a long-term relationship as a job hiring, we can’t trust that even if he says he changed if it would stay that way. But in this case rebuke or appeasing is warranted to calm down the anger so that he won’t go through with the threat he is saying he will do, it’s clear and present danger which can be avoided by talking to him if it works.

Even if you hear secondhand knowledge of a physical, monetary, or psychological threat one should tell the possible victim, of course with the non-confidence that we had spoken about earlier, just to ensure that he will protect himself.

 Unlike by Gedalia ben Achikam who did not take Yochanan ben Kerech seriously that Yishmael ben Natanya would kill him. That was a problem on a couple of fronts. First off in regard to a life-threatening issue one should take any threat seriously even if it is a farfetched concern. Secondly, Yochanan ben Kerech recognized that Yishmael was being serious, and if there is recognizable evidence you can’t have the excuse that he might be exaggerating, therefore Gedalia should have heeded to the warning and that is why he died and there is now a fast called Tzom Gedalia.