More precise (sensible, sensitive) server monitoring score

Yes, another thread. I am trying to stay organized.

I suggest to have a target score for the ratio of the number of lost packets in a batch.
That would be reached asymptotically if the packet loss ratio is always the same.

Number of reply packets received / number of monitoring packets sent in a batch => TargetScore

For example, for the batch size of three:

0/3 => -100
1/3 => -20
2/3 => 0 (must be lower than 10 for those NTP server having too aggressive rate limiting)
3/3 => 20

Of course, the target score value could be influenced by other parameters, like high offset reply, KoD packet received, zero size NTP reply packet received and so on.

For the practical purpose, I suggest to treat those conditions as packet loss. In case of high offset, record the worst offset value in the log, not the best or average.

Evaluation of the new score for a monitor after a test batch:
NewScore = (PreviousScore - TargetScore ) / 2 + TargetScore

A server having starting score of 20, and after two batch where each have one packet loss: new score = 5. That looks very aggressive, as it is. However, in case of a correctly working server, there will always be a handful of monitors where the score is bigger than 10, even 20. That will make the overall score bigger than 10, as we wish. Let’s have a simulation, one of my production server:

The result of the change:

Before the change: 99 monitors on score 20, 13 monitors less than 20

After the change: 71 monitors on score 20, 41 monitors are on score less than 20.

I suggest to try this in the test pool.