You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently trying to hook up Swagger-Stats with Grafana to handle remote monitoring and alerts.
I've connected Grafana to /swagger-stats/metrics and am getting a successful response.
Despite this I'm getting 'Cannot read property 'result' of undefined'.
Upon digging I've found that there is not diffrent between the response of /swagger-stats/metrics
and /swagger-stats/metrics/api/v1/query_range?query=api_all_request_total&start=1519362432&end=1519363332&step=30
Is this responsible for the issue? and is there any way around this.
Hi @imMatt, looks like you are missing one step ... Grafana should not be querying /swagger-stats/metrics endpoint directly. This endpoint returns Prometheus metrics; you need to install Prometheus and configure it to scrape metrics from /swagger-stats/metrics endpoint. Prometheus will store collected metrics in it's database. Then you configure Grafana to get data from Prometheus - query that you mentioned (api/v1/query_range?query=api_all_request_total&start=1519362432&end=1519363332&step=30) is Prometheus API (https://prometheus.io/docs/prometheus/latest/querying/api/)
Here is example scrape configuration for Prometheus to get metrics from /swagger-stats/metrics:
Hello,
Currently trying to hook up Swagger-Stats with Grafana to handle remote monitoring and alerts.
I've connected Grafana to /swagger-stats/metrics and am getting a successful response.
Despite this I'm getting 'Cannot read property 'result' of undefined'.
Upon digging I've found that there is not diffrent between the response of /swagger-stats/metrics
and /swagger-stats/metrics/api/v1/query_range?query=api_all_request_total&start=1519362432&end=1519363332&step=30
Is this responsible for the issue? and is there any way around this.
Swagger-Stats & NodeJS at latest versions. Running behind Nginx reverse proxy.
Response for /swagger-stats/metrics/api/v1/query_range?query=api_all_request_total&start=1519362432&end=1519363332&step=30
queryresp.txt
The text was updated successfully, but these errors were encountered: