'PromQL in /graph returning no result for any metric

Whenever I query any basic metric like http_requests_total on prometheus's /graph page, I get zero results in return. I checked the /targets page. All the endpoints are shown as UP there and on clicking the endpoints, the pages do contain metrics.

Why am I not able to get any result while querying? Help, please.

Attaching screenshots here. enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source