Alerting for data obtained by Telegraf inputs.http_response - often show NaN

Hello, I already have several alerts that work normally, but one alert is driving me crazy.
I have 2 web servers I want to monitor (alive or not), which is handled by the Telegraf inputs.http_response plugin, the interval is 60s, the data is stored in InfluxDB (1.8).
First I started with visualization by time series, then I used “Create alert rule from this panel”, that generated alert query as below.

Here you can also see the Reduce and Treshold expressions, the preview looks fine

However, I very often encounter NaN for one server (visible inside the original time series visualization) and at random times. And generally the alert doesn’t work, it doesn’t send mail.

When I switch to Table view, data looks normally.

I played with all the “evaluation group interval” and “Time range/Max data points/Min internal inside rule”, but nothing helps, what am I missing ?