On Thursday, 27 February 2020 17:53:41 UTC, adi garg wrote:
>
> I was able to select my hs2 metrics there for querying, but I couldn't see 
> them on localhost:9090/metrics. Is there any reason for it. 
>

Yes.

/metrics on the prometheus server only exposes metrics about the operation 
of the prometheus server itself.

If you want to query metrics which are *stored* in the prometheus time 
series database, then you need to use the prometheus API:
https://prometheus.io/docs/prometheus/latest/querying/api/#expression-queries

There's a command line interface that wraps this for you: e.g.
promtool query instant http://localhost:9090 up
is like entering "up" as a query in the GUI
 

> Also, my metrics on port 12156 are present on the '/' route and not on 
> '/metrics', so that can be handled with metrics_path right?
>
>
Yes.  If you can scrape the metrics using
curl http://x.x.x.x:12156/
then prometheus needs metrics_path of "/"

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/71fd938b-097f-4099-bbca-723d8cace380%40googlegroups.com.

Reply via email to