I'm currently learning prometheus and try to visualize its metrics using Grafana and PromQL, but every time I put my queries metrics, it always showing error
Cannot read property 'result' of undefined
, i searched and tried some queries in internet, and all of them makes no difference. I wonder where i go wrong, since this is my first time using prometheus and grafana, here's some setting i used
First, this is my prometheus config, in .net framework
.
public class PrometheusConfig
{
private static readonly Counter counter = Metrics.CreateCounter("initial_counter", "counter to initiate Prometheus");
public static void Register(HttpConfiguration config)
{
var server = new MetricServer(port: 1234);
server.Start();
counter.Inc();
}
public static void RegisterFilter(HttpFilterCollection filters)
{
filters.Add(new PrometheusFilter());
}
}
Here my prometheus metrics i want to visualize
this is my grafana data source
and finally, this is my panel graph
can someone tell me how to fix this?