I'm going to monitor my Kubernetes cluster availability. Prometheus server scraping kube-apiserver metrics and calculate availability percent according to kube-apiserver pods availability. Sometime kube-apiserver pods down and Prometheus server is not able to scrape at all and sometime pods are up and running and also serving requests but due to network connectivity or any other reason Prometheus server can not scrape metrics.
Is there any way to use PromQL to ignore no values? Or the better way to calculate Kubernetes cluster availability?