Alert not respecting the No data state Ok

Basically what I want to do is just get an alert when my datasource is not reachable. I don’t care about the metric I use for it neither if I’m not receiving any data. My only requirement is to get an alert when Prometheus is down.

I don’t understand what I’m doing wrong as I set the no data state to be OK so I shouldn’t be getting an alert when there’s no data.

The reason why I’m using “HAS NO VALUE” is because I don’t care about the real alerting condition. I’m trying to avoid having to provision an aditional Prometheus + Alertmanager just to get notified if my main Prometheus goes down.

But if there is no data you define state alert as ok isn’t it? Instead of alerting state.

Yes. That was my initial plan but it’s not working as expected. I’m still getting alerts when there is no data.