Avoid 'no data' in your prometheus queries

2020-08-10 − 🏷 devops 🏷 monitoring

CLOSED: [2020-08-10 Mon 20:57] Have some Prometheus queries that sometimes give no results? For instance error rate when there are no errors. Just append ~or vector(0) and the query will return 0 instead of an empty vector.